(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-ffa450edef68master
| @@ -604,7 +604,7 @@ | |||||
| Run testcase | 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"> | <target name="run-tests" depends="dump-info,compile-tests" if="junit.present"> | ||||
| @@ -19,11 +19,11 @@ | |||||
| </target> | </target> | ||||
| <target name="test5"> | <target name="test5"> | ||||
| <get src="http://www.apache.org" dest=""/> | |||||
| <get src="http://www.apache.org/" dest=""/> | |||||
| </target> | </target> | ||||
| <target name="test6"> | <target name="test6"> | ||||
| <get src="http://www.apache.org" dest="get.tmp"/> | |||||
| <get src="http://www.apache.org/" dest="get.tmp"/> | |||||
| </target> | </target> | ||||
| </project> | </project> | ||||
| @@ -103,6 +103,16 @@ public class DesirableFilter implements FilenameFilter { | |||||
| if (name.equals(".cvsignore")){ | if (name.equals(".cvsignore")){ | ||||
| return false; | return false; | ||||
| } | } | ||||
| // CVS merge autosaves. | |||||
| if (name.startsWith(".#")) { | |||||
| return false; | |||||
| } | |||||
| // SCCS/CSSC/TeamWare: | |||||
| if (name.equals("SCCS")) { | |||||
| return false; | |||||
| } | |||||
| // default | // default | ||||
| return true; | return true; | ||||
| @@ -89,6 +89,7 @@ public class Project { | |||||
| public static final String JAVA_1_1 = "1.1"; | public static final String JAVA_1_1 = "1.1"; | ||||
| public static final String JAVA_1_2 = "1.2"; | public static final String JAVA_1_2 = "1.2"; | ||||
| public static final String JAVA_1_3 = "1.3"; | 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_START = "@"; | ||||
| public static final String TOKEN_END = "@"; | public static final String TOKEN_END = "@"; | ||||
| @@ -126,6 +127,8 @@ public class Project { | |||||
| javaVersion = JAVA_1_2; | javaVersion = JAVA_1_2; | ||||
| Class.forName("java.lang.StrictMath"); | Class.forName("java.lang.StrictMath"); | ||||
| javaVersion = JAVA_1_3; | javaVersion = JAVA_1_3; | ||||
| Class.forName("java.lang.CharSequence"); | |||||
| javaVersion = JAVA_1_4; | |||||
| } catch (ClassNotFoundException cnfe) { | } catch (ClassNotFoundException cnfe) { | ||||
| // swallow as we've hit the max class version that | // swallow as we've hit the max class version that | ||||
| // we have | // we have | ||||
| @@ -348,7 +351,7 @@ public class Project { | |||||
| throw new BuildException("Ant cannot work on Java 1.0"); | 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); | log("Detected OS: " + System.getProperty("os.name"), MSG_VERBOSE); | ||||
| } | } | ||||
| @@ -330,6 +330,8 @@ public class XSLTProcess extends MatchingTask { | |||||
| try { | try { | ||||
| setProcessor("xalan"); | setProcessor("xalan"); | ||||
| } catch (Throwable e3) { | } catch (Throwable e3) { | ||||
| e2.printStackTrace(); | |||||
| e3.printStackTrace(); | |||||
| throw new BuildException(e1); | throw new BuildException(e1); | ||||
| } | } | ||||
| } | } | ||||
| @@ -106,7 +106,7 @@ public class Path extends DataType implements Cloneable { | |||||
| /** | /** | ||||
| * Helper class, holds the nested <pathelement> values. | |||||
| * Helper class, holds the nested <code><pathelement></code> values. | |||||
| */ | */ | ||||
| public class PathElement { | public class PathElement { | ||||
| private String[] parts; | private String[] parts; | ||||
| @@ -186,7 +186,7 @@ public class Path extends DataType implements Cloneable { | |||||
| } | } | ||||
| /** | /** | ||||
| * Creates the nested <pathelement> element. | |||||
| * Creates the nested <code><pathelement></code> element. | |||||
| */ | */ | ||||
| public PathElement createPathElement() throws BuildException { | public PathElement createPathElement() throws BuildException { | ||||
| if (isReference()) { | if (isReference()) { | ||||
| @@ -198,7 +198,7 @@ public class Path extends DataType implements Cloneable { | |||||
| } | } | ||||
| /** | /** | ||||
| * Adds a nested <fileset> element. | |||||
| * Adds a nested <code><fileset></code> element. | |||||
| */ | */ | ||||
| public void addFileset(FileSet fs) throws BuildException { | public void addFileset(FileSet fs) throws BuildException { | ||||
| if (isReference()) { | if (isReference()) { | ||||
| @@ -209,7 +209,7 @@ public class Path extends DataType implements Cloneable { | |||||
| } | } | ||||
| /** | /** | ||||
| * Creates a nested <path> element. | |||||
| * Creates a nested <code><path></code> element. | |||||
| */ | */ | ||||
| public Path createPath() throws BuildException { | public Path createPath() throws BuildException { | ||||
| if (isReference()) { | if (isReference()) { | ||||