Create a new tomcat-util-scan.jar that contains the classes for JAR scanning and XML descriptor processing.
Update the .pom files with the new dependencies.
Review the .pom file dependencies and update to take account of Tomcat 8 refactoring.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1546365 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
index 36b5a3d..9b47afc 100644
--- a/build.xml
+++ b/build.xml
@@ -101,6 +101,7 @@
<property name="tomcat-spdy.jar" value="${tomcat.build}/lib/tomcat-spdy.jar"/>
<property name="tomcat-api.jar" value="${tomcat.build}/lib/tomcat-api.jar"/>
<property name="tomcat-util.jar" value="${tomcat.build}/lib/tomcat-util.jar"/>
+ <property name="tomcat-util-scan.jar" value="${tomcat.build}/lib/tomcat-util-scan.jar"/>
<property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
<property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
@@ -128,6 +129,7 @@
<property name="tomcat-coyote-src.jar" value="${tomcat.src.jars}/tomcat-coyote-src.jar"/>
<property name="tomcat-api-src.jar" value="${tomcat.src.jars}/tomcat-api-src.jar"/>
<property name="tomcat-util-src.jar" value="${tomcat.src.jars}/tomcat-util-src.jar"/>
+ <property name="tomcat-util-scan-src.jar" value="${tomcat.src.jars}/tomcat-util-scan-src.jar"/>
<property name="jasper-src.jar" value="${tomcat.src.jars}/jasper-src.jar"/>
<property name="jasper-el-src.jar" value="${tomcat.src.jars}/jasper-el-src.jar"/>
@@ -331,9 +333,16 @@
<patternset id="files.tomcat-util">
<include name="org/apache/tomcat/util/buf/**" />
<include name="org/apache/tomcat/util/codec/**" />
- <include name="org/apache/tomcat/util/descriptor/**" />
<include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/res/**" />
+ <include name="org/apache/tomcat/util/threads/**" />
+ <include name="org/apache/tomcat/util/*" />
+ </patternset>
+
+ <patternset id="files.tomcat-util-scan">
+ <include name="org/apache/tomcat/util/descriptor/**" />
+ <include name="org/apache/tomcat/util/digester/**" />
+ <include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/scan/**" />
</patternset>
@@ -360,7 +369,6 @@
<patternset id="files.catalina-ant">
<include name="org/apache/catalina/ant/*" />
<include name="org/apache/catalina/ant/jmx/*" />
- <include name="org/apache/catalina/util/Base64.*" />
</patternset>
<patternset id="files.catalina-storeconfig">
@@ -373,16 +381,15 @@
<patternset id="files.tomcat-coyote">
<include name="org/apache/coyote/**" />
- <include name="org/apache/tomcat/util/**" />
- <!-- Exclude the files shared between Catalina & Jasper and/or used by
- WebSockets -->
- <exclude name="org/apache/tomcat/util/buf/**" />
- <exclude name="org/apache/tomcat/util/codec/**" />
- <exclude name="org/apache/tomcat/util/descriptor/**" />
- <exclude name="org/apache/tomcat/util/file/**" />
- <exclude name="org/apache/tomcat/util/res/**" />
- <exclude name="org/apache/tomcat/util/scan/**" />
+ <!-- Included in tomcat-spdy -->
<exclude name="org/apache/coyote/spdy/**" />
+ <!-- Remaining tomcat-util packages -->
+ <include name="org/apache/tomcat/util/bcel/**" />
+ <include name="org/apache/tomcat/util/collections/**" />
+ <include name="org/apache/tomcat/util/http/**" />
+ <include name="org/apache/tomcat/util/log/**" />
+ <include name="org/apache/tomcat/util/modeler/**" />
+ <include name="org/apache/tomcat/util/net/**" />
</patternset>
<patternset id="files.tomcat-spdy">
@@ -416,6 +423,7 @@
<!-- These pattern sets conflict so include files directly
<patternset refid="files.tomcat-coyote" />
<patternset refid="files.tomcat-util" />
+ <patternset refid="files.tomcat-util-scan" />
-->
<include name="org/apache/coyote/**" />
<include name="org/apache/tomcat/jni/**" />
@@ -749,6 +757,11 @@
filesDir="${tomcat.classes}"
filesId="files.tomcat-util" />
+ <!-- Tomcat Util Scan JAR File -->
+ <jarIt jarfile="${tomcat-util-scan.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.tomcat-util-scan" />
+
<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote.jar}"
filesDir="${tomcat.classes}"
@@ -1880,6 +1893,7 @@
<include name="tomcat-websocket.jar"/>
<include name="tomcat-coyote.jar"/>
<include name="tomcat-util.jar"/>
+ <include name="tomcat-util-scan.jar"/>
</fileset>
<fileset dir="${tomcat.build}/bin">
<include name="tomcat-juli.jar"/>
@@ -2466,6 +2480,11 @@
filesDir="java"
filesId="files.tomcat-util" />
+ <!-- Tomcat Util Scan JAR File -->
+ <jarIt jarfile="${tomcat-util-scan-src.jar}"
+ filesDir="java"
+ filesId="files.tomcat-util-scan" />
+
<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote-src.jar}"
filesDir="java"
diff --git a/res/maven/tomcat-catalina-ant.pom b/res/maven/tomcat-catalina-ant.pom
index e8052e7..ccb7931 100644
--- a/res/maven/tomcat-catalina-ant.pom
+++ b/res/maven/tomcat-catalina-ant.pom
@@ -32,13 +32,13 @@
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-coyote</artifactId>
+ <artifactId>tomcat-util</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina</artifactId>
+ <artifactId>tomcat-util-scan</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
diff --git a/res/maven/tomcat-catalina-ha.pom b/res/maven/tomcat-catalina-ha.pom
index 210cbf0..edf53fb 100644
--- a/res/maven/tomcat-catalina-ha.pom
+++ b/res/maven/tomcat-catalina-ha.pom
@@ -66,5 +66,11 @@
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util-scan</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/res/maven/tomcat-catalina-jmx-remote.pom b/res/maven/tomcat-catalina-jmx-remote.pom
index f01f3b0..e1a62a7 100644
--- a/res/maven/tomcat-catalina-jmx-remote.pom
+++ b/res/maven/tomcat-catalina-jmx-remote.pom
@@ -32,7 +32,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-coyote</artifactId>
+ <artifactId>tomcat-util</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
diff --git a/res/maven/tomcat-catalina.pom b/res/maven/tomcat-catalina.pom
index 6f0b411..3a595ef 100644
--- a/res/maven/tomcat-catalina.pom
+++ b/res/maven/tomcat-catalina.pom
@@ -38,6 +38,12 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jsp-api</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-juli</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
@@ -62,9 +68,21 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-coyote</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-util</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util-scan</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/res/maven/tomcat-jasper.pom b/res/maven/tomcat-jasper.pom
index 9d7af2c..c1789ab 100644
--- a/res/maven/tomcat-jasper.pom
+++ b/res/maven/tomcat-jasper.pom
@@ -73,7 +73,7 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-util</artifactId>
+ <artifactId>tomcat-util-scan</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
diff --git a/res/maven/tomcat-spdy.pom b/res/maven/tomcat-spdy.pom
index 303641c..fe50fcd 100644
--- a/res/maven/tomcat-spdy.pom
+++ b/res/maven/tomcat-spdy.pom
@@ -48,5 +48,17 @@
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-servlet-api</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/res/maven/tomcat-util-scan.pom b/res/maven/tomcat-util-scan.pom
new file mode 100644
index 0000000..4b38e87
--- /dev/null
+++ b/res/maven/tomcat-util-scan.pom
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util-scan</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <description>
+ Common code shared by Catalina and Jasper for scanning JARS and processing
+ XML descriptors
+ </description>
+ <url>http://tomcat.apache.org/</url>
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-juli</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-api</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/res/maven/tomcat-util.pom b/res/maven/tomcat-util.pom
index 50011b6..083bc95 100644
--- a/res/maven/tomcat-util.pom
+++ b/res/maven/tomcat-util.pom
@@ -20,7 +20,7 @@
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-util</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
- <description>Common code shared by Catalina and Jasper</description>
+ <description>Common code shared by multiple Tomcat components</description>
<url>http://tomcat.apache.org/</url>
<licenses>
<license>
@@ -36,11 +36,5 @@
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-api</artifactId>
- <version>@MAVEN.DEPLOY.VERSION@</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
</project>
diff --git a/res/maven/tomcat-websocket.pom b/res/maven/tomcat-websocket.pom
index f91045d..775263b 100644
--- a/res/maven/tomcat-websocket.pom
+++ b/res/maven/tomcat-websocket.pom
@@ -32,6 +32,12 @@
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-servlet-api</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-websocket-api</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
<scope>compile</scope>