Skip to content

Commit

Permalink
pom: Use maven-shade-plugin to avoid asm jar conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
LinShunKang committed Dec 22, 2018
1 parent 29aad6e commit 362adb3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 29 deletions.
29 changes: 29 additions & 0 deletions MyPerf4J-ASM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,35 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>

<configuration>
<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
<promoteTransitiveDependencies>false</promoteTransitiveDependencies>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<minimizeJar>false</minimizeJar>
<createSourcesJar>false</createSourcesJar>
<relocations>
<relocation>
<pattern>org.objectweb.asm</pattern>
<shadedPattern>org.shaded.objectweb.asm</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
43 changes: 14 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,6 @@
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m5.1</version>
<configuration>
<enableSshAgent>true</enableSshAgent>
<autoVersionSubmodules>true</autoVersionSubmodules>
<pushFeatures>false</pushFeatures>
<pushReleases>false</pushReleases>
<pushHotfixes>false</pushHotfixes>
<flowInitContext>
<versionTagPrefix>rev-</versionTagPrefix>
</flowInitContext>
</configuration>
</plugin>
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-resources-plugin</artifactId>-->
Expand Down Expand Up @@ -106,20 +91,20 @@
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-jar-plugin</artifactId>-->
<!--<version>2.3</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<id>jar</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>jar</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
Expand Down

0 comments on commit 362adb3

Please sign in to comment.