Browse Source

Assorted patches:

(1) make Ant JDK 1.4 aware
(2) improved <style> debugging
(3) bring DesirableFilter in line with defualt excludes
(4) use correct URL syntax in <get>'s unit test
(5) improve JavaDoc comments in Path.java
(6) description for test target in Ant's build file

Submitted by:	Jesse Glick <Jesse.Glick@netbeans.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269014 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
9f4642716c
6 changed files with 23 additions and 8 deletions
  1. +1
    -1
      build.xml
  2. +2
    -2
      src/etc/testcases/taskdefs/get.xml
  3. +10
    -0
      src/main/org/apache/tools/ant/DesirableFilter.java
  4. +4
    -1
      src/main/org/apache/tools/ant/Project.java
  5. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  6. +4
    -4
      src/main/org/apache/tools/ant/types/Path.java

+ 1
- 1
build.xml View File

@@ -604,7 +604,7 @@
Run testcase
===================================================================
-->
<target name="test" depends="run-tests"/>
<target name="test" depends="run-tests" description="--> run JUnit tests"/>

<target name="run-tests" depends="dump-info,compile-tests" if="junit.present">



+ 2
- 2
src/etc/testcases/taskdefs/get.xml View File

@@ -19,11 +19,11 @@
</target>

<target name="test5">
<get src="http://www.apache.org" dest=""/>
<get src="http://www.apache.org/" dest=""/>
</target>

<target name="test6">
<get src="http://www.apache.org" dest="get.tmp"/>
<get src="http://www.apache.org/" dest="get.tmp"/>
</target>

</project>

+ 10
- 0
src/main/org/apache/tools/ant/DesirableFilter.java View File

@@ -103,6 +103,16 @@ public class DesirableFilter implements FilenameFilter {
if (name.equals(".cvsignore")){
return false;
}

// CVS merge autosaves.
if (name.startsWith(".#")) {
return false;
}

// SCCS/CSSC/TeamWare:
if (name.equals("SCCS")) {
return false;
}
// default
return true;


+ 4
- 1
src/main/org/apache/tools/ant/Project.java View File

@@ -89,6 +89,7 @@ public class Project {
public static final String JAVA_1_1 = "1.1";
public static final String JAVA_1_2 = "1.2";
public static final String JAVA_1_3 = "1.3";
public static final String JAVA_1_4 = "1.4";

public static final String TOKEN_START = "@";
public static final String TOKEN_END = "@";
@@ -126,6 +127,8 @@ public class Project {
javaVersion = JAVA_1_2;
Class.forName("java.lang.StrictMath");
javaVersion = JAVA_1_3;
Class.forName("java.lang.CharSequence");
javaVersion = JAVA_1_4;
} catch (ClassNotFoundException cnfe) {
// swallow as we've hit the max class version that
// we have
@@ -348,7 +351,7 @@ public class Project {
throw new BuildException("Ant cannot work on Java 1.0");
}

log("Detected Java Version: " + javaVersion, MSG_VERBOSE);
log("Detected Java version: " + javaVersion + " in: " + System.getProperty("java.home"), MSG_VERBOSE);

log("Detected OS: " + System.getProperty("os.name"), MSG_VERBOSE);
}


+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -330,6 +330,8 @@ public class XSLTProcess extends MatchingTask {
try {
setProcessor("xalan");
} catch (Throwable e3) {
e2.printStackTrace();
e3.printStackTrace();
throw new BuildException(e1);
}
}


+ 4
- 4
src/main/org/apache/tools/ant/types/Path.java View File

@@ -106,7 +106,7 @@ public class Path extends DataType implements Cloneable {


/**
* Helper class, holds the nested <pathelement> values.
* Helper class, holds the nested <code>&lt;pathelement&gt;</code> values.
*/
public class PathElement {
private String[] parts;
@@ -186,7 +186,7 @@ public class Path extends DataType implements Cloneable {
}

/**
* Creates the nested <pathelement> element.
* Creates the nested <code>&lt;pathelement&gt;</code> element.
*/
public PathElement createPathElement() throws BuildException {
if (isReference()) {
@@ -198,7 +198,7 @@ public class Path extends DataType implements Cloneable {
}

/**
* Adds a nested <fileset> element.
* Adds a nested <code>&lt;fileset&gt;</code> element.
*/
public void addFileset(FileSet fs) throws BuildException {
if (isReference()) {
@@ -209,7 +209,7 @@ public class Path extends DataType implements Cloneable {
}

/**
* Creates a nested <path> element.
* Creates a nested <code>&lt;path&gt;</code> element.
*/
public Path createPath() throws BuildException {
if (isReference()) {


Loading…
Cancel
Save