You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2004/10/26 12:12:21 UTC
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/repository GetLibrariesTest.java
bodewig 2004/10/26 03:12:21
Modified: . build.xml
Added: src/testcases/org/apache/tools/ant/taskdefs/optional/repository
GetLibrariesTest.java
Removed: src/testcases/org/apache/tools/ant/taskdefs/optional
GetLibrariesTest.java
Log:
Move GetLibrariesTest to make tests compile without httpclient
Revision Changes Path
1.435 +7 -6 ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/ant/build.xml,v
retrieving revision 1.434
retrieving revision 1.435
diff -u -r1.434 -r1.435
--- build.xml 25 Oct 2004 23:13:38 -0000 1.434
+++ build.xml 26 Oct 2004 10:12:20 -0000 1.435
@@ -328,7 +328,7 @@
<filename name="${ant.package}/launch/**/*"/>
</selector>
- <selector id="needs.commons.httpclient">
+ <selector id="needs.apache-httpclient">
<filename name="${optional.package}/repository/**/*"/>
</selector>
@@ -568,10 +568,10 @@
</condition>
<!-- http client needs commons logging -->
- <condition property="commons.httpclient.present">
+ <condition property="apache-httpclient.present">
<and>
<available
- classname="org.apache.commons.httpclient.HttpClient"
+ classname="org.apache.apache-httpclient.HttpClient"
classpathref="classpath"/>
<isset property="commons.logging.present"/>
</and>
@@ -695,7 +695,8 @@
<selector refid="needs.jdepend" unless="jdepend.present"/>
<selector refid="needs.swing" unless="swing.present"/>
<selector refid="needs.jsch" unless="jsch.present"/>
- <selector refid="needs.commons.httpclient" unless="commons.httpclient.present"/>
+ <selector refid="needs.apache-httpclient"
+ unless="apache-httpclient.present"/>
</or>
</not>
</selector>
@@ -870,7 +871,7 @@
<selector refid="needs.jdepend"/>
<selector refid="needs.swing"/>
<selector refid="needs.jsch"/>
- <selector refid="needs.commons.httpclient"/>
+ <selector refid="needs.apache-httpclient"/>
</or>
</not>
</and>
@@ -915,7 +916,7 @@
<optional-jar dep="swing"/>
<optional-jar dep="jsch"/>
<optional-jar dep="jdepend"/>
- <optional-jar dep="commons.httpclient"/>
+ <optional-jar dep="apache-httpclient"/>
<jar destfile="${build.lib}/${optional.jars.prefix}-weblogic.jar"
basedir="${build.classes}"
1.1 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/repository/GetLibrariesTest.java
Index: GetLibrariesTest.java
===================================================================
/*
* Copyright 2004 The Apache Software Foundation
*
* Licensed 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.
*
*/
package org.apache.tools.ant.taskdefs.optional.repository;
import org.apache.tools.ant.BuildFileTest;
/**
* test the test libraries stuff.
* skip all the tests if we are offline
*/
public class GetLibrariesTest extends BuildFileTest {
private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
public GetLibrariesTest(String name) {
super(name);
}
public void setUp() {
configureProject(TASKDEFS_DIR + "getlibraries.xml");
}
protected boolean offline() {
return "true".equals(System.getProperty("offline"));
}
public void tearDown() {
executeTarget("cleanup");
}
public void testEmpty() {
expectBuildException("testEmpty",GetLibraries.ERROR_NO_DEST_DIR);
}
public void testEmpty2() {
expectBuildException("testEmpty2", GetLibraries.ERROR_NO_REPOSITORY);
}
public void testEmpty3() {
expectBuildException("testEmpty3", GetLibraries.ERROR_NO_LIBRARIES);
}
public void testNoRepo() {
expectBuildException("testNoRepo", GetLibraries.ERROR_NO_REPOSITORY);
}
public void testUnknownReference() {
expectBuildException("testUnknownReference", "Reference unknown not found.");
}
/**
* refs are broken
* */
public void testFunctionalInline() {
if(offline()) {
return;
}
executeTarget("testFunctionalInline");
}
public void testMavenInline() {
if (offline()) {
return;
}
executeTarget("testMavenInline");
}
public void testTwoRepositories() {
expectBuildException("testTwoRepositories", GetLibraries.ERROR_ONE_REPOSITORY_ONLY);
}
public void testMavenInlineBadURL() {
if (offline()) {
return;
}
expectBuildException("testTwoRepositories",
GetLibraries.ERROR_INCOMPLETE_RETRIEVAL);
}
public void testRenaming() {
if (offline()) {
return;
}
executeTarget("testRenaming");
}
public void testOverwrite() {
if (offline()) {
return;
}
executeTarget("testOverwrite");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org