Skip to content

Commit

Permalink
Update pom.xml files to support both standard and full jars
Browse files Browse the repository at this point in the history
  • Loading branch information
moparisthebest committed Apr 15, 2019
1 parent 7492f5d commit 252ab7b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 33 deletions.
3 changes: 3 additions & 0 deletions http-doh-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
16 changes: 16 additions & 0 deletions jDnsProxy-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,21 @@
</dependencies>
<build>
<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>
</project>
75 changes: 42 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,21 @@
<configuration>
<compilerArgs>
<compilerArg>-Xlint:all</compilerArg>
<compilerArg>-Werror</compilerArg>
</compilerArgs>
</configuration>
</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>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -76,39 +88,6 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<outputFile>${project.build.directory}/${project.artifactId}-full.jar</outputFile>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<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>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand All @@ -120,6 +99,36 @@
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<outputFile>${project.build.directory}/${project.artifactId}-full.jar</outputFile>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
5 changes: 5 additions & 0 deletions xmpp-dox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 252ab7b

Please sign in to comment.