I asked a question earlier, that was asking how to have maven automatically compile my dependencies sources into my build's .jar, and I was directed to the Maven Shade plugin, however I can't seem to get it to work. The build hasn't change at all, I've already cleaned->updated-> rebuilt the project a few times.
Here's my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.example.net</groupId>
<artifactId>example-framework</artifactId>
<version>1.0-SNAPSHOT</version>
<name>exampleFramework</name>
<description>http://examplenet/</description>
<url>http://example.net/</url>
<organization>
<name>example</name>
<url>http://example.net/</url>
</organization>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
<!-- put your configurations here -->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.24.Final</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
</dependencies>
</project>
Not sure what I'm doing wrong, the results of the compilation are
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.229 s
[INFO] Finished at: 2014-12-03T10:22:45-06:00
[INFO] Final Memory: 16M/93M
[INFO] ------------------------------------------------------------------------
and the file size is about 80kb, it's about 5mb with the dependencies added (Which I've had to do manually and it's annoying)
EDIT: Please note that eclipse put the <plugin>
outside of the <pluginManagement>
, I thought this could have been the issue and moved it manually, but it didn't change anything