1
0

The created jarfiles now have the version# embedded in their names, so the

test wrapper class can't just hard-wire their names any more. Instead, we
pass the jarfile names in from the build.xml file as system properties.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@191630 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2005-06-21 06:21:55 +00:00
parent 0f272fa209
commit 330e17e0ed
2 changed files with 74 additions and 5 deletions

View File

@@ -578,6 +578,9 @@ limitations under the License.-->'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -590,6 +593,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -602,6 +608,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Jdk14Logger"/> value="org.apache.commons.logging.impl.Jdk14Logger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -612,6 +621,9 @@ limitations under the License.--&gt;'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -624,6 +636,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -636,6 +651,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/> value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Jdk14Logger"/> value="org.apache.commons.logging.impl.Jdk14Logger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -705,6 +723,9 @@ limitations under the License.--&gt;'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -718,6 +739,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -731,6 +755,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Log4JLogger"/> value="org.apache.commons.logging.impl.Log4JLogger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -742,6 +769,9 @@ limitations under the License.--&gt;'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -755,6 +785,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -768,6 +801,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Log4JLogger"/> value="org.apache.commons.logging.impl.Log4JLogger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -895,6 +931,9 @@ limitations under the License.--&gt;'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -908,6 +947,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -921,6 +963,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Log4JLogger"/> value="org.apache.commons.logging.impl.Log4JLogger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -932,6 +977,9 @@ limitations under the License.--&gt;'>
<sysproperty key="wrapper.target" value="${build.home}"/> <sysproperty key="wrapper.target" value="${build.home}"/>
<sysproperty key="wrapper.testcase" <sysproperty key="wrapper.testcase"
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -945,6 +993,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.LogFactory" <sysproperty key="org.apache.commons.logging.LogFactory"
value="org.apache.commons.logging.impl.LogFactoryImpl"/> value="org.apache.commons.logging.impl.LogFactoryImpl"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>
@@ -958,6 +1009,9 @@ limitations under the License.--&gt;'>
value="org.apache.commons.logging.log4j.CustomConfigTestCase"/> value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
<sysproperty key="org.apache.commons.logging.Log" <sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.Log4JLogger"/> value="org.apache.commons.logging.impl.Log4JLogger"/>
<sysproperty key="commons.logging.jar" value="${core.jar.name}"/>
<sysproperty key="commons.logging.api.jar" value="${api.jar.name}"/>
<sysproperty key="commons.logging.appenders.jar" value="${appenders.jar.name}"/>
<classpath refid="test.classpath.wrap"/> <classpath refid="test.classpath.wrap"/>
</java> </java>

View File

@@ -82,10 +82,22 @@ public class Wrapper {
// Construct URLs for the various JAR files // Construct URLs for the various JAR files
File target = new File(System.getProperty("wrapper.target")); File target = new File(System.getProperty("wrapper.target"));
URL commonsLogging =
(new File(target, "commons-logging.jar")).toURL(); // the test invoker is required to set these system properties
URL commonsLoggingApi = // to point to the appropriate jar files
(new File(target, "commons-logging-api.jar")).toURL(); String jcljar = System.getProperty("commons.logging.jar");
String jclapijar = System.getProperty("commons.logging.api.jar");
String jclappjar = System.getProperty("commons.logging.appenders.jar");
if ((jcljar==null) || (jclapijar==null) || (jclappjar==null)) {
throw new Exception(
"Required system property for test is missing. "
+ "One or more of the following is not defined: "
+ "commons.logging.jar, commons.logging.api.jar, "
+ "commons.logging.appenders.jar");
}
URL commonsLogging = (new File(target, jcljar)).toURL();
URL commonsLoggingApi = (new File(target, jclapijar)).toURL();
URL commonsLoggingTests = URL commonsLoggingTests =
(new File(target, "commons-logging-tests.jar")).toURL(); (new File(target, "commons-logging-tests.jar")).toURL();
URL junit = URL junit =
@@ -96,9 +108,12 @@ public class Wrapper {
log4j = log4j =
(new File(System.getProperty("wrapper.log4j"))).toURL(); (new File(System.getProperty("wrapper.log4j"))).toURL();
appender = appender =
(new File(target, "commons-logging-appender.jar")).toURL(); (new File(target, jclappjar)).toURL();
} }
System.out.println("commonsLogging lib is at [" + commonsLogging + "]");
System.out.println("commonsLoggingApi lib is at [" + commonsLoggingApi + "]");
// Construct class loader repository lists for supported scenarios // Construct class loader repository lists for supported scenarios
if ("API".equals(System.getProperty("wrapper.hierarchy"))) { if ("API".equals(System.getProperty("wrapper.hierarchy"))) {
parentList.add(commonsLoggingApi); parentList.add(commonsLoggingApi);