Unbundle more dependencies when deploying to Maven
Remove HTMLUnit, SAC, Colt, Ant, Commons Collections, Commons I/O,
ICU4J, and Servlet API, replacing them with proper Maven dependencies.
HTMLUnit, Commons I/O and ICU4J actually are dependencies of
gwt-user code, but are added to gwt-dev for backwards compatibility,
and to free people from the transitive dependencies when they're only
depending on gwt-user.
We could have declared them as "runtime" dependencies, but this could
break build tools integrations that resolve only compile-time dependencies.
(not sure if there are any, let's just not take the risk).
We also unbundle JSR 305 annotations without declaring them as
dependencies, as they're not needed at runtime.
This should only leave our own classes, repackaged dependencies, our
patched JDT and our patched Flute CSS parser.
Change-Id: Ie67298136e7e2355c8e926ab3fb7ed6f7eb6a9c6
diff --git a/maven/lib-gwt.sh b/maven/lib-gwt.sh
index 7a66847..38430f4 100644
--- a/maven/lib-gwt.sh
+++ b/maven/lib-gwt.sh
@@ -111,10 +111,17 @@
zip -d $GWT_EXTRACT_DIR/gwt-dev.jar "org/objectweb/asm/*"
echo "Removing Gson classes from gwt-dev"
zip -d $GWT_EXTRACT_DIR/gwt-dev.jar "com/google/gson/*"
- echo "Removing Jetty (et al.) classes from gwt-dev"
+ echo "Removing more dependencies from gwt-dev (incl. Jetty and HTMLUnit)"
zip -d $GWT_EXTRACT_DIR/gwt-dev.jar \
- "META-INF/services/javax.servlet.*" "META-INF/services/javax.websocket.*" "META-INF/services/org.eclipse.jetty.*" "META-INF/services/org.apache.juli.*" \
- "org/eclipse/jetty/*" "javax/servlet/*" "javax/el/*" "org/apache/jasper/*" "org/apache/el/*" "org/apache/juli/*" "org/apache/tomcat/*"
+ "META-INF/services/*" "javax/*" "org/w3c/*" \
+ "org/eclipse/jetty/*" "org/apache/*" \
+ "com/gargoylesoftware/htmlunit/*" "net/sourceforge/htmlunit/*" \
+ "com/steadystate/css/*" "org/w3c/css/*" \
+ "org/cyberneko/html/*" "org/xml/sax/*" \
+ "cern/*" "com/ibm/icu/*" "java_cup/*"
+ # Remove bundled third-parties from gwt-user
+ zip -d $GWT_EXTRACT_DIR/gwt-user.jar \
+ "javax/servlet/*" "org/w3c/css/*"
for i in $gwtLibs
do
diff --git a/maven/poms/gwt/gwt-dev/pom-template.xml b/maven/poms/gwt/gwt-dev/pom-template.xml
index d096b7e..02e3d52 100644
--- a/maven/poms/gwt/gwt-dev/pom-template.xml
+++ b/maven/poms/gwt/gwt-dev/pom-template.xml
@@ -31,8 +31,72 @@
<artifactId>asm-commons</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-client</artifactId>
+ <groupId>colt</groupId>
+ <artifactId>colt</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>tapestry</groupId>
+ <artifactId>tapestry</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ognl</groupId>
+ <artifactId>ognl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>oro</groupId>
+ <artifactId>oro</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>hivemind</groupId>
+ <artifactId>hivemind</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>hivemind</groupId>
+ <artifactId>hivemind-lib</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.htmlunit</groupId>
+ <artifactId>htmlunit</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
diff --git a/maven/poms/gwt/gwt-user/pom-template.xml b/maven/poms/gwt/gwt-user/pom-template.xml
index 577a821..db10249 100644
--- a/maven/poms/gwt/gwt-user/pom-template.xml
+++ b/maven/poms/gwt/gwt-user/pom-template.xml
@@ -31,5 +31,13 @@
<artifactId>validation-api</artifactId>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.w3c.css</groupId>
+ <artifactId>sac</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/maven/poms/gwt/pom-template.xml b/maven/poms/gwt/pom-template.xml
index cb06038..3538218 100644
--- a/maven/poms/gwt/pom-template.xml
+++ b/maven/poms/gwt/pom-template.xml
@@ -65,6 +65,11 @@
<scope>import</scope>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ </dependency>
+ <dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
@@ -88,11 +93,45 @@
<type>pom</type>
<scope>import</scope>
</dependency>
- <!-- Dependency of HtmlUnit -->
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-client</artifactId>
- <version>${jetty.version}</version>
+ <groupId>colt</groupId>
+ <artifactId>colt</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ <version>50.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.htmlunit</groupId>
+ <artifactId>htmlunit</artifactId>
+ <version>2.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.w3c.css</groupId>
+ <artifactId>sac</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>tapestry</groupId>
+ <artifactId>tapestry</artifactId>
+ <version>4.0.2</version>
</dependency>
<!-- For DevMode / JUnitShell (transitive dependency on jetty-server for CodeServer) -->
<dependency>