svn commit: r582364 - /ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java
Author: jglick Date: Fri Oct 5 10:53:03 2007 New Revision: 582364 URL: http://svn.apache.org/viewvc?rev=582364view=rev Log: Javadoc clarification for Resource.getLastModified. Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java?rev=582364r1=582363r2=582364view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/Resource.java Fri Oct 5 10:53:03 2007 @@ -172,10 +172,11 @@ } /** - * Tells the modification time in milliseconds since 01.01.1970 . + * Tells the modification time in milliseconds since 01.01.1970 (the epoch). * - * @return 0 if the resource does not exist to mirror the behavior - * of [EMAIL PROTECTED] java.io.File File}. + * @return the modification time, if that is meaningful (e.g. for a file resource which exists); + * 0 if the resource does not exist, to mirror the behavior of [EMAIL PROTECTED] java.io.File#lastModified}; + * or 0 if the notion of modification time is meaningless for this class of resource (e.g. an inline string) */ public long getLastModified() { if (isReference()) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581748 - in /ant/core/trunk: ./ src/main/org/apache/tools/ant/ src/main/org/apache/tools/ant/taskdefs/ src/main/org/apache/tools/ant/taskdefs/optional/depend/ src/main/org/apache/tools/an
Author: jglick Date: Wed Oct 3 16:44:10 2007 New Revision: 581748 URL: http://svn.apache.org/viewvc?rev=581748view=rev Log: Various microoptimizations to reduce I/O load of common tasks, esp. no-op javac and depend. Many inner loops altered to make just 1-2 system calls rather than 4-5. You can easily see how wasteful the previous code was, and find the culprits, by patching r/o java.io.File methods and adding to -Xbootclasspath/p (or use AspectJ). E.g.: public boolean isDirectory() { System.err.println(isDirectory: + this); if (Math.random() .01) Thread.dumpStack(); // as before... } Ant still makes an order of magnitude more system calls to do what seem like simple operations than you would think necessary, but this patch should at least improve the situation. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java ant/core/trunk/src/main/org/apache/tools/ant/util/SourceFileScanner.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=581748r1=581747r2=581748view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Wed Oct 3 16:44:10 2007 @@ -196,6 +196,10 @@ Other changes: -- + +* Various small optimizations speed up common tasks such as javac on large + filesets, reducing both I/O and CPU usage. + * Profiling logger has been added with basic profiling capabilities. * script now has basic support for JavaFX scripts Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=581748r1=581747r2=581748view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Wed Oct 3 16:44:10 2007 @@ -1065,28 +1065,25 @@ protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new BuildException(dir must not be null.); -} else if (!dir.exists()) { -throw new BuildException(dir + doesn't exist.); -} else if (!dir.isDirectory()) { -throw new BuildException(dir + is not a directory.); } +String[] newfiles = dir.list(); +if (newfiles == null) { +if (!dir.exists()) { +throw new BuildException(dir + doesn't exist.); +} else if (!dir.isDirectory()) { +throw new BuildException(dir + is not a directory.); +} else { +throw new BuildException(IO error scanning directory ' + + dir.getAbsolutePath() + '); +} +} +scandir(dir, vpath, fast, newfiles); +} +private void scandir(File dir, String vpath, boolean fast, String[] newfiles) { // avoid double scanning of directories, can only happen in fast mode if (fast hasBeenScanned(vpath)) { return; } -String[] newfiles = dir.list(); - -if (newfiles == null) { -/* - * two reasons are mentioned in the API docs for File.list - * (1) dir is not a directory. This is impossible as - * we wouldn't get here in this case. - * (2) an IO error occurred (why doesn't it throw an exception - * then???) - */ -throw new BuildException(IO error scanning directory ' - + dir.getAbsolutePath() + '); -} if (!followSymlinks) { Vector noLinks = new Vector(); for (int i = 0; i newfiles.length; i++) { @@ -1112,25 +1109,26 @@ for (int i = 0; i newfiles.length; i++) { String name = vpath + newfiles[i]; File file = new File(dir, newfiles[i]); -if (file.isDirectory()) { +String[] children = file.list(); +if (children == null) { // probably file if (isIncluded(name)) { -accountForIncludedDir(name, file, fast); +accountForIncludedFile(name, file); +} else { +everythingIncluded = false; +filesNotIncluded.addElement(name); +} +} else { // dir +if (isIncluded(name)) { +accountForIncludedDir(name, file, fast
svn commit: r581753 - in /ant/core/branches/ANT_17_BRANCH: ./ src/main/org/apache/tools/ant/ src/main/org/apache/tools/ant/taskdefs/ src/main/org/apache/tools/ant/taskdefs/optional/depend/ src/main/or
Author: jglick Date: Wed Oct 3 16:58:14 2007 New Revision: 581753 URL: http://svn.apache.org/viewvc?rev=581753view=rev Log: optimizations; merge of rev 581748 from trunk Modified: ant/core/branches/ANT_17_BRANCH/WHATSNEW ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DirectoryScanner.java ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/Rmic.java ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ResourceUtils.java ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/SourceFileScanner.java Modified: ant/core/branches/ANT_17_BRANCH/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/WHATSNEW?rev=581753r1=581752r2=581753view=diff == --- ant/core/branches/ANT_17_BRANCH/WHATSNEW (original) +++ ant/core/branches/ANT_17_BRANCH/WHATSNEW Wed Oct 3 16:58:14 2007 @@ -130,6 +130,12 @@ Other changes: -- + +* Various small optimizations speed up common tasks such as javac on large + filesets, reducing both I/O and CPU usage. + +* Profiling logger has been added with basic profiling capabilities. + * script now has basic support for JavaFX scripts * SSH task can now take a command parameter containing the commands to execute. Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DirectoryScanner.java URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=581753r1=581752r2=581753view=diff == --- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DirectoryScanner.java (original) +++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DirectoryScanner.java Wed Oct 3 16:58:14 2007 @@ -1065,28 +1065,25 @@ protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new BuildException(dir must not be null.); -} else if (!dir.exists()) { -throw new BuildException(dir + doesn't exist.); -} else if (!dir.isDirectory()) { -throw new BuildException(dir + is not a directory.); } +String[] newfiles = dir.list(); +if (newfiles == null) { +if (!dir.exists()) { +throw new BuildException(dir + doesn't exist.); +} else if (!dir.isDirectory()) { +throw new BuildException(dir + is not a directory.); +} else { +throw new BuildException(IO error scanning directory ' + + dir.getAbsolutePath() + '); +} +} +scandir(dir, vpath, fast, newfiles); +} +private void scandir(File dir, String vpath, boolean fast, String[] newfiles) { // avoid double scanning of directories, can only happen in fast mode if (fast hasBeenScanned(vpath)) { return; } -String[] newfiles = dir.list(); - -if (newfiles == null) { -/* - * two reasons are mentioned in the API docs for File.list - * (1) dir is not a directory. This is impossible as - * we wouldn't get here in this case. - * (2) an IO error occurred (why doesn't it throw an exception - * then???) - */ -throw new BuildException(IO error scanning directory ' - + dir.getAbsolutePath() + '); -} if (!followSymlinks) { Vector noLinks = new Vector(); for (int i = 0; i newfiles.length; i++) { @@ -1112,25 +1109,26 @@ for (int i = 0; i newfiles.length; i++) { String name = vpath + newfiles[i]; File file = new File(dir, newfiles[i]); -if (file.isDirectory()) { +String[] children = file.list(); +if (children == null) { // probably file if (isIncluded(name)) { -accountForIncludedDir(name, file, fast); +accountForIncludedFile(name, file); +} else { +everythingIncluded = false; +filesNotIncluded.addElement(name); +} +} else { // dir +if (isIncluded(name)) { +accountForIncludedDir(name, file, fast, children); } else { everythingIncluded = false; dirsNotIncluded.addElement(name); if (fast couldHoldIncluded(name)) { -scandir(file, name + File.separator, fast
svn commit: r581206 - /ant/core/trunk/WHATSNEW
Author: jglick Date: Tue Oct 2 05:27:20 2007 New Revision: 581206 URL: http://svn.apache.org/viewvc?rev=581206view=rev Log: noting #43398 Modified: ant/core/trunk/WHATSNEW Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=581206r1=581205r2=581206view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Tue Oct 2 05:27:20 2007 @@ -84,6 +84,11 @@ Fixed bugs: --- + +* The default logger was failing to print complete stack traces for exceptions + other than BuildException, thus omitting often important diagnostic + information. Bugzilla 43398. + * Error in FTP task Bugzilla report 41724 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581208 - /ant/core/branches/ANT_17_BRANCH/WHATSNEW
Author: jglick Date: Tue Oct 2 05:28:38 2007 New Revision: 581208 URL: http://svn.apache.org/viewvc?rev=581208view=rev Log: noting #43398 Modified: ant/core/branches/ANT_17_BRANCH/WHATSNEW Modified: ant/core/branches/ANT_17_BRANCH/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/WHATSNEW?rev=581208r1=581207r2=581208view=diff == --- ant/core/branches/ANT_17_BRANCH/WHATSNEW (original) +++ ant/core/branches/ANT_17_BRANCH/WHATSNEW Tue Oct 2 05:28:38 2007 @@ -24,6 +24,11 @@ Fixed bugs: --- + +* The default logger was failing to print complete stack traces for exceptions + other than BuildException, thus omitting often important diagnostic + information. Bugzilla 43398. + * Error in FTP task Bugzilla report 41724 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581377 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/scm/
Author: jglick Date: Tue Oct 2 13:47:50 2007 New Revision: 581377 URL: http://svn.apache.org/viewvc?rev=581377view=rev Log: Removing empty package. Removed: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/scm/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581395 - /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java
Author: jglick Date: Tue Oct 2 14:39:20 2007 New Revision: 581395 URL: http://svn.apache.org/viewvc?rev=581395view=rev Log: optimization; merge of 581394 from trunk Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java?rev=581395r1=581394r2=581395view=diff == --- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java (original) +++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/resources/Union.java Tue Oct 2 14:39:20 2007 @@ -22,6 +22,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashSet; +import java.util.Set; import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.types.ResourceCollection; @@ -100,14 +102,16 @@ return Collections.EMPTY_LIST; } //preserve order-encountered using a list; enforce set logic manually: +// (LinkedHashSet better, but JDK 1.4+) ArrayList union = new ArrayList(rc.size() * 2); +Set _union = new HashSet(rc.size() * 2); for (Iterator rcIter = rc.iterator(); rcIter.hasNext();) { for (Iterator r = nextRC(rcIter).iterator(); r.hasNext();) { Object o = r.next(); if (asString) { o = o.toString(); } -if (!(union.contains(o))) { +if (_union.add(o)) { union.add(o); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581076 - /ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java
Author: jglick Date: Mon Oct 1 14:35:46 2007 New Revision: 581076 URL: http://svn.apache.org/viewvc?rev=581076view=rev Log: #43398: always print stack trace for non-BuildException's. Modified: ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java?rev=581076r1=581075r2=581076view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java Mon Oct 1 14:35:46 2007 @@ -149,6 +149,15 @@ message.append(getBuildFailedMessage()); message.append(StringUtils.LINE_SEP); +while (error instanceof BuildException) { // #43398 +Throwable cause = ((BuildException) error).getCause(); +if (cause != null cause.toString().equals(error.getMessage())) { +error = cause; +} else { +break; +} +} + if (Project.MSG_VERBOSE = msgOutputLevel || !(error instanceof BuildException)) { message.append(StringUtils.getStackTrace(error)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581086 - /ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java
Author: jglick Date: Mon Oct 1 14:49:24 2007 New Revision: 581086 URL: http://svn.apache.org/viewvc?rev=581086view=rev Log: merge rev 559393: test compilability Modified: ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java Modified: ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java?rev=581086r1=581085r2=581086view=diff == --- ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java (original) +++ ant/core/branches/ANT_17_BRANCH/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java Mon Oct 1 14:49:24 2007 @@ -274,30 +274,30 @@ public void testNoVersionInfoIgnore() { executeTarget(testNoVersionInfoIgnore); -assertTrue( getFullLog().contains(No Implementation-Title set.) ); -assertTrue( getFullLog().contains(No Implementation-Version set.) ); -assertTrue( getFullLog().contains(No Implementation-Vendor set.) ); +assertTrue( getFullLog().indexOf(No Implementation-Title set.) -1 ); +assertTrue( getFullLog().indexOf(No Implementation-Version set.) -1 ); +assertTrue( getFullLog().indexOf(No Implementation-Vendor set.) -1 ); } public void testNoVersionInfoWarn() { executeTarget(testNoVersionInfoWarn); -assertTrue( getLog().contains(No Implementation-Title set.) ); -assertTrue( getLog().contains(No Implementation-Version set.) ); -assertTrue( getLog().contains(No Implementation-Vendor set.) ); +assertTrue( getLog().indexOf(No Implementation-Title set.) -1 ); +assertTrue( getLog().indexOf(No Implementation-Version set.) -1 ); +assertTrue( getLog().indexOf(No Implementation-Vendor set.) -1 ); } public void testNoVersionInfoNoStrict() { executeTarget(testNoVersionInfoNoStrict); -assertFalse( getLog().contains(No Implementation-Title set.) ); -assertFalse( getLog().contains(No Implementation-Version set.) ); -assertFalse( getLog().contains(No Implementation-Vendor set.) ); +assertFalse( getLog().indexOf(No Implementation-Title set.) -1 ); +assertFalse( getLog().indexOf(No Implementation-Version set.) -1 ); +assertFalse( getLog().indexOf(No Implementation-Vendor set.) -1 ); } public void testHasVersionInfo() { executeTarget(testHasVersionInfo); -assertFalse( getLog().contains(No Implementation-Title set.) ); -assertFalse( getLog().contains(No Implementation-Version set.) ); -assertFalse( getLog().contains(No Implementation-Vendor set.) ); +assertFalse( getLog().indexOf(No Implementation-Title set.) -1 ); +assertFalse( getLog().indexOf(No Implementation-Version set.) -1 ); +assertFalse( getLog().indexOf(No Implementation-Vendor set.) -1 ); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r581091 - /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java
Author: jglick Date: Mon Oct 1 15:01:42 2007 New Revision: 581091 URL: http://svn.apache.org/viewvc?rev=581091view=rev Log: #43398: print full stack trace (merge of rev 581076 from trunk) Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java?rev=581091r1=581090r2=581091view=diff == --- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java (original) +++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/DefaultLogger.java Mon Oct 1 15:01:42 2007 @@ -149,6 +149,15 @@ message.append(getBuildFailedMessage()); message.append(StringUtils.LINE_SEP); +while (error instanceof BuildException) { // #43398 +Throwable cause = ((BuildException) error).getCause(); +if (cause != null cause.toString().equals(error.getMessage())) { +error = cause; +} else { +break; +} +} + if (Project.MSG_VERBOSE = msgOutputLevel || !(error instanceof BuildException)) { message.append(StringUtils.getStackTrace(error)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r499378 - /ant/core/trunk/docs/manual/install.html
Author: jglick Date: Wed Jan 24 04:22:40 2007 New Revision: 499378 URL: http://svn.apache.org/viewvc?view=revrev=499378 Log: More on $CLASSPATH. Modified: ant/core/trunk/docs/manual/install.html Modified: ant/core/trunk/docs/manual/install.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/install.html?view=diffrev=499378r1=499377r2=499378 == --- ant/core/trunk/docs/manual/install.html (original) +++ ant/core/trunk/docs/manual/install.html Wed Jan 24 04:22:40 2007 @@ -235,39 +235,45 @@ pThe external libraries required by each of the optional tasks is detailed in the a href=#librarydependenciesLibrary Dependencies/a section. These external -libraries must be added to Ant's classpath, in any of the following ways +libraries must be added to Ant's classpath, in any of the following ways: /p ul -liIn ANT_HOME/lib. This makes the JAR files available to all -Ant users and builds/li - -li -In ${user.home}/.ant/lib . This is a new feature since Ant1.6, -and allows different users to add new libraries to Ant. All JAR files +lip +In codeiANT_HOME/i/lib/code. This makes the JAR files available to all +Ant users and builds. +/p/li + +lip +In code${user.home}/.ant/lib/code (as of Ant 1.6). This +allows different users to add new libraries to Ant. All JAR files added to this directory are available to command-line Ant. -/li +/p/li -li +lip On the command line with a code-lib/code parameter. This lets you add new JAR files on a case-by-case basis. -/li +/p/li -liIn the CLASSPATH environment variable. Avoid this; it makes +lip +In the codeCLASSPATH/code environment variable. Avoid this; it makes the JAR files visible to iall/i Java applications, and causes -no end of support calls. +no end of support calls. See a href=#classpathbelow/a for details. +/p /li -li +lip In some codelt;classpathgt;/code accepted by the task itself. For example, as of Ant 1.7.0 you can run the codelt;junitgt;/code task without codejunit.jar/code in Ant's own classpath, so long as it is included (along with your program and tests) in the classpath -passed when running the task. Where possible, this option is generally +passed when running the task. +/pp +Where possible, this option is generally to be preferred, as the Ant script itself can determine the best path to load the library from: via relative path from the basedir (if you keep the library under version control with your project), according to Ant properties, environment variables, Ivy downloads, whatever you like. -/li +/p/li /ul @@ -277,10 +283,10 @@ added to a project are automatically added to ant's classpath. /p -h3a name=classpathThe CLASSPATH environment variable/a/h3 +h3a name=classpathThe codeCLASSPATH/code environment variable/a/h3 p -The CLASSPATH environment variable is a source of many Ant support queries. As +The codeCLASSPATH/code environment variable is a source of many Ant support queries. As the round trip time for diagnosis on the Ant user mailing list can be slow, and because filing bug reports complaining about 'ant.bat' not working will be rejected by the developers as WORKSFORME this is a configuration problem, not a @@ -290,21 +296,21 @@ /p ol -liDo not ever set CLASSPATH. Ant does not need it, it only causes confusion +liDo not ever set codeCLASSPATH/code. Ant does not need it, it only causes confusion and breaks things. /li liIf you ignore the previous rule, do not ever, ever, put quotes in the -CLASSPATH, even if there is a space in a directory. This will break Ant, and it +codeCLASSPATH/code, even if there is a space in a directory. This will break Ant, and it is not needed. /li liIf you ignore the first rule, do not ever, ever, have a trailing backslash -in a CLASSPATH, as it breaks Ant's ability to quote the string. Again, this is -not needed for the correct operation of the CLASSPATH environment variable, even +in a codeCLASSPATH/code, as it breaks Ant's ability to quote the string. Again, this is +not needed for the correct operation of the codeCLASSPATH/code environment variable, even if a DOS directory is to be added to the path. /li -liYou can stop Ant using the CLASSPATH environment variable by setting the +liYou can stop Ant using the codeCLASSPATH/code environment variable by setting the code-noclasspath/code option on the command line. This is an easy way to test for classpath-related problems./li @@ -312,14 +318,29 @@ p -The usual symptom of CLASSPATH problems is that ant will not run with some error -about not being able to find codeorg.apache.tools.Ant.main/code, or, if you have got
svn commit: r499080 - /ant/core/trunk/docs/manual/install.html
Author: jglick Date: Tue Jan 23 08:59:06 2007 New Revision: 499080 URL: http://svn.apache.org/viewvc?view=revrev=499080 Log: #38799 cont'd: clearer docs on avoiding -lib. Modified: ant/core/trunk/docs/manual/install.html Modified: ant/core/trunk/docs/manual/install.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/install.html?view=diffrev=499080r1=499079r2=499080 == --- ant/core/trunk/docs/manual/install.html (original) +++ ant/core/trunk/docs/manual/install.html Tue Jan 23 08:59:06 2007 @@ -256,6 +256,19 @@ the JAR files visible to iall/i Java applications, and causes no end of support calls. /li + +li +In some codelt;classpathgt;/code accepted by the task itself. +For example, as of Ant 1.7.0 you can run the codelt;junitgt;/code +task without codejunit.jar/code in Ant's own classpath, so long as +it is included (along with your program and tests) in the classpath +passed when running the task. Where possible, this option is generally +to be preferred, as the Ant script itself can determine the best path +to load the library from: via relative path from the basedir (if you +keep the library under version control with your project), according +to Ant properties, environment variables, Ivy downloads, whatever you like. +/li + /ul p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r498519 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Author: jglick Date: Sun Jan 21 20:04:15 2007 New Revision: 498519 URL: http://svn.apache.org/viewvc?view=revrev=498519 Log: #41422: junit in Ant 1.7.0 could throw NPE if no classpath was defined. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diffrev=498519r1=498518r2=498519 == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Sun Jan 21 20:04:15 2007 @@ -7,6 +7,9 @@ Fixed bugs: --- +* junit in Ant 1.7.0 could throw NPE if no classpath was defined. + Bugzilla report 41422. + * In Ant 1.7.0, fileset in javadoc does not by default include only **/*.java as the documentation claims and earlier revisions did. Bugzilla report 41264. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java?view=diffrev=498519r1=498518r2=498519 == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Sun Jan 21 20:04:15 2007 @@ -756,7 +756,10 @@ if (splitJunit) { Path path = new Path(getProject()); path.add(antRuntimeClasses); -path.add(getCommandline().getClasspath()); +Path extra = getCommandline().getClasspath(); +if (extra != null) { +path.add(extra); +} mirrorLoader = new SplitLoader(myLoader, path); } else { mirrorLoader = myLoader; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r491821 - /ant/core/trunk/xdocs/index.xml
Author: jglick Date: Tue Jan 2 07:54:19 2007 New Revision: 491821 URL: http://svn.apache.org/viewvc?view=revrev=491821 Log: Home page still says manual is for 1.6.5! Modified: ant/core/trunk/xdocs/index.xml Modified: ant/core/trunk/xdocs/index.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/index.xml?view=diffrev=491821r1=491820r2=491821 == --- ant/core/trunk/xdocs/index.xml (original) +++ ant/core/trunk/xdocs/index.xml Tue Jan 2 07:54:19 2007 @@ -122,7 +122,7 @@ section name=Documentation p -You can view the documentation for the current release (Apache Ant 1.6.5) +You can view the documentation for the current release (Apache Ant 1.7.0) a href=manual/index.htmlonline/a /p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r491150 - in /ant/core/trunk: WHATSNEW src/etc/testcases/taskdefs/javadoc/javadoc.xml src/main/org/apache/tools/ant/taskdefs/Javadoc.java src/tests/junit/org/apache/tools/ant/taskdefs/Java
Author: jglick Date: Fri Dec 29 17:44:10 2006 New Revision: 491150 URL: http://svn.apache.org/viewvc?view=revrev=491150 Log: #41264: In Ant 1.7.0, fileset in javadoc does not by default include only **/*.java as the documentation claims and earlier revisions did. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diffrev=491150r1=491149r2=491150 == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Fri Dec 29 17:44:10 2006 @@ -6,6 +6,11 @@ Fixed bugs: --- + +* In Ant 1.7.0, fileset in javadoc does not by default include only + **/*.java as the documentation claims and earlier revisions did. + Bugzilla report 41264. + * SPI support in jar was broken. Bugzilla report 41201. Modified: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml?view=diffrev=491150r1=491149r2=491150 == --- ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml (original) +++ ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml Fri Dec 29 17:44:10 2006 @@ -139,4 +139,16 @@ fileset refid=fileset.simple / /javadoc /target + + target name=nonJavaIncludes +delete dir=${javadoc}/ +mkdir dir=${javadoc}/ +echo file=${javadoc}/stuff1.javapublic class stuff1 {}/echo +echo file=${javadoc}/stuff2.javapublic class stuff2 {}/echo +echo file=${javadoc}/stuff.propertiesx=4/echo +javadoc destdir=${javadoc} failonerror=true + fileset dir=${javadoc}/ +/javadoc + /target + /project Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?view=diffrev=491150r1=491149r2=491150 == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Fri Dec 29 17:44:10 2006 @@ -2199,11 +2199,12 @@ if (rc instanceof FileSet) { FileSet fs = (FileSet) rc; if (!fs.hasPatterns() !fs.hasSelectors()) { -fs = (FileSet) fs.clone(); -fs.createInclude().setName(**/*.java); +FileSet fs2 = (FileSet) fs.clone(); +fs2.createInclude().setName(**/*.java); if (includeNoSourcePackages) { -fs.createInclude().setName(**/package.html); +fs2.createInclude().setName(**/package.html); } +rc = fs2; } } Iterator iter = rc.iterator(); Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java?view=diffrev=491150r1=491149r2=491150 == --- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java (original) +++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java Fri Dec 29 17:44:10 2006 @@ -131,4 +131,9 @@ public void testDoublyNestedFilesetNoPatterns() throws Exception { executeTarget(doublyNestedFilesetNoPatterns); } + +public void testNonJavaIncludes() throws Exception { // #41264 +executeTarget(nonJavaIncludes); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r489532 - /ant/core/trunk/xdocs/external.xml
Author: jglick Date: Thu Dec 21 17:01:27 2006 New Revision: 489532 URL: http://svn.apache.org/viewvc?view=revrev=489532 Log: Update for NB 6.0 + Ant 1.7.0. Modified: ant/core/trunk/xdocs/external.xml Modified: ant/core/trunk/xdocs/external.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/external.xml?view=diffrev=489532r1=489531r2=489532 == --- ant/core/trunk/xdocs/external.xml (original) +++ ant/core/trunk/xdocs/external.xml Thu Dec 21 17:01:27 2006 @@ -3554,7 +3554,7 @@ table class=externals tr thCompatibility:/th -tdbundles 1.6.5 for NetBeans 5.0 and 5.5/td +tdbundles 1.6.5 for NetBeans 5.0 and 5.5; 1.7.0 for NetBeans 6.0/td /tr tr thURL:/th - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483652 - /ant/core/trunk/WHATSNEW
Author: jglick Date: Thu Dec 7 12:40:25 2006 New Revision: 483652 URL: http://svn.apache.org/viewvc?view=revrev=483652 Log: Minor edits. Modified: ant/core/trunk/WHATSNEW Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diffrev=483652r1=483651r2=483652 == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Thu Dec 7 12:40:25 2006 @@ -4,9 +4,9 @@ Changes that could break older environments: --- -* Initial support for JDK6 scripting script. - *script* will now use javax.scripting if bsf is - not available, or if explicilty requested by using +* Initial support for JDK 6 (JSR 223) scripting. + *script* tasks will now use javax.scripting if BSF is + not available, or if explicitly requested by using a manager attribute. Fixed bugs: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483668 - in /ant/core/trunk/src/main/org/apache/tools/ant/util: ScriptRunnerBase.java optional/JavaxScriptRunner.java optional/ScriptRunner.java
Author: jglick Date: Thu Dec 7 13:07:38 2006 New Revision: 483668 URL: http://svn.apache.org/viewvc?view=revrev=483668 Log: Correcting typo. Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java?view=diffrev=483668r1=483667r2=483668 == --- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java Thu Dec 7 13:07:38 2006 @@ -32,8 +32,9 @@ /** * This is a common abstract base case for script runners. - * These classes need to implement executeScript, evalulateScript + * These classes need to implement executeScript, evaluateScript * and supportsLanguage. + * @since Ant 1.7.0 */ public abstract class ScriptRunnerBase { /** Whether to keep the engine between calls to execute/eval */ @@ -115,7 +116,7 @@ *execution. * @return the result of evalulating the script. */ -public abstract Object evalulateScript(String execName); +public abstract Object evaluateScript(String execName); /** * Check if a script engine can be created for Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java?view=diffrev=483668r1=483667r2=483668 == --- ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java Thu Dec 7 13:07:38 2006 @@ -15,6 +15,7 @@ * limitations under the License. * */ + package org.apache.tools.ant.util.optional; import org.apache.tools.ant.BuildException; @@ -25,10 +26,9 @@ import org.apache.tools.ant.util.ReflectUtil; import org.apache.tools.ant.util.ReflectWrapper; - /** - * This class is used to run javax.script scripts - * + * This class is used to run scripts using JSR 223. + * @since Ant 1.7.0 */ public class JavaxScriptRunner extends ScriptRunnerBase { private ReflectWrapper engine; @@ -66,7 +66,7 @@ * @exception BuildException if someting goes wrong exectuing the script. */ public void executeScript(String execName) throws BuildException { -evalulateScript(execName); +evaluateScript(execName); } /** @@ -77,7 +77,7 @@ * @return the result of the evalulation * @exception BuildException if someting goes wrong exectuing the script. */ -public Object evalulateScript(String execName) throws BuildException { +public Object evaluateScript(String execName) throws BuildException { checkLanguage(); ClassLoader origLoader = replaceContextLoader(); try { Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java?view=diffrev=483668r1=483667r2=483668 == --- ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java Thu Dec 7 13:07:38 2006 @@ -119,7 +119,7 @@ * @return the result of the evalulation * @exception BuildException if someting goes wrong exectuing the script. */ -public Object evalulateScript(String execName) +public Object evaluateScript(String execName) throws BuildException { checkLanguage(); ClassLoader origLoader = replaceContextLoader(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r483672 - in /ant/core/trunk: build.xml src/main/org/apache/tools/ant/types/optional/ScriptFilter.java
Author: jglick Date: Thu Dec 7 13:24:20 2006 New Revision: 483672 URL: http://svn.apache.org/viewvc?view=revrev=483672 Log: It is now possible to build Ant without BSF and then run using JSR scripting. Modified: ant/core/trunk/build.xml ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java Modified: ant/core/trunk/build.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diffrev=483672r1=483671r2=483672 == --- ant/core/trunk/build.xml (original) +++ ant/core/trunk/build.xml Thu Dec 7 13:24:20 2006 @@ -241,11 +241,8 @@ selector id=needs.apache-bsf or - filename name=${optional.package}/Script*/ - filename name=${optional.package}/script/**/*/ - filename name=${optional.type.package}/*Script*/ - filename name=${util.package}/Script*/ - filename name=${util.package}/optional/Script*/ + filename name=${util.package}/ScriptRunner.*/ + filename name=${util.package}/optional/ScriptRunner*/ /or /selector Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java?view=diffrev=483672r1=483671r2=483672 == --- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java Thu Dec 7 13:24:20 2006 @@ -15,13 +15,14 @@ * limitations under the License. * */ + package org.apache.tools.ant.types.optional; import org.apache.tools.ant.filters.TokenFilter; import java.io.File; import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.util.optional.ScriptRunner; - +import org.apache.tools.ant.util.ScriptRunnerBase; +import org.apache.tools.ant.util.ScriptRunnerHelper; /** * Most of this is CAP (Cut And Paste) from the Script task @@ -40,7 +41,7 @@ /** the token used by the script */ private String token; -private ScriptRunner runner = new ScriptRunner(); +private ScriptRunnerHelper runner = new ScriptRunnerHelper(); /** * Defines the language (required). @@ -61,7 +62,6 @@ return; } initialized = true; -runner.bindToComponent(this); } /** @@ -93,7 +93,9 @@ public String filter(String token) { init(); setToken(token); -runner.executeScript(ant_filter); +ScriptRunnerBase srb = runner.getScriptRunner(); +srb.bindToComponent(this); +srb.executeScript(ant_filter); return getToken(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481878 - /ant/core/trunk/xdocs/external.xml
Author: jglick Date: Sun Dec 3 12:34:44 2006 New Revision: 481878 URL: http://svn.apache.org/viewvc?view=revrev=481878 Log: #41098: Virtual Ant. Modified: ant/core/trunk/xdocs/external.xml Modified: ant/core/trunk/xdocs/external.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/external.xml?view=diffrev=481878r1=481877r2=481878 == --- ant/core/trunk/xdocs/external.xml (original) +++ ant/core/trunk/xdocs/external.xml Sun Dec 3 12:34:44 2006 @@ -3621,6 +3621,38 @@ /table /subsection + subsection name=Virtual Ant +p + Instead of manually creating build scripts in XML, Virtual Ant provides a fully virtual file system + where you can run your tasks in real time and see the results. Everything that you do is recorded and + turned into an Ant build script. +/p +table class=externals + tr +thCompatibility:/th +td + Ant 1.6.5 onwards +/td + /tr + tr +thURL:/th +td + a href=http://www.placidsystems.com/virtualant/;http://www.placidsystems.com/virtualant//a +/td + /tr + tr +thContact:/th +td + a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a +/td + /tr + tr +thLicense:/th +tdCommercial; OpenSource licenses available too./td + /tr +/table + /subsection + subsection name=WebSphere Studio Application Developer pWSAD features Ant integrate by virtue of being built on the Eclipse tools platform./p @@ -3678,4 +3710,4 @@ /section /body -/document \ No newline at end of file +/document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481322 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/IntrospectionHelper.java src/main/org/apache/tools/ant/taskdefs/AntStructure.java
Author: jglick Date: Fri Dec 1 09:50:46 2006 New Revision: 481322 URL: http://svn.apache.org/viewvc?view=revrev=481322 Log: #41058: permit Java 5 enumerations to work like EnumeratedAttribute. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diffrev=481322r1=481321r2=481322 == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Fri Dec 1 09:50:46 2006 @@ -51,6 +51,9 @@ * Do not uppercase the drive letters systematically in FileUtils#normalize. +* Java 5 enumerations may now be used as values in XML attributes in place of + EnumeratedAttribute. Bugzilla 41058. + Changes from Ant 1.7.0Beta3 to Ant 1.7.0RC1 === Modified: ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java?view=diffrev=481322r1=481321r2=481322 == --- ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java Fri Dec 1 09:50:46 2006 @@ -1008,6 +1008,25 @@ } } }; +} else if (reflectedArg.getSuperclass() != null reflectedArg.getSuperclass().getName().equals(java.lang.Enum)) { +return new AttributeSetter(m) { +public void set(Project p, Object parent, String value) +throws InvocationTargetException, IllegalAccessException, BuildException { +try { +m.invoke(parent, new Object[] { +reflectedArg.getMethod(valueOf, new Class[] {String.class}). +invoke(null, new Object[] {value})}); +} catch (InvocationTargetException x) { +if (x.getTargetException() instanceof IllegalArgumentException) { +throw new BuildException(' + value + ' is not a permitted value for + reflectedArg.getName()); +} else { +throw new BuildException(x.getTargetException()); +} +} catch (Exception x) { +throw new BuildException(x); +} +} +}; // worst case. look for a public String constructor and use it // also supports new Whatever(Project, String) as for Path or Reference // This is used (deliberately) for all primitives/wrappers other than Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java?view=diffrev=481322r1=481321r2=481322 == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java Fri Dec 1 09:50:46 2006 @@ -370,6 +370,24 @@ } catch (IllegalAccessException ie) { sb.append(CDATA ); } +} else if (type.getSuperclass() != null type.getSuperclass().getName().equals(java.lang.Enum)) { +try { +Object[] values = (Object[]) type.getMethod(values, null).invoke(null, null); +if (values.length == 0) { +sb.append(CDATA ); +} else { +sb.append('('); +for (int i = 0; i values.length; i++) { +if (i != 0) { +sb.append( | ); +} +sb.append(type.getMethod(name, null).invoke(values[i], null)); +} +sb.append() ); +} +} catch (Exception x) { +sb.append(CDATA ); +} } else { sb.append(CDATA ); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r481329 - /ant/core/trunk/docs/manual/develop.html
Author: jglick Date: Fri Dec 1 10:10:20 2006 New Revision: 481329 URL: http://svn.apache.org/viewvc?view=revrev=481329 Log: Forgot to document #41058! Modified: ant/core/trunk/docs/manual/develop.html Modified: ant/core/trunk/docs/manual/develop.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/develop.html?view=diffrev=481329r1=481328r2=481329 == --- ant/core/trunk/docs/manual/develop.html (original) +++ ant/core/trunk/docs/manual/develop.html Fri Dec 1 10:10:20 2006 @@ -171,6 +171,15 @@ inner codeAddAsisRemove/code class used in codesetCr/code for an example./li + liA (Java 5) enumeration. Ant will call the setter with the enum constant + matching the value given in the build file. This is easier than using + codeEnumeratedAttribute/code and can result in cleaner code, but of course + your task will not run on JDK 1.4 or earlier. Note that any override of + codetoString()/code in the enumeration is ignored; the build file must use + the declared name (see codeEnum.getName()/code). You may wish to use lowercase + enum constant names, in contrast to usual Java style, to look better in build files. + emAs of Ant 1.7.0./em/li + /ul pWhat happens if more than one setter method is present for a given - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r470902 - /ant/core/trunk/WHATSNEW
Author: jglick Date: Fri Nov 3 08:55:42 2006 New Revision: 470902 URL: http://svn.apache.org/viewvc?view=revrev=470902 Log: Typo in old changelog entry. Modified: ant/core/trunk/WHATSNEW Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diffrev=470902r1=470901r2=470902 == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Fri Nov 3 08:55:42 2006 @@ -3509,7 +3509,7 @@ Fixed bugs: --- -* signjar doesn't use deprectated methods anymore. +* signjar no longer uses deprecated methods. * javadoc's failonerror attribute works again - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r470108 - /ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
Author: jglick Date: Wed Nov 1 13:33:01 2006 New Revision: 470108 URL: http://svn.apache.org/viewvc?view=revrev=470108 Log: #40019 revision: ${user.variant} need not be set. Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java?view=diffrev=470108r1=470107r2=470108 == --- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java (original) +++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java Wed Nov 1 13:33:01 2006 @@ -174,7 +174,6 @@ public void testWithRegex() throws Exception { executeTarget(testWithRegex); assertDebuglogContaining(ant.home=); -assertDebuglogContaining(user.variant=); } private void testEchoPrefixVarious(String target) throws Exception { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r470124 - /ant/core/trunk/build.xml
Author: jglick Date: Wed Nov 1 14:34:00 2006 New Revision: 470124 URL: http://svn.apache.org/viewvc?view=revrev=470124 Log: Permit VM args to be inserted when running JUnit tests, for JPDA debugger integration. Modified: ant/core/trunk/build.xml Modified: ant/core/trunk/build.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diffrev=470124r1=470123r2=470124 == --- ant/core/trunk/build.xml (original) +++ ant/core/trunk/build.xml Wed Nov 1 14:34:00 2006 @@ -1628,6 +1628,7 @@ element name=junit-nested implicit=true / sequential mkdir dir=${build.junit.xml} / +property name=test.junit.vmargs value=/ junit printsummary=${junit.summary} haltonfailure=${test.haltonfailure} fork=${junit.fork} @@ -1647,6 +1648,7 @@ value=${tests.and.ant.share.classloader}/ classpath refid=tests-classpath/ formatter type=xml/ + jvmarg line=${test.junit.vmargs}/ junit-nested / /junit /sequential - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r470125 - in /ant/core/trunk/src: main/org/apache/tools/ant/types/Path.java tests/junit/org/apache/tools/ant/types/PathTest.java
Author: jglick Date: Wed Nov 1 14:35:09 2006 New Revision: 470125 URL: http://svn.apache.org/viewvc?view=revrev=470125 Log: If someone tries to append a path to itself, choke gracefully, not with a StackOverflowError. Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/PathTest.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=diffrev=470125r1=470124r2=470125 == --- ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java Wed Nov 1 14:35:09 2006 @@ -19,7 +19,6 @@ package org.apache.tools.ant.types; import java.io.File; -import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Locale; @@ -238,6 +237,9 @@ * @since Ant 1.6 */ public void add(Path path) throws BuildException { +if (path == this) { +throw circularReference(); +} if (path.getProject() == null) { path.setProject(getProject()); } Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/PathTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/PathTest.java?view=diffrev=470125r1=470124r2=470125 == --- ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/PathTest.java (original) +++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/PathTest.java Wed Nov 1 14:35:09 2006 @@ -549,4 +549,15 @@ assertEquals(project.resolveFile(build).getAbsolutePath(), l[0]); } +public void testRecursion() { +Path p = new Path(project); +try { +p.append(p); +assertEquals(0, p.list().length); +} catch (BuildException x) { +String m = x.toString(); +assertTrue(m, m.indexOf(circular) != -1); +} +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r432709 - in /ant/core/trunk/src/main/org/apache/tools/ant: ./ launch/ taskdefs/ taskdefs/condition/ taskdefs/optional/ taskdefs/optional/dotnet/ types/ types/optional/ util/
Author: jglick Date: Fri Aug 18 13:07:32 2006 New Revision: 432709 URL: http://svn.apache.org/viewvc?rev=432709view=rev Log: Some Javadoc corrections. Modified: ant/core/trunk/src/main/org/apache/tools/ant/Main.java ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Tar.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Untar.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ParserSupports.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourcesMatch.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetResource.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/JSharp.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java ant/core/trunk/src/main/org/apache/tools/ant/types/TarFileSet.java ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/Main.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Main.java?rev=432709r1=432708r2=432709view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/Main.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/Main.java Fri Aug 18 13:07:32 2006 @@ -218,8 +218,8 @@ /** * This operation is expected to call [EMAIL PROTECTED] System#exit(int)}, which - * is what the base version does. however, the option to do something - * different is there. + * is what the base version does. + * However, it is possible to do something else. * @param exitCode code to exit with */ protected void exit(int exitCode) { Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java?rev=432709r1=432708r2=432709view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java Fri Aug 18 13:07:32 2006 @@ -133,7 +133,7 @@ * pPrior to Java 1.4, * swallows '%' that are not followed by two characters./p * - * @see a href=http://www.w3.org/TR/xml11/#dt-sysid;dt-sysid/a + * See a href=http://www.w3.org/TR/xml11/#dt-sysid;dt-sysid/a * which makes some mention of how * characters not supported by URI Reference syntax should be escaped. * Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java?rev=432709r1=432708r2=432709view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Fri Aug 18 13:07:32 2006 @@ -193,7 +193,7 @@ /** * Adds a path of files to sign. * - * @param a path of files to sign. + * @return a path of files to sign. * @since Ant 1.7 */ public Path createPath() { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java?rev=432709r1=432708r2=432709view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AntStructure.java Fri Aug 18 13:07:32 2006 @@ -126,10 +126,8 @@ /** * Writes the actual structure information. * - * p[EMAIL PROTECTED] StructurePrinter#printHead printHead}, [EMAIL PROTECTED] - * StructurePrinter
svn commit: r432720 - /ant/core/trunk/build.xml
Author: jglick Date: Fri Aug 18 13:45:47 2006 New Revision: 432720 URL: http://svn.apache.org/viewvc?rev=432720view=rev Log: run-single-test should write TEST-*.xml to the correct place. Modified: ant/core/trunk/build.xml Modified: ant/core/trunk/build.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?rev=432720r1=432719r2=432720view=diff == --- ant/core/trunk/build.xml (original) +++ ant/core/trunk/build.xml Fri Aug 18 13:45:47 2006 @@ -1757,7 +1757,7 @@ depends=test-init test-junit formatter type=plain usefile=false/ - test name=${testcase}/ + test name=${testcase} todir=${build.tests.xml}/ /test-junit /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r432728 - in /ant/core/trunk/src/main/org/apache/tools/ant/util/regexp: RegexpFactory.java RegexpMatcherFactory.java
Author: jglick Date: Fri Aug 18 14:21:54 2006 New Revision: 432728 URL: http://svn.apache.org/viewvc?rev=432728view=rev Log: Providing more information in case a regexp impl is unavailable for unexpected reasons. Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java?rev=432728r1=432727r2=432728view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java Fri Aug 18 14:21:54 2006 @@ -18,6 +18,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.util.JavaEnvUtils; /*** * Regular expression factory, which will create Regexp objects. The @@ -61,28 +62,31 @@ // load a different implementation? } +Throwable cause = null; + try { testAvailability(java.util.regex.Matcher); return createRegexpInstance(org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, JavaEnvUtils.getJavaVersionNumber() 14); } try { testAvailability(org.apache.oro.text.regex.Pattern); return createRegexpInstance(org.apache.tools.ant.util.regexp.JakartaOroRegexp); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, true); } try { testAvailability(org.apache.regexp.RE); return createRegexpInstance(org.apache.tools.ant.util.regexp.JakartaRegexpRegexp); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, true); } -throw new BuildException(No supported regular expression matcher found); +throw new BuildException(No supported regular expression matcher found + +(cause != null ? : + cause : ), cause); } /** Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java?rev=432728r1=432727r2=432728view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java Fri Aug 18 14:21:54 2006 @@ -21,6 +21,7 @@ import org.apache.tools.ant.MagicNames; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.ClasspathUtils; +import org.apache.tools.ant.util.JavaEnvUtils; /** * Simple Factory Class that produces an implementation of @@ -69,29 +70,40 @@ // load a different implementation? } +Throwable cause = null; + try { testAvailability(java.util.regex.Matcher); return createInstance(org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, JavaEnvUtils.getJavaVersionNumber() 14); } try { testAvailability(org.apache.oro.text.regex.Pattern); return createInstance(org.apache.tools.ant.util.regexp.JakartaOroMatcher); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, true); } try { testAvailability(org.apache.regexp.RE); return createInstance(org.apache.tools.ant.util.regexp.JakartaRegexpMatcher); } catch (BuildException be) { -// ignore +cause = orCause(cause, be, true); } -throw new BuildException(No supported regular expression matcher found); +throw new BuildException(No supported regular expression matcher found + +(cause != null ? : + cause : ), cause); } + +static Throwable orCause(Throwable deflt, BuildException be, boolean ignoreCnfe) { +if (deflt != null) { +return deflt; +} +Throwable t = be.getException(); +return ignoreCnfe t instanceof ClassNotFoundException ? null : t; +} /** * Create an instance of a matcher from a classname. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r432379 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/util/FileUtils.java src/testcases/org/apache/tools/ant/util/FileUtilsTest.java
Author: jglick Date: Thu Aug 17 13:23:44 2006 New Revision: 432379 URL: http://svn.apache.org/viewvc?rev=432379view=rev Log: #40281: Cannot resolve path error thrown gratuitously. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java ant/core/trunk/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=432379r1=432378r2=432379view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Thu Aug 17 13:23:44 2006 @@ -102,6 +102,10 @@ Fixed bugs: --- +* The build could be halted if a file path contained more .. components than + the actual depth of the preceding path. Now such paths are left alone (meaning + they will likely be treated as nonexistent files). Bugzilla Report 40281. + * Converting a dirset to a string was broken. Bugzilla Report 39683. * Manifests have improved line length handling, taking care of encoding. Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?rev=432379r1=432378r2=432379view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Thu Aug 17 13:23:44 2006 @@ -674,7 +674,8 @@ continue; } else if (...equals(thisToken)) { if (s.size() 2) { -throw new BuildException(Cannot resolve path + path); +// Cannot resolve it, so skip it. +return new File(path); } s.pop(); } else { // plain component Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java?rev=432379r1=432378r2=432379view=diff == --- ant/core/trunk/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java (original) +++ ant/core/trunk/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java Thu Aug 17 13:23:44 2006 @@ -193,12 +193,9 @@ assertEquals(localize(/1/2/3/4), FILE_UTILS.resolveFile(new File(localize(/1/2/3)), ..\\../5/..\\./2/./3/6\\../4).getPath()); -try { -FILE_UTILS.resolveFile(new File(localize(/1)), ../../b); -fail(successfully crawled beyond the filesystem root); -} catch (BuildException e) { -// Expected Exception caught -} +assertEquals(meaningless result but no exception, +new File(localize(/1/../../b)), +FILE_UTILS.resolveFile(new File(localize(/1)), ../../b)); } @@ -315,12 +312,9 @@ // Expected exception caught } -try { -FILE_UTILS.normalize(localize(/1/../../b)); -fail(successfully crawled beyond the filesystem root); -} catch (BuildException e) { -// Expected exception caught -} +assertEquals(will not go outside FS root (but will not throw an exception either), +new File(localize(/1/../../b)), +FILE_UTILS.normalize(localize(/1/../../b))); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r432410 - /ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java
Author: jglick Date: Thu Aug 17 15:17:09 2006 New Revision: 432410 URL: http://svn.apache.org/viewvc?rev=432410view=rev Log: Minor optimization to save maybe 1-2Mb of heap used to create a 30Mb ZIP file. (extraFields is usually empty, so leave null unless really needed.) Heap usage from zip still intense, however - some ZipEntry's (another 1-2Mb) but mostly String's (9Mb!) from all the FileSet's which are kept in memory. For the same 30Mb (compressed) ZIP file, need about 15Mb heap at peak. Not clear whether that could be improved without breaking B/C. Another day. Modified: ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java Modified: ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java?rev=432410r1=432409r2=432410view=diff == --- ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java (original) +++ ant/core/trunk/src/main/org/apache/tools/zip/ZipEntry.java Thu Aug 17 15:17:09 2006 @@ -33,7 +33,7 @@ private int internalAttributes = 0; private int platform = PLATFORM_FAT; private long externalAttributes = 0; -private Vector extraFields = new Vector(); +private Vector/*ZipExtraField*/ extraFields = null; private String name = null; /** @@ -90,7 +90,7 @@ public Object clone() { ZipEntry e = (ZipEntry) super.clone(); -e.extraFields = (Vector) extraFields.clone(); +e.extraFields = extraFields != null ? (Vector) extraFields.clone() : null; e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getExtraFields()); @@ -186,7 +186,7 @@ * @since 1.1 */ public void setExtraFields(ZipExtraField[] fields) { -extraFields.removeAllElements(); +extraFields = new Vector(); for (int i = 0; i fields.length; i++) { extraFields.addElement(fields[i]); } @@ -199,6 +199,9 @@ * @since 1.1 */ public ZipExtraField[] getExtraFields() { +if (extraFields == null) { +return new ZipExtraField[0]; +} ZipExtraField[] result = new ZipExtraField[extraFields.size()]; extraFields.copyInto(result); return result; @@ -211,6 +214,9 @@ * @since 1.1 */ public void addExtraField(ZipExtraField ze) { +if (extraFields == null) { +extraFields = new Vector(); +} ZipShort type = ze.getHeaderId(); boolean done = false; for (int i = 0, fieldsSize = extraFields.size(); !done i fieldsSize; i++) { @@ -231,6 +237,9 @@ * @since 1.1 */ public void removeExtraField(ZipShort type) { +if (extraFields == null) { +extraFields = new Vector(); +} boolean done = false; for (int i = 0, fieldsSize = extraFields.size(); !done i fieldsSize; i++) { if (((ZipExtraField) extraFields.elementAt(i)).getHeaderId().equals(type)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r431458 - /ant/core/trunk/WHATSNEW
Author: jglick Date: Mon Aug 14 15:47:11 2006 New Revision: 431458 URL: http://svn.apache.org/viewvc?rev=431458view=rev Log: Mention of #39683. Modified: ant/core/trunk/WHATSNEW Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=431458r1=431457r2=431458view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Mon Aug 14 15:47:11 2006 @@ -101,6 +101,9 @@ Fixed bugs: --- + +* Converting a dirset to a string was broken. Bugzilla Report 39683. + * Manifests have improved line length handling, taking care of encoding. Bug reports 37548 / 34425. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r431467 - /ant/core/trunk/docs/manual/CoreTasks/apt.html
Author: jglick Date: Mon Aug 14 16:18:58 2006 New Revision: 431467 URL: http://svn.apache.org/viewvc?rev=431467view=rev Log: Noting that apt is unnecessary in JDK 6. Modified: ant/core/trunk/docs/manual/CoreTasks/apt.html Modified: ant/core/trunk/docs/manual/CoreTasks/apt.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/apt.html?rev=431467r1=431466r2=431467view=diff == --- ant/core/trunk/docs/manual/CoreTasks/apt.html (original) +++ ant/core/trunk/docs/manual/CoreTasks/apt.html Mon Aug 14 16:18:58 2006 @@ -11,6 +11,8 @@ It may work on later versions, but this cannot be confirmed until those versions ship. Be advised that the Apt tool does appear to be an unstable part of the JDK framework, so may change radically in future versions. + In particular it is likely to be obsolete in JDK 6, which can run annotation + processors as part of javac. If the lt;aptgt; task does break when upgrading JVM, please check to see if there is a more recent version of Ant that tracks any changes./p @@ -161,7 +163,7 @@ to jikes may justify the effort. p /phr -p align=centerCopyright copy; 2004-2005 The Apache Software Foundation. +p align=centerCopyright copy; 2004-2006 The Apache Software Foundation. All rights Reserved./p /body/html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r431468 - /ant/core/trunk/xdocs/external.xml
Author: jglick Date: Mon Aug 14 16:23:08 2006 New Revision: 431468 URL: http://svn.apache.org/viewvc?rev=431468view=rev Log: Minor updates. Modified: ant/core/trunk/xdocs/external.xml Modified: ant/core/trunk/xdocs/external.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/external.xml?rev=431468r1=431467r2=431468view=diff == --- ant/core/trunk/xdocs/external.xml (original) +++ ant/core/trunk/xdocs/external.xml Mon Aug 14 16:23:08 2006 @@ -3492,7 +3492,7 @@ table class=externals tr thCompatibility:/th -tdbundles Ant 1.6.2 as of NetBeans 4.1; 1.6.5 for NetBeans 5.0/td +tdbundles 1.6.5 for NetBeans 5.0 and 5.5/td /tr tr thURL:/th @@ -3504,7 +3504,7 @@ /tr tr thLicense:/th -tdSun Public License/td +tdCommon Development and Distribution License/td /tr /table /subsection @@ -3616,4 +3616,4 @@ /section /body -/document \ No newline at end of file +/document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r431469 - in /ant/core/trunk: docs/manual/ docs/manual/OptionalTasks/ lib/ lib/optional/ src/main/org/apache/tools/ant/taskdefs/optional/junit/
Author: jglick Date: Mon Aug 14 16:24:03 2006 New Revision: 431469 URL: http://svn.apache.org/viewvc?rev=431469view=rev Log: JUnit 3.8.2 bugfix update. Added: ant/core/trunk/lib/optional/junit-3.8.2.jar (with props) Removed: ant/core/trunk/lib/optional/junit-3.8.1.jar Modified: ant/core/trunk/docs/manual/OptionalTasks/junit.html ant/core/trunk/docs/manual/tutorial-HelloWorldWithAnt.html ant/core/trunk/lib/libraries.properties ant/core/trunk/lib/optional/README ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Modified: ant/core/trunk/docs/manual/OptionalTasks/junit.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/OptionalTasks/junit.html?rev=431469r1=431468r2=431469view=diff == --- ant/core/trunk/docs/manual/OptionalTasks/junit.html (original) +++ ant/core/trunk/docs/manual/OptionalTasks/junit.html Mon Aug 14 16:24:03 2006 @@ -11,7 +11,7 @@ pThis task runs tests from the JUnit testing framework. The latest version of the framework can be found at a href=http://www.junit.org;http://www.junit.org/a. -This task has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't +This task has been tested with JUnit 3.0 up to JUnit 3.8.2; it won't work with versions prior to JUnit 3.0. It also works with JUnit 4.0, including pure JUnit 4 tests using only annotations and no codeJUnit4TestAdapter/code./p pstrongNote:/strong This task depends on external libraries not included Modified: ant/core/trunk/docs/manual/tutorial-HelloWorldWithAnt.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/tutorial-HelloWorldWithAnt.html?rev=431469r1=431468r2=431469view=diff == --- ant/core/trunk/docs/manual/tutorial-HelloWorldWithAnt.html (original) +++ ant/core/trunk/docs/manual/tutorial-HelloWorldWithAnt.html Mon Aug 14 16:24:03 2006 @@ -383,7 +383,7 @@ a name=junit h2Testing the class/h2 pIn this step we will introduce the usage of the JUnit [3] testframework in combination with Ant. Because Ant -has a build-in JUnit 3.8.1 you could start directly using it. Write a test class in ttsrc\HelloWorldTest.java/tt: /p +has a built-in JUnit 3.8.2 you could start directly using it. Write a test class in ttsrc\HelloWorldTest.java/tt: /p pre class=code public class HelloWorldTest extends junit.framework.TestCase { @@ -506,4 +506,4 @@ p align=centerCopyright copy; 2005-2006 The Apache Software Foundation. All rights Reserved./p /body -/html \ No newline at end of file +/html Modified: ant/core/trunk/lib/libraries.properties URL: http://svn.apache.org/viewvc/ant/core/trunk/lib/libraries.properties?rev=431469r1=431468r2=431469view=diff == --- ant/core/trunk/lib/libraries.properties (original) +++ ant/core/trunk/lib/libraries.properties Mon Aug 14 16:24:03 2006 @@ -24,7 +24,7 @@ commons-logging-api.version=${commons-logging.version} jdepend.version=2.7 jruby.version=0.8.3 -junit.version=3.8.1 +junit.version=3.8.2 jsch.version=0.1.25 jython.version=2.1 log4j.version=1.2.13 Modified: ant/core/trunk/lib/optional/README URL: http://svn.apache.org/viewvc/ant/core/trunk/lib/optional/README?rev=431469r1=431468r2=431469view=diff == --- ant/core/trunk/lib/optional/README (original) +++ ant/core/trunk/lib/optional/README Mon Aug 14 16:24:03 2006 @@ -1,3 +1,3 @@ -The file junit-3.8.1.jar is version 3.8.1 of JUnit, see the file LICENSE.junit +The file junit-3.8.2.jar is version 3.8.2 of JUnit, see the file LICENSE.junit for the terms of distribution. For more information about JUnit or the latest release, see http://www.junit.org/. Added: ant/core/trunk/lib/optional/junit-3.8.2.jar URL: http://svn.apache.org/viewvc/ant/core/trunk/lib/optional/junit-3.8.2.jar?rev=431469view=auto == Binary file - no diff available. Propchange: ant/core/trunk/lib/optional/junit-3.8.2.jar -- svn:mime-type = application/octet-stream Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java?rev=431469r1=431468r2=431469view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Mon Aug 14 16:24:03 2006 @@ -303,7 +303,7 @@ // Check for JDK 5 first. Will *not* help on JDK 1.4
svn commit: r429887 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
Author: jglick Date: Tue Aug 8 16:43:07 2006 New Revision: 429887 URL: http://svn.apache.org/viewvc?rev=429887view=rev Log: Avoid a useless exception being (sometimes) thrown if a java fork=true task is halted with Thread.stop(). Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java?rev=429887r1=429886r2=429887view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java Tue Aug 8 16:43:07 2006 @@ -142,7 +142,10 @@ // eligible for garbage collection // Cf.: http://developer.java.sun.com/developer/bugParade/bugs/4533087.html destroyProcessThread.setShouldDestroy(false); -destroyProcessThread.start(); +if (!destroyProcessThread.getThreadGroup().isDestroyed()) { +// start() would throw IllegalThreadStateException from ThreadGroup.add if it were destroyed +destroyProcessThread.start(); +} // this should return quickly, since it basically is a NO-OP. try { destroyProcessThread.join(2); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r426481 - /ant/core/trunk/WHATSNEW
Author: jglick Date: Fri Jul 28 04:41:14 2006 New Revision: 426481 URL: http://svn.apache.org/viewvc?rev=426481view=rev Log: More info re. #28621. Modified: ant/core/trunk/WHATSNEW Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=426481r1=426480r2=426481view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Fri Jul 28 04:41:14 2006 @@ -258,7 +258,7 @@ -- * InputHandler implementations may now call InputRequest.getDefaultValue() - if they wish. + if they wish. The default handler uses this also. Bugzilla report 28621. * Took in bugzilla report 39320. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r426184 - /ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java
Author: jglick Date: Thu Jul 27 11:21:08 2006 New Revision: 426184 URL: http://svn.apache.org/viewvc?rev=426184view=rev Log: Actually permit validargs and defaultvalue together in the default handler. Formerly, would just prompt you again if you just pressed Enter. Modified: ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java?rev=426184r1=426183r2=426184view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java Thu Jul 27 11:21:08 2006 @@ -51,6 +51,6 @@ * @return true if the input is one of the allowed values. */ public boolean isInputValid() { -return choices.contains(getInput()); +return choices.contains(getInput()) || (.equals(getInput()) getDefaultValue() != null); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r426186 - /ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java
Author: jglick Date: Thu Jul 27 11:21:52 2006 New Revision: 426186 URL: http://svn.apache.org/viewvc?rev=426186view=rev Log: Display the default value for an input prompt sensibly. Modified: ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java?rev=426186r1=426185r2=426186view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/input/DefaultInputHandler.java Thu Jul 27 11:21:52 2006 @@ -82,23 +82,34 @@ */ protected String getPrompt(InputRequest request) { String prompt = request.getPrompt(); +String def = request.getDefaultValue(); if (request instanceof MultipleChoiceInputRequest) { StringBuffer sb = new StringBuffer(prompt); -sb.append((); +sb.append( (); Enumeration e = ((MultipleChoiceInputRequest) request).getChoices().elements(); boolean first = true; while (e.hasMoreElements()) { if (!first) { -sb.append(,); +sb.append(, ); +} +String next = (String) e.nextElement(); +if (next.equals(def)) { +sb.append('['); +} +sb.append(next); +if (next.equals(def)) { +sb.append(']'); } -sb.append(e.nextElement()); first = false; } sb.append()); -prompt = sb.toString(); +return sb.toString(); +} else if (def != null) { +return prompt + [ + def + ]; +} else { +return prompt; } -return prompt; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r425875 - in /ant/core/trunk/src: main/org/apache/tools/ant/types/DirSet.java testcases/org/apache/tools/ant/types/DirSetTest.java
Author: jglick Date: Wed Jul 26 15:15:12 2006 New Revision: 425875 URL: http://svn.apache.org/viewvc?rev=425875view=rev Log: Expressing a dirset as a string should show matching dirs, not files! Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/DirSet.java ant/core/trunk/src/testcases/org/apache/tools/ant/types/DirSetTest.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/DirSet.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/DirSet.java?rev=425875r1=425874r2=425875view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/types/DirSet.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/DirSet.java Wed Jul 26 15:15:12 2006 @@ -18,7 +18,7 @@ package org.apache.tools.ant.types; import java.util.Iterator; - +import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.types.resources.FileResourceIterator; /** @@ -89,6 +89,25 @@ */ public boolean isFilesystemOnly() { return true; +} + +/** + * Returns included directories as a list of semicolon-separated paths. + * + * @return a codeString/code of included directories. + */ +public String toString() { +DirectoryScanner ds = getDirectoryScanner(getProject()); +String[] dirs = ds.getIncludedDirectories(); +StringBuffer sb = new StringBuffer(); + +for (int i = 0; i dirs.length; i++) { +if (i 0) { +sb.append(';'); +} +sb.append(dirs[i]); +} +return sb.toString(); } } Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/types/DirSetTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/types/DirSetTest.java?rev=425875r1=425874r2=425875view=diff == --- ant/core/trunk/src/testcases/org/apache/tools/ant/types/DirSetTest.java (original) +++ ant/core/trunk/src/testcases/org/apache/tools/ant/types/DirSetTest.java Wed Jul 26 15:15:12 2006 @@ -17,6 +17,8 @@ package org.apache.tools.ant.types; +import java.io.File; +import java.io.FileOutputStream; import org.apache.tools.ant.BuildException; /** @@ -39,7 +41,7 @@ FileSet fs = new FileSet(); fs.setProject(getProject()); getProject().addReference(dummy, fs); -ds.setRefid(new Reference(dummy)); +ds.setRefid(new Reference(getProject(), dummy)); try { ds.getDir(getProject()); fail(DirSet created from FileSet reference); @@ -50,13 +52,31 @@ ds = (DirSet) getInstance(); ds.setProject(getProject()); getProject().addReference(dummy2, ds); -fs.setRefid(new Reference(dummy2)); +fs.setRefid(new Reference(getProject(), dummy2)); try { fs.getDir(getProject()); fail(FileSet created from DirSet reference); } catch (BuildException e) { assertEquals(dummy2 doesn\'t denote a FileSet, e.getMessage()); } +} + +public void testToString() throws Exception { +File tmp = File.createTempFile(DirSetTest, ); +tmp.delete(); +File a = new File(tmp, a); +a.mkdirs(); +File b = new File(tmp, b); +File bc = new File(b, c); +bc.mkdirs(); +new FileOutputStream(new File(a, x)).close(); +new FileOutputStream(new File(b, x)).close(); +new FileOutputStream(new File(bc, x)).close(); +DirSet ds = new DirSet(); +ds.setProject(getProject()); +ds.setDir(tmp); +ds.setIncludes(b/); +assertEquals(b;b + File.separator + c, ds.toString()); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r425879 - in /ant/core/trunk/src/main/org/apache/tools/ant/helper: ProjectHelper2.java ProjectHelperImpl.java
Author: jglick Date: Wed Jul 26 15:29:50 2006 New Revision: 425879 URL: http://svn.apache.org/viewvc?rev=425879view=rev Log: People should not think that file:../master.xml is a meaningful URI. Ant historically supports it but normal XML parsers do not. Modified: ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java?rev=425879r1=425878r2=425879view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Wed Jul 26 15:29:50 2006 @@ -477,6 +477,11 @@ File file = new File(path); if (!file.isAbsolute()) { file = FILE_UTILS.resolveFile(context.getBuildFileParent(), path); +context.getProject().log( +Warning: ' + systemId + ' in + context.getBuildFile() + + should be expressed simply as ' + path.replace('\\', '/') + +' for compliance with other XML tools, +Project.MSG_WARN); } context.getProject().log(file= + file, Project.MSG_DEBUG); try { Modified: ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java?rev=425879r1=425878r2=425879view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java Wed Jul 26 15:29:50 2006 @@ -296,6 +296,11 @@ File file = new File(path); if (!file.isAbsolute()) { file = FILE_UTILS.resolveFile(helperImpl.buildFileParent, path); +helperImpl.project.log( +Warning: ' + systemId + ' in + helperImpl.buildFile + + should be expressed simply as ' + path.replace('\\', '/') + +' for compliance with other XML tools, +Project.MSG_WARN); } try { InputSource inputSource = new InputSource(new FileInputStream(file)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r423831 - /ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
Author: jglick Date: Thu Jul 20 01:50:09 2006 New Revision: 423831 URL: http://svn.apache.org/viewvc?rev=423831view=rev Log: Javadoc typo only. Modified: ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java Modified: ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java?rev=423831r1=423830r2=423831view=diff == --- ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java (original) +++ ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2InputStream.java Thu Jul 20 01:50:09 2006 @@ -127,7 +127,7 @@ private CBZip2InputStream.Data data; /** - * Constructs a new CBZip2InputStream which decompresses bytes readed from + * Constructs a new CBZip2InputStream which decompresses bytes read from * the specified stream. * * pAlthough BZip2 headers are marked with the magic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r411043 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java
Author: jglick Date: Thu Jun 1 22:26:13 2006 New Revision: 411043 URL: http://svn.apache.org/viewvc?rev=411043view=rev Log: Just using a more explicitly qualified class name. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java?rev=411043r1=411042r2=411043view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java Thu Jun 1 22:26:13 2006 @@ -38,7 +38,7 @@ this.task = task; } -public void addVmExit(JUnitTest test, JUnitResultFormatterMirror _formatter, +public void addVmExit(JUnitTest test, JUnitTaskMirror.JUnitResultFormatterMirror _formatter, OutputStream out, final String message) { JUnitResultFormatter formatter = (JUnitResultFormatter) _formatter; formatter.setOutput(out); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r411044 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit: JUnitVersionHelper.java XMLJUnitResultFormatter.java
Author: jglick Date: Thu Jun 1 22:27:26 2006 New Revision: 411044 URL: http://svn.apache.org/viewvc?rev=411044view=rev Log: Stefan pointed out that the XML formatter was mistakenly using JUnit4TestFacade as the class name for simple TestCase's run under JUnit 4. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java?rev=411044r1=411043r2=411044view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java Thu Jun 1 22:27:26 2006 @@ -93,4 +93,22 @@ return unknown; } +/** + * Tries to find the name of the class which a test represents + * across JUnit 3 and 4. + */ +static String getTestCaseClassName(Test test) { +String className = test.getClass().getName(); +if (className.equals(junit.framework.JUnit4TestCaseFacade)) { +// JUnit 4 wraps solo tests this way. We can extract +// the original test name with a little hack. +String name = test.toString(); +int paren = name.lastIndexOf('('); +if (paren != -1 name.endsWith())) { +className = name.substring(paren + 1, name.length() - 1); +} +} +return className; +} + } Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java?rev=411044r1=411043r2=411044view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java Thu Jun 1 22:27:26 2006 @@ -200,7 +200,7 @@ // a TestSuite can contain Tests from multiple classes, // even tests with the same name - disambiguate them. currentTest.setAttribute(ATTR_CLASSNAME, - test.getClass().getName()); +JUnitVersionHelper.getTestCaseClassName(test)); rootElement.appendChild(currentTest); testElements.put(test, currentTest); } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r411046 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java
Author: jglick Date: Thu Jun 1 22:28:04 2006 New Revision: 411046 URL: http://svn.apache.org/viewvc?rev=411046view=rev Log: Missing @since. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java?rev=411046r1=411045r2=411046view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Echo.java Thu Jun 1 22:28:04 2006 @@ -131,6 +131,7 @@ * Declare the encoding to use when outputting to a file; * Use for the platform's default encoding. * @param encoding + * @since 1.7 */ public void setEncoding(String encoding) { this.encoding = encoding; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r411047 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ide/
Author: jglick Date: Thu Jun 1 22:29:30 2006 New Revision: 411047 URL: http://svn.apache.org/viewvc?rev=411047view=rev Log: Deleting empty package. Removed: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ide/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r382127 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
Author: jglick Date: Wed Mar 1 11:13:16 2006 New Revision: 382127 URL: http://svn.apache.org/viewcvs?rev=382127view=rev Log: Tweak: in case junit-3.8.1.jar and junit-4.0.jar are on CP but in that order, and running JDK 1.4-, at least run JUnit 3.x tests. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java?rev=382127r1=382126r2=382127view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Wed Mar 1 11:13:16 2006 @@ -266,8 +266,12 @@ try { Class junit4TestAdapterClass = null; -// Note that checking for JDK 5 directly won't work; under JDK 4, this will already have failed. +// Check for JDK 5 first. Will *not* help on JDK 1.4 if only junit-4.0.jar in +// CP because in that case linkage of whole task will already have +// failed! But will help if CP has junit-3.8.1.jar:junit-4.0.jar. +// In that case first C.fN will fail with CNFE and we will avoid UnsupportedClassVersionError. try { +Class.forName(java.lang.annotation.Annotation); if (loader == null) { junit4TestAdapterClass = Class.forName(junit.framework.JUnit4TestAdapter); } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381780 - in /ant/core/trunk: WHATSNEW docs/manual/OptionalTasks/junit.html src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java src/main/org/apache/tools/ant/taskdef
Author: jglick Date: Tue Feb 28 13:07:15 2006 New Revision: 381780 URL: http://svn.apache.org/viewcvs?rev=381780view=rev Log: #38811: support for JUnit 4.0. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/docs/manual/OptionalTasks/junit.html ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=381780r1=381779r2=381780view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Tue Feb 28 13:07:15 2006 @@ -77,6 +77,8 @@ Fixed bugs: --- +* junit now supports JUnit 4. Bugzilla Report 38811. + * junit can now work with junit.jar in its classpath. Bugzilla Report 38799. * Some potential NullPointerExceptions, Bugzilla Reports 37765 and 38056 Modified: ant/core/trunk/docs/manual/OptionalTasks/junit.html URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/OptionalTasks/junit.html?rev=381780r1=381779r2=381780view=diff == --- ant/core/trunk/docs/manual/OptionalTasks/junit.html (original) +++ ant/core/trunk/docs/manual/OptionalTasks/junit.html Tue Feb 28 13:07:15 2006 @@ -12,7 +12,8 @@ version of the framework can be found at a href=http://www.junit.org;http://www.junit.org/a. This task has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't -work with versions prior to JUnit 3.0./p +work with versions prior to JUnit 3.0. It also works with JUnit 4.0, including +pure JUnit 4 tests using only annotations and no codeJUnit4TestAdapter/code./p pstrongNote:/strong This task depends on external libraries not included in the Ant distribution. See a href=../install.html#librarydependencies Library Dependencies/a for more information. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java?rev=381780r1=381779r2=381780view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Tue Feb 28 13:07:15 2006 @@ -35,6 +35,7 @@ import java.util.Vector; import junit.framework.AssertionFailedError; import junit.framework.Test; +import junit.framework.TestFailure; import junit.framework.TestListener; import junit.framework.TestResult; import junit.framework.TestSuite; @@ -99,7 +100,13 @@ junit.textui.TestRunner, java.lang.reflect.Method.invoke(, sun.reflect., -org.apache.tools.ant. +org.apache.tools.ant., +// JUnit 4 support: +org.junit., +junit.framework.JUnit4TestAdapter, +// See wrapListener for reason: +Caused by: java.lang.AssertionError, + more, }; @@ -141,6 +148,9 @@ /** Do we print TestListener events? */ private boolean logTestListenerEvents = false; +/** Turned on if we are using JUnit 4 for this test suite. see #38811 */ +private boolean junit4; + /** * Constructor for fork=true or when the user hasn't specified a * classpath. @@ -212,9 +222,9 @@ public void run() { res = new TestResult(); -res.addListener(this); +res.addListener(wrapListener(this)); for (int i = 0; i formatters.size(); i++) { -res.addListener((TestListener) formatters.elementAt(i)); +res.addListener(wrapListener((TestListener) formatters.elementAt(i))); } ByteArrayOutputStream errStrm = new ByteArrayOutputStream(); @@ -255,6 +265,19 @@ try { try { +Class junit4TestAdapterClass = null; +// Note that checking for JDK 5 directly won't work; under JDK 4, this will already have failed. +try { +if (loader == null) { +junit4TestAdapterClass = Class.forName(junit.framework.JUnit4TestAdapter); +} else { +junit4TestAdapterClass = Class.forName(junit.framework.JUnit4TestAdapter, true, loader); +} +} catch (ClassNotFoundException e) { +// OK, fall back to JUnit 3. +} +junit4 = junit4TestAdapterClass != null; + Class testClass = null; if (loader == null) { testClass = Class.forName(junitTest.getName
svn commit: r381467 - in /ant/core/trunk: ./ docs/manual/ docs/manual/OptionalTasks/ src/main/org/apache/tools/ant/ src/main/org/apache/tools/ant/taskdefs/optional/junit/ xdocs/
Author: jglick Date: Mon Feb 27 14:24:26 2006 New Revision: 381467 URL: http://svn.apache.org/viewcvs?rev=381467view=rev Log: #38799: junit task should work so long as junit.jar present in classpath even if not among Ant libs. Added: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirror.java (with props) ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.java (with props) Modified: ant/core/trunk/WHATSNEW ant/core/trunk/docs/manual/OptionalTasks/junit.html ant/core/trunk/docs/manual/install.html ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java ant/core/trunk/xdocs/faq.xml Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=381467r1=381466r2=381467view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Mon Feb 27 14:24:26 2006 @@ -1,4 +1,4 @@ -Changes from current Ant 1.6.5 version to current RCS version +Changes from current Ant 1.6.5 version to current SVN version = Changes that could break older environments: @@ -76,6 +76,8 @@ Fixed bugs: --- + +* junit can now work with junit.jar in its classpath. Bugzilla Report 38799. * Some potential NullPointerExceptions, Bugzilla Reports 37765 and 38056 Modified: ant/core/trunk/docs/manual/OptionalTasks/junit.html URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/OptionalTasks/junit.html?rev=381467r1=381466r2=381467view=diff == --- ant/core/trunk/docs/manual/OptionalTasks/junit.html (original) +++ ant/core/trunk/docs/manual/OptionalTasks/junit.html Mon Feb 27 14:24:26 2006 @@ -19,12 +19,12 @@ /p p strongNote/strong: -You must have codejunit.jar/code and the class files for the -codelt;junitgt;/code task in the same classpath. +You must have codejunit.jar/code available. You can do one of: +/p ol li -Put both codejunit.jar/code and the optional tasks jar file in +Put both codejunit.jar/code and codeant-junit.jar/code in codeANT_HOME/lib/code. /li li @@ -32,15 +32,23 @@ include their locations in your codeCLASSPATH/code environment variable. /li li -Do neither of the above, and instead, specify their locations using -a codelt;classpathgt;/code element in the build file. - +Add both JARs to your classpath using code-lib/code. +/li +li +Specify the locations of both JARs using +a codelt;classpathgt;/code element in a codelt;taskdefgt;/code in the build file. +/li +li +Leave codeant-junit.jar/code in its default location in codeANT_HOME/lib/code +but include codejunit.jar/code in the codelt;classpathgt;/code passed +to codelt;junitgt;/code. em(since Ant 1.7)/em +/li +/ol +p See a href=../../faq.html#delegating-classloader target=_topthe FAQ/a for details. -/ol /p - pTests are defined by nested codetest/code or codebatchtest/code tags (see a href=#nestednested elements/a)./p @@ -217,6 +225,9 @@ element that represents a a href=../using.html#pathPATH like structure/a./p +pAs of Ant 1.7, this classpath may be used to refer to codejunit.jar/code +as well as your tests and the tested code. + h4jvmarg/h4 pIf codefork/code is enabled, additional parameters may be passed to @@ -580,7 +591,7 @@ code${reports.tests}/code./p hr -p align=centerCopyright copy; 2000-2005 The Apache Software Foundation. All rights +p align=centerCopyright copy; 2000-2006 The Apache Software Foundation. All rights Reserved./p /body /html Modified: ant/core/trunk/docs/manual/install.html URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/install.html?rev=381467r1=381466r2=381467view=diff == --- ant/core/trunk/docs/manual/install.html (original) +++ ant/core/trunk/docs/manual/install.html Mon Feb 27 14:24:26 2006 @@ -456,7 +456,7 @@ /tr tr tdjunit.jar/td -tdjunit tasks/td +tdcodelt;junitgt;/code task. May be in classpath passed to task rather than Ant's classpath./td tda href=http://www.junit.org/; target=_tophttp://www.junit.org//a/td /tr tr @@ -698,7 +698,7 @@ hr -p align=centerCopyright copy; 2000-2005 The Apache Software Foundation. All rights +p align=centerCopyright copy; 2000-2006 The Apache Software Foundation. All
svn commit: r380869 - /ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
Author: jglick Date: Fri Feb 24 15:49:55 2006 New Revision: 380869 URL: http://svn.apache.org/viewcvs?rev=380869view=rev Log: Test failed if run on a system with UTF-8 encoding as the default. Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java?rev=380869r1=380868r2=380869view=diff == --- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java (original) +++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java Fri Feb 24 15:49:55 2006 @@ -124,7 +124,7 @@ } public void testSpecialSignsInHtmlPath() throws Exception { executeTarget(testSpecialSignsInHtmlPath); -File reportFile = new File(System.getProperty(root), src/etc/testcases/taskdefs/optional/junitreport/test/html# $%§-!report/index.html); +File reportFile = new File(System.getProperty(root), src/etc/testcases/taskdefs/optional/junitreport/test/html# $%\u00A7-!report/index.html); // tests one the file object assertTrue(No index.html present. Not generated?, reportFile.exists() ); assertTrue(Cant read the report file., reportFile.canRead() ); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r380876 - /ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java
Author: jglick Date: Fri Feb 24 16:50:48 2006 New Revision: 380876 URL: http://svn.apache.org/viewcvs?rev=380876view=rev Log: More helpful diagnostic message for an obscure mistake I once made... Modified: ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java?rev=380876r1=380875r2=380876view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Fri Feb 24 16:50:48 2006 @@ -496,10 +496,14 @@ if (c == null || !(Task.class.isAssignableFrom(c))) { return null; } -Task task = (Task) createComponent(taskType); -if (task == null) { +Object _task = createComponent(taskType); +if (_task == null) { return null; } +if (!(_task instanceof Task)) { +throw new BuildException(Expected a Task from ' + taskType + ' but got an instance of + _task.getClass().getName() + instead); +} +Task task = (Task) _task; task.setTaskType(taskType); // set default value, can be changed by the user - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r380877 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
Author: jglick Date: Fri Feb 24 16:58:11 2006 New Revision: 380877 URL: http://svn.apache.org/viewcvs?rev=380877view=rev Log: Avoid catching ThreadDeath; just pass it on. Cf. http://www.netbeans.org/nonav/issues/show_bug.cgi?id=47191 Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java?rev=380877r1=380876r2=380877view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Fri Feb 24 16:58:11 2006 @@ -203,6 +203,8 @@ log(e); return 0; } +} catch (ThreadDeath t) { +throw t; // cf. NB #47191 } catch (Throwable t) { if (failOnError) { throw new BuildException(t, getLocation()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359329 - in /ant/core/trunk: WHATSNEW src/etc/testcases/taskdefs/presetdef.xml src/main/org/apache/tools/ant/UnknownElement.java src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.
Author: jglick Date: Tue Dec 27 16:09:58 2005 New Revision: 359329 URL: http://svn.apache.org/viewcvs?rev=359329view=rev Log: #38056: NPE when using presetdef under obscure circumstances. Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/etc/testcases/taskdefs/presetdef.xml ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=359329r1=359328r2=359329view=diff == --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Tue Dec 27 16:09:58 2005 @@ -67,7 +67,8 @@ Fixed bugs: --- -* Some potential NullPointerExceptions, Bugzilla Report 37765 + +* Some potential NullPointerExceptions, Bugzilla Reports 37765 and 38056 * Problem when adding multiple filter files, Bugzilla Report 37341 Modified: ant/core/trunk/src/etc/testcases/taskdefs/presetdef.xml URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/presetdef.xml?rev=359329r1=359328r2=359329view=diff == --- ant/core/trunk/src/etc/testcases/taskdefs/presetdef.xml (original) +++ ant/core/trunk/src/etc/testcases/taskdefs/presetdef.xml Tue Dec 27 16:09:58 2005 @@ -118,4 +118,13 @@ /javac /target +target name=presetdef-with-nested-element-twice +copy todir=. +fileset dir=. includes=nonexistent/ +/copy +presetdef name=copy +copy verbose=true/ +/presetdef +/target + /project Modified: ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java?rev=359329r1=359328r2=359329view=diff == --- ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java Tue Dec 27 16:09:58 2005 @@ -41,7 +41,7 @@ /** * Holds the namespace of the element. */ -private String namespace; +private String namespace = ; /** * Holds the namespace qname of the element. @@ -111,7 +111,7 @@ getProject()); namespace = helper.getCurrentAntlibUri(); } -this.namespace = namespace; +this.namespace = namespace == null ? : namespace; } /** Return the qname of the XML element associated with this component. Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.java?rev=359329r1=359328r2=359329view=diff == --- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.java (original) +++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/PreSetDefTest.java Tue Dec 27 16:09:58 2005 @@ -80,6 +80,10 @@ correct_taskname_badel, element message, javac doesn't support the); } +public void testPresetdefWithNestedElementTwice() { // #38056 +executeTarget(presetdef-with-nested-element-twice); +executeTarget(presetdef-with-nested-element-twice); +} /** * A test class to check default properties - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359077 - /ant/core/trunk/docs/manual/CoreTasks/presetdef.html
Author: jglick Date: Mon Dec 26 08:51:31 2005 New Revision: 359077 URL: http://svn.apache.org/viewcvs?rev=359077view=rev Log: Mentioning workaround from #38040 re. eagerly evaluated properties. Modified: ant/core/trunk/docs/manual/CoreTasks/presetdef.html Modified: ant/core/trunk/docs/manual/CoreTasks/presetdef.html URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/CoreTasks/presetdef.html?rev=359077r1=359076r2=359077view=diff == --- ant/core/trunk/docs/manual/CoreTasks/presetdef.html (original) +++ ant/core/trunk/docs/manual/CoreTasks/presetdef.html Mon Dec 26 08:51:31 2005 @@ -146,6 +146,21 @@ [showmessage] message is 'Message 2' /pre /blockquote +p +It is possible to use a trick to evaluate properties when the definition is +emmade/em rather than used. This can be useful if you do not expect some +properties to be available in child builds run with +codelt;ant ... inheritall=falsegt;/code: +/p +blockquotepre class=code +lt;macrodef name=showmessage-presetdefgt; + lt;attribute name=messageval/gt; + lt;presetdef name=showmessagegt; +lt;echogt;message is '@{messageval}'lt;/echogt; + lt;/presetdefgt; +lt;/macrodefgt; +lt;showmessage-presetdef messageval=${message}/gt; +/pre/blockquote hr/hr p align=centerCopyright copy; 2003-2005 Apache Software Foundation. All rights Reserved./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354240 - /ant/core/trunk/docs/manual/ide.html
Author: jglick Date: Mon Dec 5 16:16:52 2005 New Revision: 354240 URL: http://svn.apache.org/viewcvs?rev=354240view=rev Log: Updating an ancient NetBeans reference. Modified: ant/core/trunk/docs/manual/ide.html Modified: ant/core/trunk/docs/manual/ide.html URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/ide.html?rev=354240r1=354239r2=354240view=diff == --- ant/core/trunk/docs/manual/ide.html (original) +++ ant/core/trunk/docs/manual/ide.html Mon Dec 5 16:16:52 2005 @@ -45,7 +45,7 @@ a href=http://ant.netbeans.org/; NetBeans /a -NetBeans 3.4 has very good Ant integration indeed. +NetBeans IDE uses Ant as the basis for its project system starting with the 4.0 release. /li li a href=http://jedit.org/; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354260 - /ant/core/trunk/xdocs/external.xml
Author: jglick Date: Mon Dec 5 18:03:59 2005 New Revision: 354260 URL: http://svn.apache.org/viewcvs?rev=354260view=rev Log: Another trivial update. Modified: ant/core/trunk/xdocs/external.xml Modified: ant/core/trunk/xdocs/external.xml URL: http://svn.apache.org/viewcvs/ant/core/trunk/xdocs/external.xml?rev=354260r1=354259r2=354260view=diff == --- ant/core/trunk/xdocs/external.xml (original) +++ ant/core/trunk/xdocs/external.xml Mon Dec 5 18:03:59 2005 @@ -3512,7 +3512,7 @@ table class=externals tr thCompatibility:/th -tdbundles Ant 1.6.2 as of NetBeans 4.1; 1.6.5 for NetBeans 4.2 (will be made available as a 4.1 update)/td +tdbundles Ant 1.6.2 as of NetBeans 4.1; 1.6.5 for NetBeans 5.0 /tr tr thURL:/th @@ -3636,4 +3636,4 @@ /section /body -/document \ No newline at end of file +/document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/xdocs external.xml
jglick 2005/06/22 16:24:27 Modified:xdocsexternal.xml Log: Minor update. Revision ChangesPath 1.161 +1 -1 ant/xdocs/external.xml Index: external.xml === RCS file: /home/cvs/ant/xdocs/external.xml,v retrieving revision 1.160 retrieving revision 1.161 diff -u -r1.160 -r1.161 --- external.xml 13 Jun 2005 16:39:50 - 1.160 +++ external.xml 22 Jun 2005 23:24:27 - 1.161 @@ -3399,7 +3399,7 @@ table class=externals tr thCompatibility:/th -tdbundles Ant 1.6.2 as of NetBeans 4.1; 1.6.3 for NetBeans 4.2 (will be made available as a 4.1 update)/td +tdbundles Ant 1.6.2 as of NetBeans 4.1; 1.6.5 for NetBeans 4.2 (will be made available as a 4.1 update)/td /tr tr thURL:/th - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks loadproperties.html
jglick 2005/04/19 12:21:10 Modified:docs/manual/CoreTasks loadproperties.html Log: Noting a difference between property file=.../ and loadproperties srcfile=.../. Revision ChangesPath 1.11 +2 -0 ant/docs/manual/CoreTasks/loadproperties.html Index: loadproperties.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/loadproperties.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- loadproperties.html 7 Mar 2005 18:09:09 - 1.10 +++ loadproperties.html 19 Apr 2005 19:21:10 - 1.11 @@ -13,6 +13,8 @@ Load a file's contents as Ant properties. This is equivalent to codelt;property file|resource=quot;...quot;/gt;/code except that it supports nested codelt;filterchaingt;/code elements. +Also if the file is missing, the build is halted with an error, rather +than a warning being printed. /p pIf you want to simulate a href=property.htmlproperty/a's - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
jglick 2005/03/30 08:56:19 Modified:.Tag: ANT_16_BRANCH WHATSNEW docs/manual/CoreTasks Tag: ANT_16_BRANCH javadoc.html src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH Javadoc.java Log: Merge of #30606: 'executable' attr for javadoc. Revision ChangesPath No revision No revision 1.503.2.211 +2 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.210 retrieving revision 1.503.2.211 diff -u -r1.503.2.210 -r1.503.2.211 --- WHATSNEW 29 Mar 2005 21:49:02 - 1.503.2.210 +++ WHATSNEW 30 Mar 2005 16:56:18 - 1.503.2.211 @@ -28,6 +28,8 @@ Other changes: -- +* javadoc can now take an attribute 'executable'. Bugzilla report 30606. + * New attribute ignorecontents for different selector * Javadoc fixes for Location, Project, and RuntimeConfigurable No revision No revision 1.26.2.7 +46 -36ant/docs/manual/CoreTasks/javadoc.html Index: javadoc.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v retrieving revision 1.26.2.6 retrieving revision 1.26.2.7 diff -u -r1.26.2.6 -r1.26.2.7 --- javadoc.html 17 Mar 2005 09:38:59 - 1.26.2.6 +++ javadoc.html 30 Mar 2005 16:56:19 - 1.26.2.7 @@ -19,16 +19,16 @@ quot;changedquot; files, unlike the a href=javac.htmljavac/a task. This means all packages will be processed each time this task is run. In general, however, this task is used much less frequently./p -pThis task works seamlessly between different javadoc versions (1.1, -1.2 and 1.4), with the obvious restriction that the 1.2 attributes -will be ignored if run in a 1.1 VM./p +pThis task works seamlessly between different javadoc versions (1.2 and 1.4), +with the obvious restriction that the 1.4 attributes +will be ignored if run in a 1.2 VM./p pNOTE: since javadoc calls System.exit(), javadoc cannot be run inside the -same VM as ant without breaking functionality. For this reason, this task +same VM as Ant without breaking functionality. For this reason, this task always forks the VM. This overhead is not significant since javadoc is normally a heavy application and will be called infrequently./p pNOTE: the packagelist attribute allows you to specify the list of packages to document outside of the Ant file. It's a much better practice to include everything -inside the build.xml file. This option was added in order to make it easier to +inside the codebuild.xml/code file. This option was added in order to make it easier to migrate from regular makefiles, where you would use this option of javadoc. The packages listed in packagelist are not checked, so the task performs even if some packages are missing or broken. Use this option if you wish to convert from @@ -40,9 +40,11 @@ versions, you are strongly encouraged to use a href=javadoc.htmljavadoc/a instead./i/p -pIn the table below, 1.1 means available if your current Java VM is -a 1.1 VM, 1.2 for either 1.2 or 1.3 and 1.4+ for any VM of at least version 1.4. 1.2+ -means any VM of at least version 1.2./p +pIn the table below, 1.2 means available if your current Java VM is +a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise +any VM of at least version 1.2 is acceptable. JDK 1.1 is no longer supported. +If you specify the codeexecutable/code attribute it is up to you +to ensure that this command supports the attributes you wish to use./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -94,7 +96,7 @@ tr td valign=toppackageList/td td valign=topThe name of a file containing the packages to process/td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr @@ -107,7 +109,7 @@ td valign=topBootclasspath/td td valign=topOverride location of class files loaded by the bootstrap class loader/td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr @@ -122,19 +124,19 @@ td valign=topOverride location of class files loaded by the bootstrap class loader by a href=../using.html#referencesreference/a to a PATH defined elsewhere./td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr td valign=topExtdirs/td td valign=topOverride location of installed extensions/td -td align=center valign=top1.2+/td
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
jglick 2005/03/30 08:59:26 Modified:.WHATSNEW docs/manual/CoreTasks javadoc.html src/main/org/apache/tools/ant/taskdefs Javadoc.java Log: Misc. cleanups relating to #30606. Revision ChangesPath 1.799 +4 -4 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.798 retrieving revision 1.799 diff -u -r1.798 -r1.799 --- WHATSNEW 29 Mar 2005 21:48:36 - 1.798 +++ WHATSNEW 30 Mar 2005 16:59:26 - 1.799 @@ -84,8 +84,6 @@ * Log fine-grained events at verbose level from JUnit. Bugzilla report 31885. -* javadoc can now take an attribute 'executable'. Bugzilla report 30606. - * WsdlToDotnet and style are now deprecated in favor of wsdltodotnet and xslt, respectively. Bugzilla report 25832. @@ -194,6 +192,8 @@ Other changes: -- +* javadoc can now take an attribute 'executable'. Bugzilla report 30606. + * New attribute ignorecontents for different selector * Javadoc fixes for Location, Project, and RuntimeConfigurable @@ -982,7 +982,7 @@ argument using javadoc and JDK 1.4. Bugzilla Report 16871. * junit didn't work with custom formatters that were only available - on the user specified classpath when a timeout occured. Bugzilla + on the user specified classpath when a timeout occurred. Bugzilla Report 19953. * different selector : make ignoreFileTimes effectively default to true @@ -1580,7 +1580,7 @@ again (like Ant 1.5 did). * The plain junit formatter could throw a NullPointerException - if an error occured in setUp. + if an error occurred in setUp. * junit will now produce output when a test times out as well. 1.34 +1 -1 ant/docs/manual/CoreTasks/javadoc.html Index: javadoc.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- javadoc.html 29 Mar 2005 18:23:47 - 1.33 +++ javadoc.html 30 Mar 2005 16:59:26 - 1.34 @@ -698,7 +698,7 @@ td valign=topexecutable/td td valign=topSpecify a particular codejavadoc/code executable to use in place of the default binary (found in the same JDK as Ant is running in). - emsince Ant 1.7/em./td + emsince Ant 1.6.3/em./td td align=center valign=topall/td td align=center valign=topNo/td /tr 1.141 +25 -25ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Index: Javadoc.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v retrieving revision 1.140 retrieving revision 1.141 diff -u -r1.140 -r1.141 --- Javadoc.java 29 Mar 2005 18:23:47 - 1.140 +++ Javadoc.java 30 Mar 2005 16:59:26 - 1.141 @@ -54,7 +54,7 @@ *lipatterns must be of the form xxx.*, every other pattern doesn't *work. *lithere is no control on arguments sanity since they are left - *to the javadoc implementation. + *to the Javadoc implementation. * /ul * * pIf no codedoclet/code is set, then the codeversion/code and @@ -301,9 +301,9 @@ } /** - * An HTML element in the javadoc. + * An HTML element in the Javadoc. * - * This class is used for those javadoc elements which contain HTML such as + * This class is used for those Javadoc elements which contain HTML such as * footers, headers, etc. */ public static class Html { @@ -330,7 +330,7 @@ } /** - * EnumeratedAttribute implementation supporting the javadoc scoping + * EnumeratedAttribute implementation supporting the Javadoc scoping * values. */ public static class AccessType extends EnumeratedAttribute { @@ -363,7 +363,7 @@ } /** - * Utility method to add a javadoc argument. + * Utility method to add a Javadoc argument. * * @param key the argument name. * @param value the argument value. @@ -380,7 +380,7 @@ /** * Flag which indicates if the task should fail if there is a - * javadoc error. + * Javadoc error. */ private boolean failOnError = false; private Path sourcePath = null; @@ -581,7 +581,7 @@ } /** - * Add a package to be excluded from the javadoc run. + * Add a package to be excluded from the Javadoc run. * * @param pn the name of the package (wildcards are not permitted). */ @@ -724,7 +724,7 @@ } /** - * Set
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java
jglick 2005/03/30 09:06:40 Modified:src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java Log: Fixed missing braces. Revision ChangesPath 1.117 +5 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Index: JUnitTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v retrieving revision 1.116 retrieving revision 1.117 diff -u -r1.116 -r1.117 --- JUnitTask.java29 Mar 2005 19:19:04 - 1.116 +++ JUnitTask.java30 Mar 2005 17:06:39 - 1.117 @@ -1505,7 +1505,7 @@ /** * Logs information about failed tests, potentially stops * processing (by throwing a BuildException) if a failure/error - * occured or sets a property. + * occurred or sets a property. * * @since Ant 1.6.2 */ @@ -1520,7 +1520,7 @@ /** * Logs information about failed tests, potentially stops * processing (by throwing a BuildException) if a failure/error - * occured or sets a property. + * occurred or sets a property. * * @since Ant 1.7 */ @@ -1571,10 +1571,11 @@ } protected void processLine(String line, int level) { -if (line.startsWith(TESTLISTENER_PREFIX)) +if (line.startsWith(TESTLISTENER_PREFIX)) { task.log(line, Project.MSG_VERBOSE); -else +} else { super.processLine(line, level); +} } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks exec.html
jglick 2005/03/30 09:08:27 Modified:src/testcases/org/apache/tools/ant BuildFileTest.java src/main/org/apache/tools/ant/util Watchdog.java src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTestRunner.java docs/manual/CoreTypes selectors-program.html docs/manual/CoreTasks exec.html Log: s/occured/occurred/g wherever possible - unfortunately we included the spelling error in several public method signatures. Just like java.lang.Cloneable. :-( Revision ChangesPath 1.35 +3 -3 ant/src/testcases/org/apache/tools/ant/BuildFileTest.java Index: BuildFileTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/BuildFileTest.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- BuildFileTest.java9 Mar 2005 22:56:39 - 1.34 +++ BuildFileTest.java30 Mar 2005 17:08:26 - 1.35 @@ -431,7 +431,7 @@ /** * Fired after the last target has finished. This event - * will still be thrown if an error occured during the build. + * will still be thrown if an error occurred during the build. * * @see BuildEvent#getException() */ @@ -449,7 +449,7 @@ /** * Fired when a target has finished. This event will - * still be thrown if an error occured during the build. + * still be thrown if an error occurred during the build. * * @see BuildEvent#getException() */ @@ -468,7 +468,7 @@ /** * Fired when a task has finished. This event will still - * be throw if an error occured during the build. + * be throw if an error occurred during the build. * * @see BuildEvent#getException() */ 1.14 +1 -1 ant/src/main/org/apache/tools/ant/util/Watchdog.java Index: Watchdog.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/Watchdog.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Watchdog.java 21 Jan 2005 17:37:28 - 1.13 +++ Watchdog.java 30 Mar 2005 17:08:27 - 1.14 @@ -62,7 +62,7 @@ } /** - * Inform the observers that a timeout has occured. + * Inform the observers that a timeout has occurred. */ protected final void fireTimeoutOccured() { Enumeration e = observers.elements(); 1.58 +7 -7 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Index: JUnitTestRunner.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- JUnitTestRunner.java 29 Mar 2005 19:19:04 - 1.57 +++ JUnitTestRunner.java 30 Mar 2005 17:08:27 - 1.58 @@ -593,8 +593,8 @@ new java.io.BufferedReader(new java.io.FileReader(args[0])); String testCaseName; int code = 0; -boolean errorOccured = false; -boolean failureOccured = false; +boolean errorOccurred = false; +boolean failureOccurred = false; String line = null; while ((line = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(line, ,); @@ -604,11 +604,11 @@ t.setOutfile(st.nextToken()); code = launch(t, haltError, stackfilter, haltFail, showOut, logTestListenerEvents, props); -errorOccured = (code == ERRORS); -failureOccured = (code != SUCCESS); -if (errorOccured || failureOccured) { -if ((errorOccured haltError) -|| (failureOccured haltFail)) { +errorOccurred = (code == ERRORS); +failureOccurred = (code != SUCCESS); +if (errorOccurred || failureOccurred) { +if ((errorOccurred haltError) +|| (failureOccurred haltFail)) { registerNonCrash(noCrashFile); System.exit(code); } else { 1.8 +1 -1 ant/docs/manual/CoreTypes/selectors-program.html Index: selectors-program.html
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
jglick 2005/03/29 10:23:47 Modified:.WHATSNEW docs/manual/CoreTasks javadoc.html src/main/org/apache/tools/ant/taskdefs Javadoc.java Log: #30606: add 'executable' attr to javadoc. Revision ChangesPath 1.797 +2 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.796 retrieving revision 1.797 diff -u -r1.796 -r1.797 --- WHATSNEW 28 Mar 2005 23:22:10 - 1.796 +++ WHATSNEW 29 Mar 2005 18:23:46 - 1.797 @@ -79,6 +79,8 @@ Other changes: -- +* javadoc can now take an attribute 'executable'. Bugzilla report 30606. + * WsdlToDotnet and style are now deprecated in favor of wsdltodotnet and xslt, respectively. Bugzilla report 25832. 1.33 +46 -36ant/docs/manual/CoreTasks/javadoc.html Index: javadoc.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- javadoc.html 17 Mar 2005 09:34:01 - 1.32 +++ javadoc.html 29 Mar 2005 18:23:47 - 1.33 @@ -19,16 +19,16 @@ quot;changedquot; files, unlike the a href=javac.htmljavac/a task. This means all packages will be processed each time this task is run. In general, however, this task is used much less frequently./p -pThis task works seamlessly between different javadoc versions (1.1, -1.2 and 1.4), with the obvious restriction that the 1.2 attributes -will be ignored if run in a 1.1 VM./p +pThis task works seamlessly between different javadoc versions (1.2 and 1.4), +with the obvious restriction that the 1.4 attributes +will be ignored if run in a 1.2 VM./p pNOTE: since javadoc calls System.exit(), javadoc cannot be run inside the -same VM as ant without breaking functionality. For this reason, this task +same VM as Ant without breaking functionality. For this reason, this task always forks the VM. This overhead is not significant since javadoc is normally a heavy application and will be called infrequently./p pNOTE: the packagelist attribute allows you to specify the list of packages to document outside of the Ant file. It's a much better practice to include everything -inside the build.xml file. This option was added in order to make it easier to +inside the codebuild.xml/code file. This option was added in order to make it easier to migrate from regular makefiles, where you would use this option of javadoc. The packages listed in packagelist are not checked, so the task performs even if some packages are missing or broken. Use this option if you wish to convert from @@ -40,9 +40,11 @@ versions, you are strongly encouraged to use a href=javadoc.htmljavadoc/a instead./i/p -pIn the table below, 1.1 means available if your current Java VM is -a 1.1 VM, 1.2 for either 1.2 or 1.3 and 1.4+ for any VM of at least version 1.4. 1.2+ -means any VM of at least version 1.2./p +pIn the table below, 1.2 means available if your current Java VM is +a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise +any VM of at least version 1.2 is acceptable. JDK 1.1 is no longer supported. +If you specify the codeexecutable/code attribute it is up to you +to ensure that this command supports the attributes you wish to use./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -94,7 +96,7 @@ tr td valign=toppackageList/td td valign=topThe name of a file containing the packages to process/td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr @@ -107,7 +109,7 @@ td valign=topBootclasspath/td td valign=topOverride location of class files loaded by the bootstrap class loader/td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr @@ -122,19 +124,19 @@ td valign=topOverride location of class files loaded by the bootstrap class loader by a href=../using.html#referencesreference/a to a PATH defined elsewhere./td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr td valign=topExtdirs/td td valign=topOverride location of installed extensions/td -td align=center valign=top1.2+/td +td align=center valign=topall/td td align=center valign=topNo/td /tr tr td valign=topOverview/td td valign=topRead overview documentation from HTML file/td -td align=center valign=top1.2+/td +td align=center valign=topall/td
cvs commit: ant/src/etc/testcases/taskdefs/optional/unix .cvsignore
jglick 2005/03/29 10:27:37 Added: src/etc/testcases/taskdefs/optional/unix .cvsignore Log: Ignore stray dir that can be left behind after an interrupted test. Revision ChangesPath 1.1 ant/src/etc/testcases/taskdefs/optional/unix/.cvsignore Index: .cvsignore === test-working - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/etc/testcases/taskdefs input.xml
jglick 2005/03/29 10:35:46 Modified:src/testcases/org/apache/tools/ant/util JavaEnvUtilsTest.java src/testcases/org/apache/tools/ant/types/selectors PresentSelectorTest.java DependSelectorTest.java DateSelectorTest.java src/testcases/org/apache/tools/ant/taskdefs/optional/net FTPTest.java src/testcases/org/apache/tools/ant/taskdefs ProcessDestroyerTest.java JavacTest.java InputTest.java ExecuteWatchdogTest.java ExecuteJavaTest.java CopyTest.java src/testcases/org/apache/tools/ant ProjectTest.java src/main/org/apache/tools/ant/util JavaEnvUtils.java src/main/org/apache/tools/ant/types Path.java src/main/org/apache/tools/ant/taskdefs/optional/sitraka Coverage.java src/main/org/apache/tools/ant/taskdefs/optional/javah SunJavah.java src/main/org/apache/tools/ant/taskdefs/compilers DefaultCompilerAdapter.java CompilerAdapterFactory.java src/etc/testcases/taskdefs input.xml Log: Removing old code testing for JDK 1.0 and 1.1. Revision ChangesPath 1.11 +3 -12 ant/src/testcases/org/apache/tools/ant/util/JavaEnvUtilsTest.java Index: JavaEnvUtilsTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/util/JavaEnvUtilsTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JavaEnvUtilsTest.java 6 Jan 2005 12:05:07 - 1.10 +++ JavaEnvUtilsTest.java 29 Mar 2005 18:35:45 - 1.11 @@ -69,15 +69,8 @@ FILE_UTILS.normalize(javaHome+/..).getAbsolutePath(); assertTrue(j+ is normalized and in the JDK dir, j.startsWith(javaHomeParent)); - -if (JavaEnvUtils.getJavaVersion() == JavaEnvUtils.JAVA_1_0 || -JavaEnvUtils.getJavaVersion() == JavaEnvUtils.JAVA_1_1) { -assertTrue(j+ is normalized and in the JRE dir, - j.startsWith(javaHome)); -} else { -assertTrue(j+ is normalized and not in the JRE dir, - !j.startsWith(javaHome)); -} +assertTrue(j+ is normalized and not in the JRE dir, + !j.startsWith(javaHome)); } catch (AssertionFailedError e) { // java.home is bogus @@ -117,9 +110,7 @@ assertTrue(j+ is normalized and in the JDK dir, j.startsWith(javaHomeParent)); -if (JavaEnvUtils.getJavaVersion() == JavaEnvUtils.JAVA_1_0 || -JavaEnvUtils.getJavaVersion() == JavaEnvUtils.JAVA_1_1 || -Os.isFamily(mac)) { +if (Os.isFamily(mac)) { assertTrue(j+ is normalized and in the JRE dir, j.startsWith(javaHome)); } else { 1.10 +1 -12 ant/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java Index: PresentSelectorTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PresentSelectorTest.java 7 Dec 2004 09:10:38 - 1.9 +++ PresentSelectorTest.java 29 Mar 2005 18:35:45 - 1.10 @@ -19,17 +19,10 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; -import org.apache.tools.ant.util.*; -import org.apache.tools.ant.BuildFileTest; import org.apache.tools.ant.types.Mapper; -import org.apache.tools.ant.util.FileNameMapper; -import org.apache.tools.ant.util.IdentityMapper; -import org.apache.tools.ant.util.GlobPatternMapper; import java.io.File; -import junit.framework.TestCase; -import junit.framework.AssertionFailedError; /** * Tests Present Selectors @@ -113,11 +106,7 @@ m = s.createMapper(); m.setType(flatten); results = selectionString(s); -if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) { -assertEquals(TFFF, results); -} else { -assertEquals(TTTF, results); -} +assertEquals(TTTF, results); s = (PresentSelector)getInstance(); s.setTargetdir(beddir); 1.9 +24 -33 ant/src
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitTestListenerTest.java
jglick 2005/03/29 11:19:04 Modified:src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java JUnitTestRunner.java Added: src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitTestListenerTest.java Log: #31885: junit logs more detailed events for individual tests it is running. Revision ChangesPath 1.116 +47 -9 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Index: JUnitTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v retrieving revision 1.115 retrieving revision 1.116 diff -u -r1.115 -r1.116 --- JUnitTask.java24 Mar 2005 08:35:49 - 1.115 +++ JUnitTask.java29 Mar 2005 19:19:04 - 1.116 @@ -34,6 +34,9 @@ import java.util.Map; import java.util.Properties; import java.util.Vector; +import junit.framework.AssertionFailedError; +import junit.framework.Test; +import junit.framework.TestResult; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; @@ -41,7 +44,6 @@ import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.ExecuteWatchdog; import org.apache.tools.ant.taskdefs.LogOutputStream; -import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.types.Assertions; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.CommandlineJava; @@ -52,9 +54,7 @@ import org.apache.tools.ant.types.PropertySet; import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.LoaderUtils; -import junit.framework.AssertionFailedError; -import junit.framework.Test; -import junit.framework.TestResult; +import org.apache.tools.ant.taskdefs.PumpStreamHandler; /** * Runs JUnit tests. @@ -149,6 +149,11 @@ private ForkMode forkMode = new ForkMode(perTest); private static final int STRING_BUFFER_SIZE = 128; +/** + * @since Ant 1.7 + */ +public static final String TESTLISTENER_PREFIX = +junit.framework.TestListener: ; private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); @@ -829,6 +834,7 @@ cmd.createArgument().setValue(showoutput= + String.valueOf(showOutput)); +cmd.createArgument().setValue(logtestlistenerevents=true); // #31885 StringBuffer formatterArg = new StringBuffer(STRING_BUFFER_SIZE); final FormatterElement[] feArray = mergeFormatters(test); @@ -871,9 +877,9 @@ + file., e, getLocation()); } -Execute execute = new Execute(new LogStreamHandler(this, - Project.MSG_INFO, - Project.MSG_WARN), +Execute execute = new Execute(new JUnitLogStreamHandler(this, + Project.MSG_INFO, + Project.MSG_WARN), watchdog); execute.setCommandline(cmd.getCommandline()); execute.setAntRun(getProject()); @@ -941,7 +947,9 @@ * @since Ant 1.5 */ protected void handleOutput(String output) { -if (runner != null) { +if (output.startsWith(TESTLISTENER_PREFIX)) +log(output, Project.MSG_VERBOSE); +else if (runner != null) { runner.handleOutput(output); if (showOutput) { super.handleOutput(output); @@ -1063,7 +1071,8 @@ } runner = new JUnitTestRunner(test, test.getHaltonerror(), test.getFiltertrace(), - test.getHaltonfailure(), classLoader); + test.getHaltonfailure(), false, + true, classLoader); if (summary) { log(Running + test.getName(), Project.MSG_INFO); @@ -1549,4 +1558,33 @@ public boolean timedOut = false; public boolean crashed = false; } + +/** + * @since Ant 1.7 + */ +protected static class JUnitLogOutputStream extends LogOutputStream { +private Task task; // local copy since LogOutputStream.task is private + +public JUnitLogOutputStream(Task task, int level) { +super(task, level); +this.task = task; +} + +protected void processLine(String line, int
cvs commit: ant CONTRIBUTORS
jglick 2005/03/29 11:43:50 Modified:.CONTRIBUTORS Log: Mentioning Tom Ball, author of #31885. Revision ChangesPath 1.49 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS === RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- CONTRIBUTORS 21 Mar 2005 13:52:45 - 1.48 +++ CONTRIBUTORS 29 Mar 2005 19:43:50 - 1.49 @@ -213,6 +213,7 @@ Tim Fennell Timothy Gerard Endres Tim Stephenson +Tom Ball Tom Dimock Tom Eugelink Ulrich Schmidt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/loader AntClassLoader2.java
jglick 2005/03/29 11:56:15 Modified:src/main/org/apache/tools/ant AntClassLoader.java Project.java src/main/org/apache/tools/ant/loader AntClassLoader2.java Log: #27285: simplify AntClassLoader by removing reflection hacks (and separate ACL2) only needed for JDK 1.1 support. Revision ChangesPath 1.93 +226 -59 ant/src/main/org/apache/tools/ant/AntClassLoader.java Index: AntClassLoader.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/AntClassLoader.java,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- AntClassLoader.java 14 Mar 2005 09:19:27 - 1.92 +++ AntClassLoader.java 29 Mar 2005 19:56:15 - 1.93 @@ -14,6 +14,7 @@ * limitations under the License. * */ + package org.apache.tools.ant; import java.io.ByteArrayOutputStream; @@ -21,14 +22,22 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; +import java.util.Collections; import java.util.Enumeration; +import java.util.HashMap; import java.util.Hashtable; +import java.util.Map; +import java.util.StringTokenizer; import java.util.Vector; +import java.util.jar.Attributes; +import java.util.jar.Attributes.Name; +import java.util.jar.JarFile; +import java.util.jar.Manifest; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.apache.tools.ant.types.Path; @@ -192,6 +201,9 @@ */ private Hashtable zipFiles = new Hashtable(); +/** Static map of jar file/time to manifiest class-path entries */ +private static Map/*String,String*/ pathMap = Collections.synchronizedMap(new HashMap()); + /** * The context loader saved when setting the thread's current * context loader. @@ -203,36 +215,6 @@ private boolean isContextLoaderSaved = false; /** - * Reflection method reference for getProtectionDomain; - * used to avoid 1.1-compatibility problems. - */ -private static Method getProtectionDomain = null; - -/** - * Reflection method reference for defineClassProtectionDomain; - * used to avoid 1.1-compatibility problems. - */ -private static Method defineClassProtectionDomain = null; - - -// Set up the reflection-based Java2 methods if possible -static { -try { -getProtectionDomain -= Class.class.getMethod(getProtectionDomain, new Class[0]); -Class protectionDomain -= Class.forName(java.security.ProtectionDomain); -Class[] args = new Class[] {String.class, byte[].class, -Integer.TYPE, Integer.TYPE, protectionDomain}; -defineClassProtectionDomain -= ClassLoader.class.getDeclaredMethod(defineClass, args); -} catch (Exception e) { -// ignore failure to get access to 1.2+ methods -} -} - - -/** * Create an Ant Class Loader */ public AntClassLoader() { @@ -452,7 +434,9 @@ } /** - * Add a file to the path + * Add a file to the path. + * Reads the manifest, if available, and adds any additional class path jars + * specified in the manifest. * * @param pathComponent the file which is to be added to the path for * this class loader @@ -461,6 +445,66 @@ */ protected void addPathFile(File pathComponent) throws IOException { pathComponents.addElement(pathComponent); +if (pathComponent.isDirectory()) { +return; +} + +String absPathPlusTimeAndLength = +pathComponent.getAbsolutePath() + pathComponent.lastModified() + - ++ pathComponent.length(); +String classpath = (String) pathMap.get(absPathPlusTimeAndLength); +if (classpath == null) { +ZipFile jarFile = null; +InputStream manifestStream = null; +try { +jarFile = new ZipFile(pathComponent); +manifestStream += jarFile.getInputStream(new ZipEntry(META-INF/MANIFEST.MF)); + +if (manifestStream == null) { +return; +} +Reader manifestReader += new InputStreamReader(manifestStream, UTF-8); +org.apache.tools.ant.taskdefs.Manifest
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs ExecuteJava.java
jglick 2005/03/29 12:39:00 Modified:src/main/org/apache/tools/ant/taskdefs ExecuteJava.java Log: #32941: do not try to catch ThreadDeath when java fork=false is halted. Revision ChangesPath 1.50 +4 -0 ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java Index: ExecuteJava.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- ExecuteJava.java 11 Mar 2005 14:56:48 - 1.49 +++ ExecuteJava.java 29 Mar 2005 20:39:00 - 1.50 @@ -146,6 +146,7 @@ thread = new Thread(this, ExecuteJava); Task currentThreadTask = project.getThreadTask(Thread.currentThread()); +// XXX is the following really necessary? it is in the same thread group... project.registerThreadTask(thread, currentThreadTask); // if we run into a timeout, the run-away thread shall not // make the VM run forever - if no timeout occurs, Ant's @@ -180,6 +181,9 @@ + classpath); } catch (SecurityException e) { throw e; +} catch (ThreadDeath e) { +// XXX could perhaps also call thread.stop(); not sure if anyone cares +throw e; } catch (Throwable e) { throw new BuildException(e); } finally { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs ExecuteJava.java
jglick 2005/03/29 12:40:01 Modified:src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH ExecuteJava.java Log: Merge of #32941: do not catch ThreadDeath when java fork=false is halted. Revision ChangesPath No revision No revision 1.38.2.7 +2 -0 ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java Index: ExecuteJava.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java,v retrieving revision 1.38.2.6 retrieving revision 1.38.2.7 diff -u -r1.38.2.6 -r1.38.2.7 --- ExecuteJava.java 4 Feb 2005 08:13:46 - 1.38.2.6 +++ ExecuteJava.java 29 Mar 2005 20:40:01 - 1.38.2.7 @@ -172,6 +172,8 @@ + classpath); } catch (SecurityException e) { throw e; +} catch (ThreadDeath e) { +throw e; } catch (Throwable e) { throw new BuildException(e); } finally { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant Project.java
jglick 2005/03/29 13:46:36 Modified:src/main/org/apache/tools/ant Project.java Log: Avoid hypothetical memory leak by not holding a strong reference to the thread or thread groups used as keys to report task associations. Revision ChangesPath 1.190 +7 -4 ant/src/main/org/apache/tools/ant/Project.java Index: Project.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v retrieving revision 1.189 retrieving revision 1.190 diff -u -r1.189 -r1.190 --- Project.java 29 Mar 2005 19:56:15 - 1.189 +++ Project.java 29 Mar 2005 21:46:36 - 1.190 @@ -23,6 +23,7 @@ import java.io.InputStream; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.Collections; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; @@ -31,6 +32,8 @@ import java.util.Vector; import java.util.Set; import java.util.HashSet; +import java.util.Map; +import java.util.WeakHashMap; import org.apache.tools.ant.input.DefaultInputHandler; import org.apache.tools.ant.input.InputHandler; import org.apache.tools.ant.helper.DefaultExecutor; @@ -157,11 +160,11 @@ */ private ClassLoader coreLoader = null; -/** Records the latest task to be executed on a thread (Thread to Task). */ -private Hashtable threadTasks = new Hashtable(); +/** Records the latest task to be executed on a thread. */ +private Map/*Thread,Task*/ threadTasks = Collections.synchronizedMap(new WeakHashMap()); -/** Records the latest task to be executed on a thread Group. */ -private Hashtable threadGroupTasks = new Hashtable(); +/** Records the latest task to be executed on a thread group. */ +private Map/*ThreadGroup,Task*/ threadGroupTasks = Collections.synchronizedMap(new WeakHashMap()); /** * Called to handle any input requests. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs AntStructure.java
jglick 2005/03/29 13:47:59 Modified:src/main/org/apache/tools/ant IntrospectionHelper.java ProjectHelper.java UnknownElement.java src/main/org/apache/tools/ant/helper ProjectHelperImpl.java src/main/org/apache/tools/ant/taskdefs AntStructure.java Log: #30162: try to avoid a memory leak in IntrospectionHelper.getHelper(). Revision ChangesPath 1.94 +14 -9 ant/src/main/org/apache/tools/ant/IntrospectionHelper.java Index: IntrospectionHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- IntrospectionHelper.java 16 Dec 2004 21:11:19 - 1.93 +++ IntrospectionHelper.java 29 Mar 2005 21:47:59 - 1.94 @@ -310,12 +310,7 @@ * @return a helper for the specified class */ public static synchronized IntrospectionHelper getHelper(Class c) { -IntrospectionHelper ih = (IntrospectionHelper) helpers.get(c); -if (ih == null) { -ih = new IntrospectionHelper(c); -helpers.put(c, ih); -} -return ih; +return getHelper(null, c); } /** @@ -332,9 +327,19 @@ * @return a helper for the specified class */ public static IntrospectionHelper getHelper(Project p, Class c) { -IntrospectionHelper ih = getHelper(c); -// Cleanup at end of project -p.addBuildListener(ih); +IntrospectionHelper ih = (IntrospectionHelper) helpers.get(c); +if (ih == null) { +ih = new IntrospectionHelper(c); +if (p != null) { +// #30162: do *not* cache this if there is no project, as we +// cannot guarantee that the cache will be cleared. +helpers.put(c, ih); +} +} +if (p != null) { +// Cleanup at end of project +p.addBuildListener(ih); +} return ih; } 1.115 +3 -5 ant/src/main/org/apache/tools/ant/ProjectHelper.java Index: ProjectHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ProjectHelper.java,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- ProjectHelper.java13 Dec 2004 16:43:51 - 1.114 +++ ProjectHelper.java29 Mar 2005 21:47:59 - 1.115 @@ -304,9 +304,7 @@ } IntrospectionHelper ih = -IntrospectionHelper.getHelper(target.getClass()); - -project.addBuildListener(ih); +IntrospectionHelper.getHelper(project, target.getClass()); for (int i = 0; i attrs.getLength(); i++) { // reflect these into the target @@ -368,7 +366,7 @@ target = ((TypeAdapter) target).getProxy(); } -IntrospectionHelper.getHelper(target.getClass()).addText(project, +IntrospectionHelper.getHelper(project, target.getClass()).addText(project, target, text); } @@ -388,7 +386,7 @@ public static void storeChild(Project project, Object parent, Object child, String tag) { IntrospectionHelper ih -= IntrospectionHelper.getHelper(parent.getClass()); += IntrospectionHelper.getHelper(project, parent.getClass()); ih.storeElement(project, parent, child, tag); } 1.88 +1 -1 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- UnknownElement.java 3 Mar 2005 14:02:32 - 1.87 +++ UnknownElement.java 29 Mar 2005 21:47:59 - 1.88 @@ -320,7 +320,7 @@ String parentUri = getNamespace(); Class parentClass = parent.getClass(); -IntrospectionHelper ih = IntrospectionHelper.getHelper(parentClass); +IntrospectionHelper ih = IntrospectionHelper.getHelper(getProject(), parentClass); if (children != null) { 1.30 +1 -1 ant/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java Index: ProjectHelperImpl.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ProjectHelperImpl.java6 Jan 2005 12:05:09 - 1.29
cvs commit: ant WHATSNEW
jglick 2005/03/29 13:48:36 Modified:.WHATSNEW Log: Updated from recent commits. Revision ChangesPath 1.798 +8 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.797 retrieving revision 1.798 diff -u -r1.797 -r1.798 --- WHATSNEW 29 Mar 2005 18:23:46 - 1.797 +++ WHATSNEW 29 Mar 2005 21:48:36 - 1.798 @@ -48,6 +48,9 @@ Fixed bugs: --- +* Memory leak from IntrospectionHelper.getHelper(Class) in embedded + environments. Bugzilla Report 30162. + * Translate task does not remove tokens when a key is not found. It logs a verbose message. Bugzilla Report 13936. @@ -79,6 +82,8 @@ Other changes: -- +* Log fine-grained events at verbose level from JUnit. Bugzilla report 31885. + * javadoc can now take an attribute 'executable'. Bugzilla report 30606. * WsdlToDotnet and style are now deprecated in favor of wsdltodotnet and @@ -322,6 +327,9 @@ Fixed bugs: --- +* Do not pass on ThreadDeath when halting java fork=false. Bugzilla + 32941. + * Killing a thread running java fork=true (e.g. from an IDE) would not stop the forked process. Bugzilla 31928. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant WHATSNEW
jglick 2005/03/29 13:49:03 Modified:.Tag: ANT_16_BRANCH WHATSNEW Log: Updated from recent commits. Revision ChangesPath No revision No revision 1.503.2.210 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.209 retrieving revision 1.503.2.210 diff -u -r1.503.2.209 -r1.503.2.210 --- WHATSNEW 28 Mar 2005 21:42:13 - 1.503.2.209 +++ WHATSNEW 29 Mar 2005 21:49:02 - 1.503.2.210 @@ -141,6 +141,9 @@ Fixed bugs: --- +* Do not pass on ThreadDeath when halting java fork=false. Bugzilla + 32941. + * Killing a thread running java fork=true (e.g. from an IDE) would not stop the forked process. Bugzilla 31928. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Execute.java
jglick 2005/03/28 13:43:18 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs Execute.java Log: #31928: stop a forked process if the thread running java is stopped. Revision ChangesPath 1.795 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.794 retrieving revision 1.795 diff -u -r1.794 -r1.795 --- WHATSNEW 25 Mar 2005 12:28:59 - 1.794 +++ WHATSNEW 28 Mar 2005 21:43:18 - 1.795 @@ -317,6 +317,9 @@ Fixed bugs: --- +* Killing a thread running java fork=true (e.g. from an IDE) would + not stop the forked process. Bugzilla 31928. + * Programs run with java fork=true can now accept standard input from the Ant console. (Programs run with java fork=false could already do so.) Bugzilla 24918. 1.94 +4 -4 ant/src/main/org/apache/tools/ant/taskdefs/Execute.java Index: Execute.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- Execute.java 10 Mar 2005 12:50:57 - 1.93 +++ Execute.java 28 Mar 2005 21:43:18 - 1.94 @@ -27,11 +27,8 @@ import java.io.StringReader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.Map; -import java.util.Set; import java.util.Vector; import org.apache.tools.ant.BuildException; @@ -40,7 +37,6 @@ import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.util.FileUtils; -import org.apache.tools.ant.util.JavaEnvUtils; /** * Runs an external program. @@ -485,6 +481,10 @@ watchdog.checkException(); } return getExitValue(); +} catch (ThreadDeath t) { +// #31928: forcibly kill it before continuing. +process.destroy(); +throw t; } finally { // remove the process to the list of those to destroy if // the VM exits - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional XsltTest.java
jglick 2005/03/28 15:22:12 Modified:.WHATSNEW docs/manual coretasklist.html tasksoverview.html docs/manual/CoreTasks style.html docs/manual/OptionalTasks dotnet.html src/etc/testcases/taskdefs/optional xslt.xml src/etc/testcases/taskdefs/style build.xml src/main/org/apache/tools/ant/taskdefs DependSet.java Javadoc.java XSLTProcess.java defaults.properties src/main/org/apache/tools/ant/taskdefs/optional/dotnet WsdlToDotnet.java src/testcases/org/apache/tools/ant/taskdefs StyleTest.java src/testcases/org/apache/tools/ant/taskdefs/optional XsltTest.java Log: #25832: deprecating the task names WsdlToDotnet and style. Revision ChangesPath 1.796 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.795 retrieving revision 1.796 diff -u -r1.795 -r1.796 --- WHATSNEW 28 Mar 2005 21:43:18 - 1.795 +++ WHATSNEW 28 Mar 2005 23:22:10 - 1.796 @@ -79,6 +79,9 @@ Other changes: -- +* WsdlToDotnet and style are now deprecated in favor of wsdltodotnet and + xslt, respectively. Bugzilla report 25832. + * echoproperties now (alphanumerically) sorts the property list before echoing. Bugzilla report 18976. 1.59 +1 -2 ant/docs/manual/coretasklist.html Index: coretasklist.html === RCS file: /home/cvs/ant/docs/manual/coretasklist.html,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- coretasklist.html 7 Mar 2005 18:38:26 - 1.58 +++ coretasklist.html 28 Mar 2005 23:22:11 - 1.59 @@ -84,7 +84,6 @@ a href=CoreTasks/signjar.htmlSignJar/abr a href=CoreTasks/sleep.htmlSleep/abr a href=CoreTasks/sql.htmlSql/abr -a href=CoreTasks/style.htmlStyle/abr a href=CoreTasks/subant.htmlSubant/abr a href=CoreTasks/sync.htmlSync/abr a href=CoreTasks/tar.htmlTar/abr @@ -102,7 +101,7 @@ a href=CoreTasks/whichresource.htmlWhichResource/abr a href=CoreTasks/war.htmlWar/abr a href=CoreTasks/xmlproperty.htmlXmlProperty/abr -a href=CoreTasks/style.htmlXslt/abr +a href=CoreTasks/style.htmlXSLT/iStyle/i/abr a href=CoreTasks/zip.htmlZip/abr /body /html 1.30 +1 -1 ant/docs/manual/tasksoverview.html Index: tasksoverview.html === RCS file: /home/cvs/ant/docs/manual/tasksoverview.html,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- tasksoverview.html7 Mar 2005 18:38:26 - 1.29 +++ tasksoverview.html28 Mar 2005 23:22:11 - 1.30 @@ -946,7 +946,7 @@ /tr tr valign=top -td nowrapa href=CoreTasks/style.htmlXslt/Style/a/td +td nowrapa href=CoreTasks/style.htmlXSLT/a/td tdpProcesses a set of documents via XSLT./p/td /tr 1.38 +3 -2 ant/docs/manual/CoreTasks/style.html Index: style.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/style.html,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- style.html15 Mar 2005 16:12:44 - 1.37 +++ style.html28 Mar 2005 23:22:11 - 1.38 @@ -3,12 +3,13 @@ head meta http-equiv=Content-Language content=en-us link rel=stylesheet type=text/css href=../stylesheets/style.css/ -titleXslt/Style Task/title +titleXSLT Task/title /head body -h2a name=styleXslt/Style/a/h2 +h2a name=styleXSLT/a/h2 +pemThe name codestyle/code is a deprecated name for the same task./em/p h3Description/h3 pProcess a set of documents via XSLT./p pThis is useful for building views of XML based documentation, 1.24 +3 -3 ant/docs/manual/OptionalTasks/dotnet.html Index: dotnet.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- dotnet.html 11 Mar 2005 09:42:56 - 1.23 +++ dotnet.html 28 Mar 2005 23:22:11 - 1.24 @@ -69,7 +69,7 @@ tdbDescription/b/td /tr tr - tda href=csc.htmlCsc/a/td + tda href=csc.htmlcsc/a/td tdCompiles C# code/td /tr @@ -94,12 +94,12 @@ /tr tr - tda href=wsdltodotnet.htmlWsdlToDotnet/a/td + tda href=wsdltodotnet.htmlwsdltodotnet/a/td tdGenerates .NET code (C# or VB) from a WSDL file/td /tr tr - tda href
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Java.java PumpStreamHandler.java Redirector.java StreamPumper.java
jglick 2005/03/16 08:52:27 Modified:.Tag: ANT_16_BRANCH WHATSNEW docs/manual/CoreTasks Tag: ANT_16_BRANCH java.html src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH Java.java PumpStreamHandler.java Redirector.java StreamPumper.java Log: Merging java fork=true console input fix to Ant 1.6.3. PR: 24918 Revision ChangesPath No revision No revision 1.503.2.200 +4 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.199 retrieving revision 1.503.2.200 diff -u -r1.503.2.199 -r1.503.2.200 --- WHATSNEW 15 Mar 2005 20:57:30 - 1.503.2.199 +++ WHATSNEW 16 Mar 2005 16:52:25 - 1.503.2.200 @@ -129,6 +129,10 @@ Fixed bugs: --- +* Programs run with java fork=true can now accept standard input + from the Ant console. (Programs run with java fork=false could + already do so.) Bugzilla 24918. + * AbstractCvsTask prematurely closed its outputStream and errorStream. Bugzilla 30097. No revision No revision 1.24.2.12 +7 -7 ant/docs/manual/CoreTasks/java.html Index: java.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/java.html,v retrieving revision 1.24.2.11 retrieving revision 1.24.2.12 diff -u -r1.24.2.11 -r1.24.2.12 --- java.html 10 Mar 2005 13:07:43 - 1.24.2.11 +++ java.html 16 Mar 2005 16:52:26 - 1.24.2.12 @@ -16,10 +16,9 @@ If odd things go wrong when you run this task, set fork=true to use a new JVM. -pNote that you cannot interact with a forked VM, the only way to -send input to it is via the input and inputstring attributes. Also note that -in Ant 1.6, any attempt to read input in the forked VM will receive an -EOF (-1). This is a change from Ant 1.5, where such an attempt would block./p +pAs of Ant 1.6.3, you can interact with a forked VM, as well as +sending input to it via the codeinput/code and codeinputstring/code +attributes./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -156,14 +155,16 @@ td valign=topA file from which the executed command's standard input is taken. This attribute is mutually exclusive with the inputstring attribute/td -td align=center valign=topNo/td +td align=center valign=topNo; default is to take standard input from console +(unless codespawn=true/code)/td /tr tr td valign=topinputstring/td td valign=topA string which serves as the input stream for the executed command. This attribute is mutually exclusive with the input attribute./td -td align=center valign=topNo/td +td align=center valign=topNo; default is to take standard input from console +(unless codespawn=true/code)/td /tr tr td valign=topnewenvironment/td @@ -314,4 +315,3 @@ /body /html - No revision No revision 1.77.2.12 +8 -6 ant/src/main/org/apache/tools/ant/taskdefs/Java.java Index: Java.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v retrieving revision 1.77.2.11 retrieving revision 1.77.2.12 diff -u -r1.77.2.11 -r1.77.2.12 --- Java.java 23 Jun 2004 19:17:12 - 1.77.2.11 +++ Java.java 16 Mar 2005 16:52:27 - 1.77.2.12 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 The Apache Software Foundation + * Copyright 2000-2005 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. @@ -35,6 +35,7 @@ import org.apache.tools.ant.types.Assertions; import org.apache.tools.ant.types.Permissions; import org.apache.tools.ant.types.RedirectorElement; +import org.apache.tools.ant.util.KeepAliveInputStream; /** * Launcher for Java applications. Allows use of @@ -624,11 +625,8 @@ */ public int handleInput(byte[] buffer, int offset, int length) throws IOException { -if (redirector.getInputStream() != null) { -return redirector.handleInput(buffer, offset, length); -} else { -return super.handleInput(buffer, offset, length); -} +// Should work whether or not redirector.inputStream == null: +return redirector.handleInput(buffer, offset, length); } /** @@ -687,6 +685,10 @@ if (redirectorElement != null
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs PumpStreamHandler.java Redirector.java StreamPumper.java
jglick 2005/03/16 08:56:03 Modified:.WHATSNEW docs/manual/CoreTasks java.html src/main/org/apache/tools/ant/taskdefs PumpStreamHandler.java Redirector.java StreamPumper.java Log: Backdating since notices for #24918 (console input for java fork=true): 1.7 - 1.6.3. Revision ChangesPath 1.781 +4 -4 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.780 retrieving revision 1.781 diff -u -r1.780 -r1.781 --- WHATSNEW 15 Mar 2005 13:35:28 - 1.780 +++ WHATSNEW 16 Mar 2005 16:56:03 - 1.781 @@ -36,10 +36,6 @@ Fixed bugs: --- -* Programs run with java fork=true can now accept standard input - from the Ant console. (Programs run with java fork=false could - already do so.) Bugzilla Report 24918. - * Translate task does not remove tokens when a key is not found. It logs a verbose message. Bugzilla Report 13936. @@ -283,6 +279,10 @@ Fixed bugs: --- +* Programs run with java fork=true can now accept standard input + from the Ant console. (Programs run with java fork=false could + already do so.) Bugzilla 24918. + * AbstractCvsTask prematurely closed its outputStream and errorStream. Bugzilla 30097. 1.40 +1 -1 ant/docs/manual/CoreTasks/java.html Index: java.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/java.html,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- java.html 14 Mar 2005 20:09:54 - 1.39 +++ java.html 16 Mar 2005 16:56:03 - 1.40 @@ -16,7 +16,7 @@ If odd things go wrong when you run this task, set fork=true to use a new JVM. -pAs of Ant 1.7, you can interact with a forked VM, as well as +pAs of Ant 1.6.3, you can interact with a forked VM, as well as sending input to it via the codeinput/code and codeinputstring/code attributes./p 1.23 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java Index: PumpStreamHandler.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- PumpStreamHandler.java28 Jan 2005 11:22:12 - 1.22 +++ PumpStreamHandler.java16 Mar 2005 16:56:03 - 1.23 @@ -219,7 +219,7 @@ /** * Creates a stream pumper to copy the given input stream to the * given output stream. Used for standard input. - * @since Ant 1.7 + * @since Ant 1.6.3 */ /*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { 1.27 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java Index: Redirector.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- Redirector.java 10 Feb 2005 22:32:20 - 1.26 +++ Redirector.java 16 Mar 2005 16:56:03 - 1.27 @@ -231,7 +231,7 @@ * Set a stream to use as input. * * @param inputStream the stream from which input will be read - * @since Ant 1.7 + * @since Ant 1.6.3 */ /*public*/ void setInputStream(InputStream inputStream) { this.inputStream = inputStream; 1.23 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java Index: StreamPumper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- StreamPumper.java 28 Jan 2005 10:15:34 - 1.22 +++ StreamPumper.java 16 Mar 2005 16:56:03 - 1.23 @@ -66,7 +66,7 @@ /** * Set whether data should be flushed through to the output stream. * @param autoflush if true, push through data; if false, let it be buffered - * @since Ant 1.7 + * @since Ant 1.6.3 */ /*public*/ void setAutoflush(boolean autoflush) { this.autoflush = autoflush; @@ -134,7 +134,7 @@ * Note that it may continue to block on the input stream * but it will really stop the thread as soon as it gets EOF * or any byte, and it will be marked as finished. - * @since Ant 1.7 + * @since Ant 1.6.3 */ /*public
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Java.java PumpStreamHandler.java Redirector.java StreamPumper.java
jglick 2005/01/27 08:36:11 Modified:.WHATSNEW docs/manual/CoreTasks java.html src/main/org/apache/tools/ant/taskdefs Java.java PumpStreamHandler.java Redirector.java StreamPumper.java Log: Permit java fork=true to accept standard input from console. PR: 24918 Revision ChangesPath 1.731 +4 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.730 retrieving revision 1.731 diff -u -r1.730 -r1.731 --- WHATSNEW 27 Jan 2005 12:42:09 - 1.730 +++ WHATSNEW 27 Jan 2005 16:36:11 - 1.731 @@ -24,6 +24,10 @@ Fixed bugs: --- +* Programs run with java fork=true can now accept standard input + from the Ant console. (Programs run with java fork=false could + already do so.) Bugzilla Report 24918. + * Translate task does not remove tokens when a key is not found. It logs a verbose message. Bugzilla Report 13936. 1.36 +7 -7 ant/docs/manual/CoreTasks/java.html Index: java.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/java.html,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- java.html 10 Jan 2005 10:59:31 - 1.35 +++ java.html 27 Jan 2005 16:36:11 - 1.36 @@ -15,10 +15,9 @@ If odd things go wrong when you run this task, set fork=true to use a new JVM. -pNote that you cannot interact with a forked VM, the only way to -send input to it is via the input and inputstring attributes. Also note that -in Ant 1.6, any attempt to read input in the forked VM will receive an -EOF (-1). This is a change from Ant 1.5, where such an attempt would block./p +pAs of Ant 1.7, you can interact with a forked VM, as well as +sending input to it via the codeinput/code and codeinputstring/code +attributes./p h3Parameters/h3 table border=1 cellpadding=2 cellspacing=0 @@ -157,14 +156,16 @@ td valign=topA file from which the executed command's standard input is taken. This attribute is mutually exclusive with the inputstring attribute/td -td align=center valign=topNo/td +td align=center valign=topNo; default is to take standard input from console +(unless codespawn=true/code)/td /tr tr td valign=topinputstring/td td valign=topA string which serves as the input stream for the executed command. This attribute is mutually exclusive with the input attribute./td -td align=center valign=topNo/td +td align=center valign=topNo; default is to take standard input from console +(unless codespawn=true/code)/td /tr tr td valign=topnewenvironment/td @@ -353,4 +354,3 @@ /body /html - 1.97 +8 -6 ant/src/main/org/apache/tools/ant/taskdefs/Java.java Index: Java.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- Java.java 22 Nov 2004 09:23:27 - 1.96 +++ Java.java 27 Jan 2005 16:36:11 - 1.97 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 The Apache Software Foundation + * Copyright 2000-2005 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. @@ -37,6 +37,7 @@ import org.apache.tools.ant.types.RedirectorElement; import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.util.JavaEnvUtils; +import org.apache.tools.ant.util.KeepAliveInputStream; /** * Launcher for Java applications. Allows use of @@ -639,11 +640,8 @@ */ public int handleInput(byte[] buffer, int offset, int length) throws IOException { -if (redirector.getInputStream() != null) { -return redirector.handleInput(buffer, offset, length); -} else { -return super.handleInput(buffer, offset, length); -} +// Should work whether or not redirector.inputStream == null: +return redirector.handleInput(buffer, offset, length); } /** @@ -702,6 +700,10 @@ if (redirectorElement != null) { redirectorElement.configure(redirector); } +if (!spawn input == null inputString == null) { +// #24918: send standard input to the process by default. +redirector.setInputStream(new KeepAliveInputStream(getProject().getDefaultInputStream
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Available.java
jglick 2005/01/24 18:29:43 Modified:src/main/org/apache/tools/ant/taskdefs Available.java Log: Log warnings as warnings. Revision ChangesPath 1.65 +4 -2 ant/src/main/org/apache/tools/ant/taskdefs/Available.java Index: Available.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- Available.java11 Jan 2005 16:34:57 - 1.64 +++ Available.java25 Jan 2005 02:29:43 - 1.65 @@ -165,7 +165,8 @@ */ public void setType(String type) { log(DEPRECATED - The setType(String) method has been deprecated. -+ Use setType(Available.FileDir) instead.); ++ Use setType(Available.FileDir) instead., +Project.MSG_WARN); this.type = new FileDir(); this.type.setValue(type); } @@ -211,7 +212,8 @@ + property. + StringUtils.LINE_SEP + Build file should not reuse the same property -+ name for different values.); ++ name for different values., +Project.MSG_WARN); } // NB: this makes use of Project#setProperty rather than Project#setNewProperty // due to backwards compatiblity reasons - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs faq.html
jglick 2005/01/02 10:28:16 Modified:xdocsfaq.xml docs faq.html Log: Typo (UFT8). PR: 32907 Reported by: Jed Smith [EMAIL PROTECTED] Revision ChangesPath 1.66 +1 -1 ant/xdocs/faq.xml Index: faq.xml === RCS file: /home/cvs/ant/xdocs/faq.xml,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- faq.xml 13 Dec 2004 22:51:19 - 1.65 +++ faq.xml 2 Jan 2005 18:28:15 - 1.66 @@ -601,7 +601,7 @@ pIf your file names contain national characters you should know that Sunapos;s codejar/code utility like Antapos;s -codelt;jargt;/code uses UFT8 to encode their names while +codelt;jargt;/code uses UTF-8 to encode their names while codelt;zipgt;/code uses your platforms default encoding. Use the encoding attribute of codelt;zipgt;/code if necessary./p 1.113 +1 -1 ant/docs/faq.html Index: faq.html === RCS file: /home/cvs/ant/docs/faq.html,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- faq.html 13 Dec 2004 22:51:19 - 1.112 +++ faq.html 2 Jan 2005 18:28:15 - 1.113 @@ -978,7 +978,7 @@ MANIFEST you can simply use codelt;zipgt;/code./p pIf your file names contain national characters you should know that Sun's codejar/code utility like Ant's -codelt;jargt;/code uses UFT8 to encode their names while +codelt;jargt;/code uses UTF-8 to encode their names while codelt;zipgt;/code uses your platforms default encoding. Use the encoding attribute of codelt;zipgt;/code if necessary./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs faq.html
jglick 2005/01/02 10:31:06 Modified:xdocsTag: ANT_16_BRANCH faq.xml docs Tag: ANT_16_BRANCH faq.html Log: Merge of #32907. Revision ChangesPath No revision No revision 1.38.2.18 +1 -1 ant/xdocs/faq.xml Index: faq.xml === RCS file: /home/cvs/ant/xdocs/faq.xml,v retrieving revision 1.38.2.17 retrieving revision 1.38.2.18 diff -u -r1.38.2.17 -r1.38.2.18 --- faq.xml 21 Sep 2004 12:07:54 - 1.38.2.17 +++ faq.xml 2 Jan 2005 18:31:06 - 1.38.2.18 @@ -584,7 +584,7 @@ pIf your file names contain national characters you should know that Sunapos;s codejar/code utility like Antapos;s -codelt;jargt;/code uses UFT8 to encode their names while +codelt;jargt;/code uses UTF-8 to encode their names while codelt;zipgt;/code uses your platforms default encoding. Use the encoding attribute of codelt;zipgt;/code if necessary./p No revision No revision 1.77.2.19 +1 -1 ant/docs/faq.html Index: faq.html === RCS file: /home/cvs/ant/docs/faq.html,v retrieving revision 1.77.2.18 retrieving revision 1.77.2.19 diff -u -r1.77.2.18 -r1.77.2.19 --- faq.html 21 Sep 2004 12:07:53 - 1.77.2.18 +++ faq.html 2 Jan 2005 18:31:06 - 1.77.2.19 @@ -944,7 +944,7 @@ MANIFEST you can simply use codelt;zipgt;/code./p pIf your file names contain national characters you should know that Sun's codejar/code utility like Ant's -codelt;jargt;/code uses UFT8 to encode their names while +codelt;jargt;/code uses UTF-8 to encode their names while codelt;zipgt;/code uses your platforms default encoding. Use the encoding attribute of codelt;zipgt;/code if necessary./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant docs.xml ReleaseInstructions
jglick 2005/01/02 10:34:39 Modified:.docs.xml ReleaseInstructions Log: Make it possible to use docs.xml even without a jakarta-site2 checkout. Revision ChangesPath 1.6 +33 -10ant/docs.xml Index: docs.xml === RCS file: /home/cvs/ant/docs.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- docs.xml 6 Jul 2003 09:03:17 - 1.5 +++ docs.xml 2 Jan 2005 18:34:39 - 1.6 @@ -1,22 +1,44 @@ project name=build-site default=docs basedir=. +description +Build documentation - XDocs and Javadoc. +For building XDocs, edit xdocs/**/*.xml first. +If ../jakarta-site2 does not exist, set -Dsite.dir=... for it, +or just use -Dvelocity.dir=.../velocity-4.x if you have downloaded Velocity somewhere. + +XXX for no apparent reason, your CWD must be the main Ant source dir, or this will fail: +.../docs.xml:64: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource './site.vsl' +/description + !-- Initialization properties -- property name=project.name value=ant/ property name=docs.src location=xdocs/ property name=docs.destlocation=docs/ property name=project.file value=stylesheets/project.xml / -property name=site.dir location=../jakarta-site2 / property name=templ.path location=xdocs/stylesheets / property name=velocity.props location=${docs.src}/velocity.properties / property name=include.xml value=**/*.xml / -path id=anakia.classpath -fileset dir=${site.dir}/lib -include name=*.jar/ -/fileset -/path +target name=setup-explicit-classpath if=velocity.dir +path id=anakia.classpath +fileset dir=${velocity.dir} +include name=velocity-dep-*.jar/ +!-- XXX why is this needed separately? -- +include name=build/lib/jdom-*.jar/ +/fileset +/path +/target -target name=prepare +target name=setup-implicit-classpath unless=velocity.dir +property name=site.dir location=../jakarta-site2/ +path id=anakia.classpath +fileset dir=${site.dir}/lib +include name=*.jar/ +/fileset +/path +/target + +target name=prepare depends=setup-explicit-classpath,setup-implicit-classpath available classname=org.apache.velocity.anakia.AnakiaTask property=AnakiaTask.present classpath refid=anakia.classpath/ @@ -30,7 +52,7 @@ /echo /target -target name=docs depends=prepare-error if=AnakiaTask.present +target name=docs if=AnakiaTask.present depends=prepare-error description=Create XDocs. taskdef name=anakia classname=org.apache.velocity.anakia.AnakiaTask classpath refid=anakia.classpath/ /taskdef @@ -46,11 +68,12 @@ /anakia /target -target name=javadocs +target name=javadocs description=Create Javadoc. ant antfile=build.xml target=dist_javadocs property name=dist.javadocs value=${docs.dest}/manual/api / /ant /target -target name=all depends=docs, javadocs/ +target name=all depends=docs,javadocs description=Create both XDocs and Javadoc./ + /project 1.24 +3 -3 ant/ReleaseInstructions Index: ReleaseInstructions === RCS file: /home/cvs/ant/ReleaseInstructions,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ReleaseInstructions 2 Jul 2004 10:09:13 - 1.23 +++ ReleaseInstructions 2 Jan 2005 18:34:39 - 1.24 @@ -65,9 +65,9 @@ * xdocs/srcdownload.xml * xdocs/bindownload.xml -Generate the html files by invoking ant on docs.xml - you need -jakarta-site2 checked out for this. Commit the modified/generated -files +Generate the html files by invoking ant on docs.xml +(use -projecthelp for instructions). +Commit the modified/generated files 6. Ensure you have all the external libraries that Ant uses in your lib/optional directory. To find out what libraries you need, execute - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks javac.html
jglick 2004/12/10 15:16:09 Modified:docs/manual/CoreTasks javac.html Log: The manual strongly encourages you to specify source/target levels, yet it gave no examples that did so! Putting in some usages to plant the bug in people's minds. (Especially important for people just starting to use JDK 1.5, which changed the default source level.) Revision ChangesPath 1.49 +14 -4 ant/docs/manual/CoreTasks/javac.html Index: javac.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/javac.html,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- javac.html19 Nov 2004 09:07:09 - 1.48 +++ javac.html10 Dec 2004 23:16:08 - 1.49 @@ -416,31 +416,39 @@ destdir=quot;${build}quot; classpath=quot;xyz.jarquot; debug=quot;onquot; + source=quot;1.4quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. The classpath used includes codexyz.jar/code, and compiling with -debug information is on./p +debug information is on. The source level is 1.4, +so you can use codeassert/code statements./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; fork=quot;truequot; + source=quot;1.2quot; + target=quot;1.2quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. This will fork off the javac -compiler using the default codejavac/code executable./p +compiler using the default codejavac/code executable. +The source level is 1.2 (similar to 1.1 or 1.3) and +the class files should be runnable under JDK 1.2+ as well./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; fork=quot;java$$javac.exequot; + source=quot;1.5quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. This will fork off the javac compiler, using the executable named codejava$javac.exe/code. Note -that the code$/code sign needs to be escaped by a second one./p +that the code$/code sign needs to be escaped by a second one. +The source level is 1.5, so you can use generics./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; @@ -455,7 +463,9 @@ The classpath used includes codexyz.jar/code, and debug information is on. Only files under codemypackage/p1/code and codemypackage/p2/code are used. All files in and below the codemypackage/p1/testpackage/code -directory are excluded from compilation./p +directory are excluded from compilation. +You didn't specify a source or target level, +so the actual values used will depend on which JDK you ran Ant with./p pre lt;javac srcdir=quot;${src}:${src2}quot; destdir=quot;${build}quot; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks javac.html
jglick 2004/12/10 15:17:34 Modified:docs/manual/CoreTasks Tag: ANT_16_BRANCH javac.html Log: merge Revision ChangesPath No revision No revision 1.42.2.7 +14 -4 ant/docs/manual/CoreTasks/javac.html Index: javac.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/javac.html,v retrieving revision 1.42.2.6 retrieving revision 1.42.2.7 diff -u -r1.42.2.6 -r1.42.2.7 --- javac.html19 Nov 2004 09:10:00 - 1.42.2.6 +++ javac.html10 Dec 2004 23:17:34 - 1.42.2.7 @@ -416,31 +416,39 @@ destdir=quot;${build}quot; classpath=quot;xyz.jarquot; debug=quot;onquot; + source=quot;1.4quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. The classpath used includes codexyz.jar/code, and compiling with -debug information is on./p +debug information is on. The source level is 1.4, +so you can use codeassert/code statements./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; fork=quot;truequot; + source=quot;1.2quot; + target=quot;1.2quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. This will fork off the javac -compiler using the default codejavac/code executable./p +compiler using the default codejavac/code executable. +The source level is 1.2 (similar to 1.1 or 1.3) and +the class files should be runnable under JDK 1.2+ as well./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; fork=quot;java$$javac.exequot; + source=quot;1.5quot; /gt;/pre pcompiles all code.java/code files under the code${src}/code directory, and stores the code.class/code files in the code${build}/code directory. This will fork off the javac compiler, using the executable named codejava$javac.exe/code. Note -that the code$/code sign needs to be escaped by a second one./p +that the code$/code sign needs to be escaped by a second one. +The source level is 1.5, so you can use generics./p pre lt;javac srcdir=quot;${src}quot; destdir=quot;${build}quot; @@ -455,7 +463,9 @@ The classpath used includes codexyz.jar/code, and debug information is on. Only files under codemypackage/p1/code and codemypackage/p2/code are used. All files in and below the codemypackage/p1/testpackage/code -directory are excluded from compilation./p +directory are excluded from compilation. +You didn't specify a source or target level, +so the actual values used will depend on which JDK you ran Ant with./p pre lt;javac srcdir=quot;${src}:${src2}quot; destdir=quot;${build}quot; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/util FileUtils.java
jglick 2004/12/10 15:18:22 Modified:src/main/org/apache/tools/ant/util FileUtils.java Log: If we can use File.getParentFile, there is presumably no reason to use FileUtils.getParentFile, right? Revision ChangesPath 1.76 +4 -3 ant/src/main/org/apache/tools/ant/util/FileUtils.java Index: FileUtils.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- FileUtils.java7 Dec 2004 23:32:31 - 1.75 +++ FileUtils.java10 Dec 2004 23:18:22 - 1.76 @@ -1030,12 +1030,13 @@ } /** - * This was originally an emulation of File.getParentFile for JDK 1.1, - * but it is now implemented using that method (Ant1.7 onwards). + * This was originally an emulation of [EMAIL PROTECTED] File#getParentFile} for JDK 1.1, + * but it is now implemented using that method (Ant 1.7 onwards). * @param f the file whose parent is required. * @return the given file's parent, or null if the file does not have a * parent. * @since 1.10 + * @deprecated Just use [EMAIL PROTECTED] File#getParentFile} directly. */ public File getParentFile(File f) { return (f == null) ? null : f.getParentFile(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant check.xml
jglick 2004/12/10 15:19:28 Modified:.check.xml Log: 1. Make checkstyle target work independently of CWD. 2. Add a target to display the text report inline, for easy hyperlink navigation. Revision ChangesPath 1.13 +13 -8 ant/check.xml Index: check.xml === RCS file: /home/cvs/ant/check.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- check.xml 14 Sep 2003 09:12:08 - 1.12 +++ check.xml 10 Dec 2004 23:19:28 - 1.13 @@ -18,13 +18,13 @@ /description import file=build.xml/ - property name=config.dir value=${etc.dir}/checkstyle/ + property name=config.dir location=${etc.dir}/checkstyle/ - property name=checkstyle.reportdir value=${build.dir}/reports/checkstyle/ - property name=checkstyle.raw value=${checkstyle.reportdir}/raw.xml/ - property name=stylesheet.html value=${config.dir}/checkstyle-frames.xsl/ - property name=stylesheet.text value=${config.dir}/checkstyle-text.xsl/ - property name=stylesheet.xdoc value=${config.dir}/checkstyle-xdoc.xsl/ + property name=checkstyle.reportdir location=${build.dir}/reports/checkstyle/ + property name=checkstyle.raw location=${checkstyle.reportdir}/raw.xml/ + property name=stylesheet.html location=${config.dir}/checkstyle-frames.xsl/ + property name=stylesheet.text location=${config.dir}/checkstyle-text.xsl/ + property name=stylesheet.xdoc location=${config.dir}/checkstyle-xdoc.xsl/ property name=checkstyle.basedir location=${java.dir}/ @@ -35,7 +35,7 @@ taskdef resource=simiantask.properties/ taskdef resource=checkstyletask.properties/ - target name=checkstyle description=-- checks Ant codebase according to ${config.dir}/chestyle-config + target name=checkstyle description=-- checks Ant codebase according to ${config.dir}/checkstyle-config mkdir dir=${checkstyle.reportdir}/ checkstyle config=${config.dir}/checkstyle-config failOnViolation=false formatter type=xml toFile=${checkstyle.raw}/ @@ -60,6 +60,11 @@ out=${checkstyle.reportdir}/report.txt /style /target + + target name=textreport-display depends=textreport description=-- generates a text checkstyle report and displays it immediately + loadfile property=report srcfile=${checkstyle.reportdir}/report.txt/ + echo${report}/echo + /target target name=xdocreport description=-- generates a xdoc checkstyle report style in=${checkstyle.raw} style=${stylesheet.xdoc} @@ -80,4 +85,4 @@ /simian /target -/project \ No newline at end of file +/project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper SingleCheckExecutor.java KeepGoingExecutor.java DefaultExecutor.java
jglick 2004/12/06 22:43:42 Modified:src/main/org/apache/tools/ant/helper SingleCheckExecutor.java KeepGoingExecutor.java DefaultExecutor.java Log: Improving Javadoc of Executor impls to be more informative. :-) Matt please check. Revision ChangesPath 1.2 +2 -0 ant/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java Index: SingleCheckExecutor.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SingleCheckExecutor.java 31 Aug 2004 22:32:53 - 1.1 +++ SingleCheckExecutor.java 7 Dec 2004 06:43:42 - 1.2 @@ -27,6 +27,8 @@ /** * Single-check Target executor implementation. + * Differs from [EMAIL PROTECTED] DefaultExecutor} in that the dependencies for all + * targets are computed together, so that shared dependencies are run just once. * @since Ant 1.6.3 */ public class SingleCheckExecutor implements Executor { 1.2 +3 -0 ant/src/main/org/apache/tools/ant/helper/KeepGoingExecutor.java Index: KeepGoingExecutor.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/KeepGoingExecutor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- KeepGoingExecutor.java31 Aug 2004 22:32:53 - 1.1 +++ KeepGoingExecutor.java7 Dec 2004 06:43:42 - 1.2 @@ -25,6 +25,9 @@ /** * Keep-going Target executor implementation. + * Differs from [EMAIL PROTECTED] DefaultExecutor} in that a failure in one target does + * not halt execution; all targets are attempted, in order. The last failure, + * if any, is reported to the caller. * @since Ant 1.6.3 */ public class KeepGoingExecutor implements Executor { 1.2 +2 -0 ant/src/main/org/apache/tools/ant/helper/DefaultExecutor.java Index: DefaultExecutor.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/DefaultExecutor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DefaultExecutor.java 31 Aug 2004 22:32:53 - 1.1 +++ DefaultExecutor.java 7 Dec 2004 06:43:42 - 1.2 @@ -25,6 +25,8 @@ /** * Default Target executor implementation. + * Runs each target individually (including all of its dependencies), + * halting immediately upon error. * @since Ant 1.6.3 */ public class DefaultExecutor implements Executor { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java
jglick 2004/12/06 22:44:34 Modified:src/main/org/apache/tools/ant/taskdefs Ant.java Log: Minor stylistic refactoring. Revision ChangesPath 1.109 +3 -2 ant/src/main/org/apache/tools/ant/taskdefs/Ant.java Index: Ant.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v retrieving revision 1.108 retrieving revision 1.109 diff -u -r1.108 -r1.109 --- Ant.java 22 Nov 2004 09:23:27 - 1.108 +++ Ant.java 7 Dec 2004 06:44:34 - 1.109 @@ -31,6 +31,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildListener; import org.apache.tools.ant.DefaultLogger; +import org.apache.tools.ant.Executor; import org.apache.tools.ant.Project; import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.ProjectHelper; @@ -64,7 +65,7 @@ public class Ant extends Task { /** Target Executor */ -private static SingleCheckExecutor executor = new SingleCheckExecutor(); +private static final Executor EXECUTOR = new SingleCheckExecutor(); /** the basedir where is executed the build file */ private File dir = null; @@ -398,7 +399,7 @@ try { log(Entering + antFile + ..., Project.MSG_VERBOSE); newProject.fireSubBuildStarted(); -executor.executeTargets(newProject, +EXECUTOR.executeTargets(newProject, (String[]) (locals.toArray(new String[locals.size()]))); } catch (BuildException ex) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs BuildNumber.java
jglick 2004/12/06 22:45:32 Modified:src/main/org/apache/tools/ant/taskdefs BuildNumber.java Log: Minor simplification: task.log(...) ~ task.getProject().log(...). Revision ChangesPath 1.18 +3 -3 ant/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java Index: BuildNumber.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- BuildNumber.java 9 Mar 2004 16:48:04 - 1.17 +++ BuildNumber.java 7 Dec 2004 06:45:32 - 1.18 @@ -98,7 +98,7 @@ try { output.close(); } catch (final IOException ioe) { -getProject().log(error closing output stream + ioe, Project.MSG_ERR); +log(error closing output stream + ioe, Project.MSG_ERR); } } myFile = savedFile; @@ -157,7 +157,7 @@ try { input.close(); } catch (final IOException ioe) { -getProject().log(error closing input stream + ioe, Project.MSG_ERR); +log(error closing input stream + ioe, Project.MSG_ERR); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional AbstractXSLTLiaisonTest.java
jglick 2004/12/07 01:02:33 Modified:src/testcases/org/apache/tools/ant/taskdefs/optional AbstractXSLTLiaisonTest.java Log: 1. Never use new File(url.getFile()); it is not safe with all paths. 2. Using File.deleteOnExit for temp files, just in case the VM croaks. Revision ChangesPath 1.9 +10 -8 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java Index: AbstractXSLTLiaisonTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractXSLTLiaisonTest.java 9 Feb 2004 21:05:44 - 1.8 +++ AbstractXSLTLiaisonTest.java 7 Dec 2004 09:02:33 - 1.9 @@ -1,5 +1,3 @@ -package org.apache.tools.ant.taskdefs.optional; - /* * Copyright 2001,2004 The Apache Software Foundation * @@ -17,15 +15,17 @@ * */ -import junit.framework.TestCase; -import org.apache.tools.ant.taskdefs.XSLTLiaison; -import org.w3c.dom.Document; +package org.apache.tools.ant.taskdefs.optional; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import java.io.File; import java.io.FileNotFoundException; import java.net.URL; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import junit.framework.TestCase; +import org.apache.tools.ant.taskdefs.XSLTLiaison; +import org.apache.tools.ant.util.FileUtils; +import org.w3c.dom.Document; /** * Abtract testcase for XSLTLiaison. @@ -54,7 +54,7 @@ if (url == null){ throw new FileNotFoundException(Unable to load ' + name + ' from classpath); } -return new File(url.getFile()); +return new File(FileUtils.newFileUtils().fromURI(url.toExternalForm())); } /** keep it simple stupid */ @@ -64,6 +64,7 @@ liaison.addParam(param, value); File in = getFile(/taskdefs/optional/xsltliaison-in.xml); File out = new File(xsltliaison.tmp); +out.deleteOnExit(); // just to be sure try { liaison.transform(in, out); } finally { @@ -76,6 +77,7 @@ liaison.setStylesheet(xsl); File in = getFile(/taskdefs/optional/xsltliaison-encoding-in.xml); File out = new File(xsltliaison-encoding.tmp); +out.deleteOnExit(); // just to be sure try { liaison.transform(in, out); Document doc = parseXML(out); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant build.xml
jglick 2004/12/07 01:10:39 Modified:src/testcases/org/apache/tools/ant/util FileUtilsTest.java src/testcases/org/apache/tools/ant/types/selectors PresentSelectorTest.java BaseSelectorTest.java src/testcases/org/apache/tools/ant/types XMLCatalogTest.java PathTest.java FilterSetTest.java CommandlineJavaTest.java src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java src/testcases/org/apache/tools/ant/taskdefs/optional/i18n TranslateTest.java src/testcases/org/apache/tools/ant/taskdefs/optional ReplaceRegExpTest.java PropertyFileTest.java JspcTest.java ANTLRTest.java src/testcases/org/apache/tools/ant/taskdefs XmlPropertyTest.java TouchTest.java TarTest.java ManifestTest.java InitializeClassTest.java ImportTest.java FixCrLfTest.java ExecTaskTest.java src/testcases/org/apache/tools/ant DirectoryScannerTest.java BuildFileTest.java .build.xml Log: Trying to make unit tests independent of CWD. Revision ChangesPath 1.30 +13 -8 ant/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java Index: FileUtilsTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- FileUtilsTest.java8 Aug 2004 21:03:21 - 1.29 +++ FileUtilsTest.java7 Dec 2004 09:10:38 - 1.30 @@ -322,18 +322,18 @@ * Test contentEquals */ public void testContentEquals() throws IOException { -assertTrue(Non existing files, fu.contentEquals(new File(foo), - new File(bar))); +assertTrue(Non existing files, fu.contentEquals(new File(System.getProperty(root), foo), + new File(System.getProperty(root), bar))); assertTrue(One exists, the other one doesn\'t, - !fu.contentEquals(new File(foo), new File(build.xml))); + !fu.contentEquals(new File(System.getProperty(root), foo), new File(System.getProperty(root), build.xml))); assertTrue(Don\'t compare directories, - !fu.contentEquals(new File(src), new File(src))); + !fu.contentEquals(new File(System.getProperty(root), src), new File(System.getProperty(root), src))); assertTrue(File equals itself, - fu.contentEquals(new File(build.xml), -new File(build.xml))); + fu.contentEquals(new File(System.getProperty(root), build.xml), +new File(System.getProperty(root), build.xml))); assertTrue(Files are different, - !fu.contentEquals(new File(build.xml), - new File(docs.xml))); + !fu.contentEquals(new File(System.getProperty(root), build.xml), + new File(System.getProperty(root), docs.xml))); } /** @@ -409,9 +409,14 @@ assertEquals(file:///SYS:/foo, fu.toURI(sys:\\foo)); } assertEquals(file:/// + dosRoot + foo, fu.toURI(/foo)); +/* May fail if the directory ${user.dir}/foo/ exists + * (and anyway is the tested behavior actually desirable?): assertEquals(file:./foo, fu.toURI(./foo)); + */ assertEquals(file:/// + dosRoot + foo, fu.toURI(\\foo)); +/* See above: assertEquals(file:./foo, fu.toURI(.\\foo)); + */ assertEquals(file:/// + dosRoot + foo%20bar, fu.toURI(/foo bar)); assertEquals(file:/// + dosRoot + foo%20bar, fu.toURI(\\foo bar)); assertEquals(file:/// + dosRoot + foo%23bar, fu.toURI(/foo#bar)); 1.9 +1 -1 ant/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java Index: PresentSelectorTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/selectors/PresentSelectorTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PresentSelectorTest.java 9 Mar 2004 16:49:07 - 1.8 +++ PresentSelectorTest.java 7 Dec 2004 09:10:38 - 1.9 @@ -108,7 +108,7 @@ assertEquals(, results); s = (PresentSelector)getInstance
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs ReplaceTest.java
jglick 2004/12/07 01:11:47 Modified:src/testcases/org/apache/tools/ant/taskdefs ReplaceTest.java Log: Unused constant. Revision ChangesPath 1.15 +0 -1 ant/src/testcases/org/apache/tools/ant/taskdefs/ReplaceTest.java Index: ReplaceTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ReplaceTest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ReplaceTest.java 9 Mar 2004 16:48:57 - 1.14 +++ ReplaceTest.java 7 Dec 2004 09:11:47 - 1.15 @@ -27,7 +27,6 @@ */ public class ReplaceTest extends BuildFileTest { -private static final String TEST_PATH = src/etc/testcases/taskdefs/replace/; public ReplaceTest(String name) { super(name); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional XalanLiaisonTest.java
jglick 2004/12/07 01:13:04 Modified:src/testcases/org/apache/tools/ant/taskdefs/optional XalanLiaisonTest.java Log: Just moving license to top of file for consistency. Revision ChangesPath 1.11 +2 -2 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/XalanLiaisonTest.java Index: XalanLiaisonTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/XalanLiaisonTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- XalanLiaisonTest.java 9 Mar 2004 16:49:01 - 1.10 +++ XalanLiaisonTest.java 7 Dec 2004 09:13:04 - 1.11 @@ -1,5 +1,3 @@ -package org.apache.tools.ant.taskdefs.optional; - /* * Copyright 2001-2002,2004 The Apache Software Foundation * @@ -16,6 +14,8 @@ * limitations under the License. * */ + +package org.apache.tools.ant.taskdefs.optional; import org.apache.tools.ant.taskdefs.XSLTLiaison; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs TempFile.java
jglick 2004/12/02 13:59:13 Modified:src/main/org/apache/tools/ant/taskdefs TempFile.java Log: Small Javadoc change. CVS: -- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. Revision ChangesPath 1.13 +1 -2 ant/src/main/org/apache/tools/ant/taskdefs/TempFile.java Index: TempFile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/TempFile.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TempFile.java 9 Mar 2004 16:48:06 - 1.12 +++ TempFile.java 2 Dec 2004 21:59:12 - 1.13 @@ -23,8 +23,7 @@ /** * This task sets a property to the name of a temporary file. - * Unlike the Java1.2 method to create a temporary file, this task - * does work on Java1.1. Also, it does not actually create the + * Unlike [EMAIL PROTECTED] File#createTempFile}, this task does not actually create the * temporary file, but it does guarantee that the file did not * exist when the task was executed. * p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs ImportTask.java
jglick 2004/12/02 14:06:16 Modified:src/main/org/apache/tools/ant/taskdefs ImportTask.java Log: Trivial Javadoc formatting edits. Revision ChangesPath 1.29 +8 -9 ant/src/main/org/apache/tools/ant/taskdefs/ImportTask.java Index: ImportTask.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ImportTask.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ImportTask.java 28 Apr 2004 09:01:08 - 1.28 +++ ImportTask.java 2 Dec 2004 22:06:15 - 1.29 @@ -29,27 +29,26 @@ import java.util.Vector; /** - * p * Task to import another build file into the current project. * p * It must be 'top level'. On execution it will read another Ant file * into the same Project. + * /p * p * bImportant/b: we have not finalized how relative file references - * will be resolved in deep/complex build hierarchies -such as what happens + * will be resolved in deep/complex build hierarchies - such as what happens * when an imported file imports another file. Use absolute references for * enhanced build file stability, especially in the imported files. - * - * Examples + * /p + * pExamples:/p * pre - * lt;import file=../common-targets.xml /gt; + * lt;import file=../common-targets.xml/gt; * /pre - * Import targets from a file in a parent directory. - *p + * pImport targets from a file in a parent directory./p * pre - * lt;import file=${deploy-platform}.xml /gt; + * lt;import file=${deploy-platform}.xml/gt; * /pre - * Import the project defined by the property deploy-platform + * pImport the project defined by the property codedeploy-platform/code./p * * @since Ant1.6 * @ant.task category=control - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks ant.html
jglick 2004/11/30 20:02:33 Modified:docs/manual/CoreTasks ant.html Log: s/can not/cannot/ Revision ChangesPath 1.29 +2 -2 ant/docs/manual/CoreTasks/ant.html Index: ant.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/ant.html,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ant.html 19 Nov 2004 09:07:09 - 1.28 +++ ant.html 1 Dec 2004 04:02:33 - 1.29 @@ -33,7 +33,7 @@ to the new project and any project created in that project regardless of the setting of iinheritAll/i. This allows you to parameterize your subprojects. Properties defined on the command line -can not be overridden by nested codelt;propertygt;/code elements./p +cannot be overridden by nested codelt;propertygt;/code elements./p pReferences to data types can also be passed to the new project, but by default they are not. If you set the inheritrefs attribute to @@ -272,4 +272,4 @@ Reserved./p /body -/html \ No newline at end of file +/html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/docs/manual/CoreTasks tempfile.html
jglick 2004/11/30 13:57:17 Modified:docs/manual/CoreTasks tempfile.html Log: 1. Removing mention of JDK 1.1 which is no longer supported anyway. 2. More readable HTML source formatting - reduce merge conflicts, e.g. Revision ChangesPath 1.6 +20 -1 ant/docs/manual/CoreTasks/tempfile.html Index: tempfile.html === RCS file: /home/cvs/ant/docs/manual/CoreTasks/tempfile.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- tempfile.html 19 Nov 2004 09:07:09 - 1.5 +++ tempfile.html 30 Nov 2004 21:57:17 - 1.6 @@ -46,7 +46,26 @@ /td/tr trtdblockquote -This task sets a property to the name of a temporary file. Unlike the Java1.2 method to create a temporary file, this task does work on Java1.1. Also, it does not actually create the temporary file, but it does guarantee that the file did not exist when the task was executed. p Examples prelt;tempfile property=temp.file/gt;/pre create a temporary file prelt;tempfile property=temp.file suffix=.xml/gt;/pre create a temporary file with the .xml suffix. prelt;tempfile property=temp.file destDir=build/gt;/pre create a temp file in the build subdir + + This task sets a property to the name of a temporary file. + Unlike codejava.io.File.createTempFile/code, + this task does not actually create the temporary file, but it does guarantee that the + file did not exist when the task was executed. + + pExamples: + + prelt;tempfile property=temp.file/gt;/pre + + create a temporary file + + prelt;tempfile property=temp.file suffix=.xml/gt;/pre + + create a temporary file with the code.xml/code suffix + + prelt;tempfile property=temp.file destDir=build/gt;/pre + + create a temporary file in the codebuild/code subdirectory + /blockquote/td/tr /table - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/xdocs contributors.xml
jglick 2004/10/19 17:42:33 Modified:xdocscontributors.xml Log: If this works, my CVS access is working OK... Revision ChangesPath 1.30 +10 -0 ant/xdocs/contributors.xml Index: contributors.xml === RCS file: /home/cvs/ant/xdocs/contributors.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- contributors.xml 16 Aug 2004 14:57:50 - 1.29 +++ contributors.xml 20 Oct 2004 00:42:33 - 1.30 @@ -199,6 +199,16 @@ project in a spirit of co-operation over competition. /p +p +bJesse Glick/b (jesse dot glick at sun dot com) +br/ +Jesse has been using Java since 1998 and joined Sun Microsystems as +part of the company that produced the NetBeans IDE. After discovering +Ant in the 1.2 days, he wrote most of NetBeans' Ant integration. +Recently he has worked on the NetBeans 4.0 project system, based heavily +on Ant as a build tool. +/p + p bJason Hunter/b (jh at servlets.com) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]