Skip to content

Commit

Permalink
Merge pull request #118 from cgruber/pleasestandup
Browse files Browse the repository at this point in the history
Shade the output jar, and relocate artifacts likely to cause collisions (notably auto-common)
  • Loading branch information
cgruber committed Apr 7, 2015
2 parents c730434 + 3425e85 commit a0db9bc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -25,3 +25,5 @@ classes
obj

.DS_Store

dependency-reduced-pom.xml
52 changes: 35 additions & 17 deletions compiler/pom.xml
Expand Up @@ -129,23 +129,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
Expand Down Expand Up @@ -173,6 +156,41 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
<excludes>
<!-- guava which has a consistent API and whose public types we vend in producers -->
<exclude>com.google.guava</exclude>
<!-- annotation processors dagger uses to be built, not to operate -->
<exclude>com.google.auto.service</exclude>
<exclude>com.google.auto.value</exclude>
<!-- projects should depend on api projects directly -->
<exclude>com.google.dagger:dagger</exclude>
<exclude>com.google.dagger:dagger-producers</exclude>
<exclude>javax.inject</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.google.auto.common</pattern>
<shadedPattern>dagger.shaded.auto.common</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a0db9bc

Please sign in to comment.