I have created 2 maven projects:
1. gwt-tools-rebased
2. gwt-tools
The first project declares these dependencies:
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
<version>v20150901</version>
</dependency>
</dependencies>
and rebases them with maven-shade-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.google.javascript.jscomp</pattern>
<shadedPattern>com.google.gwt.thirdparty.javascript.jscomp</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.javascript.rhino</pattern>
<shadedPattern>com.google.gwt.thirdparty.javascript.rhino</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.debugging.sourcemap</pattern>
<shadedPattern>com.google.gwt.thirdparty.debugging.sourcemap</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>com.google.gwt.thirdparty.guava.common</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
The second project declares these dependencies:
<dependencies>
<dependency>
<groupId>net.cristcost</groupId>
<artifactId>gwt-tools-rebased</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.3</version>
</dependency>
<dependency>
<groupId>colt</groupId>
<artifactId>colt</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.11.0.v20150520-2033</version>
</dependency>
</dependencies>
The execution of the mvn dependency:copy-dependencies command has this console output:
Handwritten:gwt-tools cristcost$ mvn dependency:copy-dependencies
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Tools as Maven dependencies test 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default-cli) @ gwt-tools ---
[INFO] Copying concurrent-1.3.4.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/concurrent-1.3.4.jar
[INFO] Copying asm-5.0.3.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/asm-5.0.3.jar
[INFO] Copying org.eclipse.jdt.core-3.11.0.v20150520-2033.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/org.eclipse.jdt.core-3.11.0.v20150520-2033.jar
[INFO] Copying colt-1.2.0.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/colt-1.2.0.jar
[INFO] Copying gwt-tools-rebased-1.0.0-SNAPSHOT.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/gwt-tools-rebased-1.0.0-SNAPSHOT.jar
[INFO] Copying xercesImpl-2.11.0.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/xercesImpl-2.11.0.jar
[INFO] Copying xml-apis-1.4.01.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/xml-apis-1.4.01.jar
[INFO] Copying ant-1.7.1.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/ant-1.7.1.jar
[INFO] Copying ant-launcher-1.7.1.jar to /Users/cristcost/dev/cristcost/test/gwt-tools/target/dependency/ant-launcher-1.7.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.119 s
[INFO] Finished at: 2015-10-14T08:42:18+02:00
[INFO] Final Memory: 16M/309M
[INFO] ------------------------------------------------------------------------
and produces this contents:
Handwritten:gwt-tools cristcost$ ll target/dependency/
total 31552
-rw-r--r-- 1 cristcost staff 1323005 14 Ott 08:42 ant-1.7.1.jar
-rw-r--r-- 1 cristcost staff 12143 14 Ott 08:42 ant-launcher-1.7.1.jar
-rw-r--r-- 1 cristcost staff 53231 14 Ott 08:42 asm-5.0.3.jar
-rw-r--r-- 1 cristcost staff 581945 14 Ott 08:42 colt-1.2.0.jar
-rw-r--r-- 1 cristcost staff 189284 14 Ott 08:42 concurrent-1.3.4.jar
-rw-r--r-- 1 cristcost staff 6678108 14 Ott 08:42 gwt-tools-rebased-1.0.0-SNAPSHOT.jar
-rw-r--r-- 1 cristcost staff 5716475 14 Ott 08:42 org.eclipse.jdt.core-3.11.0.v20150520-2033.jar
-rw-r--r-- 1 cristcost staff 1367760 14 Ott 08:42 xercesImpl-2.11.0.jar
-rw-r--r-- 1 cristcost staff 220536 14 Ott 08:42 xml-apis-1.4.01.jar
Handwritten:gwt-tools cristcost$
I hope this is inspiring and helpful
Cristiano