Update pom.xml files to support both standard and full jars

This commit is contained in:
Travis Burtrum 2019-04-15 00:06:16 -04:00
parent 7492f5d23d
commit 252ab7bcd1
4 changed files with 66 additions and 33 deletions

View File

@ -53,6 +53,9 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version> <version>${spring.boot.version}</version>
</plugin> </plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -29,5 +29,21 @@
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile combine.self="override"></outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
</project> </project>

37
pom.xml
View File

@ -62,9 +62,21 @@
<configuration> <configuration>
<compilerArgs> <compilerArgs>
<compilerArg>-Xlint:all</compilerArg> <compilerArg>-Xlint:all</compilerArg>
<compilerArg>-Werror</compilerArg>
</compilerArgs> </compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<archive>
<manifest>
<mainClass>com.moparisthebest.dns.DnsProxy</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.sonatype.plugins</groupId> <groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>nexus-staging-maven-plugin</artifactId>
@ -76,6 +88,17 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose> <autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration> </configuration>
</plugin> </plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version> <version>3.2.1</version>
@ -101,26 +124,12 @@
</filters> </filters>
<transformers> <transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.moparisthebest.dns.DnsProxy</mainClass>
</transformer>
</transformers> </transformers>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</pluginManagement> </pluginManagement>
</build> </build>
</project> </project>

View File

@ -30,5 +30,10 @@
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</plugins>
</build> </build>
</project> </project>