svn commit: r536747 - /ant/core/trunk/docs/manual/tutorial-writing-tasks.html

2007-05-09 Thread jhm
Author: jhm
Date: Wed May  9 22:43:04 2007
New Revision: 536747

URL: http://svn.apache.org/viewvc?view=rev&rev=536747
Log:
remove @author
1. not in use inside Ant any more
2. problems with egrave ;-)

Modified:
ant/core/trunk/docs/manual/tutorial-writing-tasks.html

Modified: ant/core/trunk/docs/manual/tutorial-writing-tasks.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/tutorial-writing-tasks.html?view=diff&rev=536747&r1=536746&r2=536747
==
--- ant/core/trunk/docs/manual/tutorial-writing-tasks.html (original)
+++ ant/core/trunk/docs/manual/tutorial-writing-tasks.html Wed May  9 22:43:04 
2007
@@ -450,7 +450,6 @@
 /**
  * The task of the tutorial.
  * Print a message or let the build fail.
- * @author Jan Mat�rne
  * @since 2003-08-19
  */
 public class HelloWorld extends Task {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536740 - in /ant/core/trunk/src/tests/antunit/taskdefs: delete-test.xml javac-test.xml pathconvert-test.xml war-test.xml whichresource-test.xml

2007-05-09 Thread kevj
Author: kevj
Date: Wed May  9 21:42:26 2007
New Revision: 536740

URL: http://svn.apache.org/viewvc?view=rev&rev=536740
Log:
-use antunit-base

Modified:
ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml
ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml
ant/core/trunk/src/tests/antunit/taskdefs/pathconvert-test.xml
ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml
ant/core/trunk/src/tests/antunit/taskdefs/whichresource-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml?view=diff&rev=536740&r1=536739&r2=536740
==
--- ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml Wed May  9 
21:42:26 2007
@@ -1,18 +1,12 @@
 
 
-
   
   
   

-  
-
-  
-  
-
-  
-
+  
 
   
 

Modified: ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml?view=diff&rev=536740&r1=536739&r2=536740
==
--- ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml Wed May  9 
21:42:26 2007
@@ -1,4 +1,6 @@
-
+
+  
+
   
   
   
@@ -32,11 +34,5 @@
 
   
 
-  
-  
-
-  
-  
-
   
 

Modified: ant/core/trunk/src/tests/antunit/taskdefs/pathconvert-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/pathconvert-test.xml?view=diff&rev=536740&r1=536739&r2=536740
==
--- ant/core/trunk/src/tests/antunit/taskdefs/pathconvert-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/pathconvert-test.xml Wed May  9 
21:42:26 2007
@@ -1,4 +1,5 @@
-
+
+  
 
   
 
@@ -10,10 +11,4 @@
 
   
 
-  
-
-  
-  
-
-  
 

Modified: ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml?view=diff&rev=536740&r1=536739&r2=536740
==
--- ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml Wed May  9 21:42:26 
2007
@@ -1,16 +1,10 @@
 
 
-
   
 
-  
-
-  
-  
-
-  
-
+  
 
   
 

Modified: ant/core/trunk/src/tests/antunit/taskdefs/whichresource-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/whichresource-test.xml?view=diff&rev=536740&r1=536739&r2=536740
==
--- ant/core/trunk/src/tests/antunit/taskdefs/whichresource-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/whichresource-test.xml Wed May  9 
21:42:26 2007
@@ -1,4 +1,6 @@
-
+
+  
+
   
   
@@ -32,11 +34,5 @@
   
 
   
-
-  
-
-  
-  
-
-  
+
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536739 - /ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml

2007-05-09 Thread kevj
Author: kevj
Date: Wed May  9 21:38:02 2007
New Revision: 536739

URL: http://svn.apache.org/viewvc?view=rev&rev=536739
Log:
-use antunit-base

Modified:
ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml?view=diff&rev=536739&r1=536738&r2=536739
==
--- ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/move-test.xml Wed May  9 21:38:02 
2007
@@ -1,4 +1,5 @@
-
+
+  
 
   
 
@@ -14,12 +15,5 @@
 
   
 
-  
-
-  
-
-  
-  
-
   
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536737 - /ant/core/trunk/docs/manual/tutorial-writing-tasks.html

2007-05-09 Thread kevj
Author: kevj
Date: Wed May  9 20:16:31 2007
New Revision: 536737

URL: http://svn.apache.org/viewvc?view=rev&rev=536737
Log:
-fix  not closed & add information about classes for nested elements must 
be static

Modified:
ant/core/trunk/docs/manual/tutorial-writing-tasks.html

Modified: ant/core/trunk/docs/manual/tutorial-writing-tasks.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/tutorial-writing-tasks.html?view=diff&rev=536737&r1=536736&r2=536737
==
--- ant/core/trunk/docs/manual/tutorial-writing-tasks.html (original)
+++ ant/core/trunk/docs/manual/tutorial-writing-tasks.html Wed May  9 20:16:31 
2007
@@ -313,14 +313,14 @@
 There are several ways for inserting the ability of handling nested 
elements. See
 the http://ant.apache.org/manual/develop.html#nested-elements";>Manual 
[4] for other.
 We use the first way of the three described ways. There are several steps for 
that:
-We create a class for collecting all the infos the nested element should 
contain.
+We create a class for collecting all the info the nested element should 
contain.
   This class is created by the same rules for attributes and nested elements
   as for the task (set() methods). 
 The task holds multiple instances of this class in a list.
 A factory method instantiates an object, saves the reference in the list
   and returns it to Ant Core.
 The execute() method iterates over the list and evaluates its values.
-
+
 
 import java.util.Vector;
 import java.util.Iterator;
@@ -361,7 +361,8 @@
 
 
 
-
+Note that if you choose to use methods 2 or 3, the class that represents 
the nested
+element must be declared as static
 
 
 Our task in a little more complex version
@@ -449,7 +450,7 @@
 /**
  * The task of the tutorial.
  * Print a message or let the build fail.
- * @author Jan Matèrne
+ * @author Jan Mat�rne
  * @since 2003-08-19
  */
 public class HelloWorld extends Task {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED]: Project test-ant-no-xerces (in module ant) failed

2007-05-09 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project test-ant-no-xerces has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- test-ant-no-xerces :  Java based build tool


Full details are available at:
http://vmgump.apache.org/gump/public/ant/test-ant-no-xerces/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/ant/test-ant-no-xerces/gump_work/build_ant_test-ant-no-xerces.html
Work Name: build_ant_test-ant-no-xerces (Type: Build)
Work ended in a state of : Failed
Elapsed: 11 mins 20 secs
Command Line: /opt/jdk1.5/bin/java -Djava.awt.headless=true 
org.apache.tools.ant.Main -Dgump.merge=/x1/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dtest.haltonfailure=false 
-Dant.home=/usr/local/gump/public/workspace/ant/dist run-tests 
[Working Directory: /usr/local/gump/public/workspace/ant]
CLASSPATH: 
/opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/ant/build/testcases:/usr/local/gump/public/workspace/ant/src/tests/junit:/usr/local/gump/public/workspace/ant/src/etc/testcases:/usr/local/gump/public/workspace/ant/build/lib/ant-stylebook.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-javamail.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-bcel.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-regexp.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-commons-net.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jsch.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-log4j.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-antlr.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-commons-logging.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jdepend.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-bsf.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-oro.jar:/usr/local/gump/public/workspace/ant/build/lib/ant.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jai.jar:/usr/local/gump/packages/antlr-2.7.6/antlr.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-09052007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-09052007.jar:/usr/local/gump/public/workspace/jakarta-commons/net/dist/commons-net-09052007.jar:/usr/local/gump/packages/jaf-1.1ea/activation.jar:/usr/local/gump/public/workspace/jakarta-bcel/target/bcel-5.3-SNAPSHOT.jar:/usr/local/gump/public/workspace/jakarta-bsf/build/lib/bsf.jar:/usr/local/gump/public/workspace/logging-log4j/dist/lib/log4j-09052007.jar:/usr/local/gump/public/workspace/jakarta-oro/jakarta-oro-09052007.jar:/usr/local/gump/public/workspace/jakarta-regexp/build/jakarta-regexp-09052007.jar:/usr/local/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/usr/local/gump/packages/javamail-1.4/mail.jar:/usr/local/gump/packages/javamail-1.4/lib/mailapi.jar:/usr/local/gump/packages/jdepend-2.6/lib/jdepend.jar:/usr/local/gump/packages/jsch/jsch-0.1.28.jar:/usr/local/gump/public/workspace/xml-stylebook/bin/stylebook-1.0-b3_xalan-2.jar:/usr/local/gump/public/workspace/ant-antlibs/antunit/build/ant-antunit-09052007.jar:/usr/local/gump/public/workspace/junit/dist/junit-09052007.jar:/usr/local/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-compiler.jar:/usr/local/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-runtime.jar:/usr/local/gump/public/workspace/xml-commons/java/build/which.jar:/usr/local/gump/public/workspace/rhino/build/rhino_09052007/js.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-commands-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-classpath-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-core-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-bsf-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-reflect-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-util-2.0b4.jar:/usr/local/gump/public/workspace/jakarta-commons/codec/dist/commons-codec-09052007.jar

[EMAIL PROTECTED]: Project test-ant (in module ant) failed

2007-05-09 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project test-ant has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- test-ant :  Java based build tool


Full details are available at:
http://vmgump.apache.org/gump/public/ant/test-ant/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/ant/test-ant/gump_work/build_ant_test-ant.html
Work Name: build_ant_test-ant (Type: Build)
Work ended in a state of : Failed
Elapsed: 13 mins 47 secs
Command Line: /opt/jdk1.5/bin/java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xalan/build/serializer.jar:/usr/local/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar
 org.apache.tools.ant.Main -Dgump.merge=/x1/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dtest.haltonfailure=false 
-Dant.home=/usr/local/gump/public/workspace/ant/dist run-tests 
[Working Directory: /usr/local/gump/public/workspace/ant]
CLASSPATH: 
/opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/ant/build/testcases:/usr/local/gump/public/workspace/ant/src/tests/junit:/usr/local/gump/public/workspace/ant/src/etc/testcases:/usr/local/gump/public/workspace/ant/build/lib/ant-stylebook.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-javamail.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-bcel.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-regexp.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-commons-net.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jsch.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-log4j.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-antlr.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-commons-logging.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jdepend.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-bsf.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-apache-oro.jar:/usr/local/gump/public/workspace/ant/build/lib/ant.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-jai.jar:/usr/local/gump/packages/antlr-2.7.6/antlr.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-09052007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-09052007.jar:/usr/local/gump/public/workspace/jakarta-commons/net/dist/commons-net-09052007.jar:/usr/local/gump/packages/jaf-1.1ea/activation.jar:/usr/local/gump/public/workspace/jakarta-bcel/target/bcel-5.3-SNAPSHOT.jar:/usr/local/gump/public/workspace/jakarta-bsf/build/lib/bsf.jar:/usr/local/gump/public/workspace/logging-log4j/dist/lib/log4j-09052007.jar:/usr/local/gump/public/workspace/jakarta-oro/jakarta-oro-09052007.jar:/usr/local/gump/public/workspace/jakarta-regexp/build/jakarta-regexp-09052007.jar:/usr/local/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/usr/local/gump/packages/javamail-1.4/mail.jar:/usr/local/gump/packages/javamail-1.4/lib/mailapi.jar:/usr/local/gump/packages/jdepend-2.6/lib/jdepend.jar:/usr/local/gump/packages/jsch/jsch-0.1.28.jar:/usr/local/gump/public/workspace/xml-stylebook/bin/stylebook-1.0-b3_xalan-2.jar:/usr/local/gump/public/workspace/ant-antlibs/antunit/build/ant-antunit-09052007.jar:/usr/local/gump/public/workspace/junit/dist/junit-09052007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/usr/local/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-compiler.jar:/usr/local/gump/public/workspace/jakarta-tomcat-4.0/dist/common/lib/jasper-runtime.jar:/usr/local/gump/public/workspace/xml-commons/java/build/which.jar:/usr/local/gump/public/workspace/rhino/build/rhino_09052007/js.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-commands-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-classpath-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-core-2.0b4.jar:/usr/local/gump/packages/b

DO NOT REPLY [Bug 42369] - concat fixlastline should not apply to nested text

2007-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42369


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-05-09 10:12 ---
fixed; rev 536592

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536592 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/Concat.java src/tests/antunit/taskdefs/concat-test.xml

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 10:12:26 2007
New Revision: 536592

URL: http://svn.apache.org/viewvc?view=rev&rev=536592
Log:
concat fixlastline/nested text regression; PR 42369

Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=536592&r1=536591&r2=536592
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed May  9 10:12:26 2007
@@ -70,6 +70,9 @@
 
 * handle null result of system getProperty(). Bugzilla 42334.
 
+* Regression: concat fixlastline="true" should not have applied to
+  nested text, but did in Ant 1.7.0. Bugzilla 42369.
+
 Other changes:
 --
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java?view=diff&rev=536592&r1=536591&r2=536592
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java Wed May  
9 10:12:26 2007
@@ -265,7 +265,7 @@
 int ch = getReader().read();
 if (ch == -1) {
 nextReader();
-if (fixLastLine && isMissingEndOfLine()) {
+if (isFixLastLine() && isMissingEndOfLine()) {
 needAddSeparator = true;
 lastPos = 0;
 }
@@ -307,12 +307,12 @@
 int nRead = getReader().read(cbuf, off, len);
 if (nRead == -1 || nRead == 0) {
 nextReader();
-if (fixLastLine && isMissingEndOfLine()) {
+if (isFixLastLine() && isMissingEndOfLine()) {
 needAddSeparator = true;
 lastPos = 0;
 }
 } else {
-if (fixLastLine) {
+if (isFixLastLine()) {
 for (int i = nRead;
  i > (nRead - lastChars.length);
  --i) {
@@ -369,6 +369,10 @@
 }
 return false;
 }
+
+private boolean isFixLastLine() {
+return fixLastLine && textBuffer == null;
+}
 }
 
 private class ConcatResource extends Resource {
@@ -887,10 +891,8 @@
  * for "ignorable whitespace" as well.
  */
 private void sanitizeText() {
-if (textBuffer != null) {
-if (textBuffer.substring(0).trim().length() == 0) {
-textBuffer = null;
-}
+if (textBuffer != null && "".equals(textBuffer.toString().trim())) {
+textBuffer = null;
 }
 }
 

Modified: ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml?view=diff&rev=536592&r1=536591&r2=536592
==
--- ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml Wed May  9 
10:12:26 2007
@@ -1,4 +1,6 @@
-
+
+  
+
   
 
 
@@ -31,6 +33,15 @@
   
 
 
+  
+
+  
+
+  
+
+  
+foo
+foo
   
 
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED]: Project svn-antlib-test (in module ant-antlibs) failed

2007-05-09 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project svn-antlib-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- svn-antlib-test :  Task and Type Libraries for Apache Ant


Full details are available at:
http://vmgump.apache.org/gump/public/ant-antlibs/svn-antlib-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on ant-testutil exists, no need to add for property 
ant-testutil.jar.
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/ant-antlibs/svn-antlib-test/gump_work/build_ant-antlibs_svn-antlib-test.html
Work Name: build_ant-antlibs_svn-antlib-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 mins 27 secs
Command Line: /opt/jdk1.5/bin/java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar
 org.apache.tools.ant.Main -Dgump.merge=/x1/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only 
-Dant-testutil.jar=/usr/local/gump/public/workspace/ant/build/lib/ant-testutil.jar
 test 
[Working Directory: /usr/local/gump/public/workspace/ant-antlibs/svn]
CLASSPATH: 
/opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/ant-antlibs/svn/build/test-classes:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/ant/build/lib/ant-testutil.jar:/usr/local/gump/public/workspace/junit/dist/junit-09052007.jar:/usr/local/gump/public/workspace/ant-antlibs/svn/build/ant-svn-09052007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar
-
[junit] at junit.framework.TestSuite.run(TestSuite.java:227)
[junit] at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:76)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:33)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:743)
[junit] 
[junit] Testcase: testDiffWithImplicitTrunk took 30.75 sec
[junit] FAILED
[junit] null
[junit] junit.framework.AssertionFailedError: null
[junit] at junit.framework.Assert.fail(Assert.java:47)
[junit] at junit.framework.Assert.assertTrue(Assert.java:20)
[junit] at junit.framework.Assert.assertTrue(Assert.java:27)
[junit] at 
org.apache.ant.svn.SvnTagDiffTest.assertModified(SvnTagDiffTest.java:110)
[junit] at 
org.apache.ant.svn.SvnTagDiffTest.assertDiffWithTrunk(SvnTagDiffTest.java:63)
[junit] at 
org.apache.ant.svn.SvnTagDiffTest.testDiffWithImplicitTrunk(SvnTagDiffTest.java:57)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at junit.framework.TestCase.runTest(TestCase.java:168)
[junit] at junit.framework.TestCase.runBare(TestCase.java:134)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:110)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:128)
[junit] at junit.framework.TestResult.run(TestResult.java:113)
[junit] at junit.framework.TestCase.run(TestCase.java:124)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:232)
[junit] at junit.framework.TestSuite.run(TestSuite.java:227)
[junit] at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:76)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:33)
[j

DO NOT REPLY [Bug 42369] New: - concat fixlastline should not apply to nested text

2007-05-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42369

   Summary: concat fixlastline should not apply to nested text
   Product: Ant
   Version: 1.7Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


This is documented in the manual and works as advertised in 1.6.5 but is broken 
in 1.7 and HEAD.  And 
yes, I probably did it.  :|

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NestedElement weirdness

2007-05-09 Thread Peter Reilly

Yes,
they need to be static for addX(Y) to work.

The createX() method can be used for non static inner classes.

Peter


On 5/9/07, Matt Benson <[EMAIL PROTECTED]> wrote:

This probably isn't your whole problem, but right off
the bat you generally need to make your inner types
static.

HTH,
Matt

--- Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I've just spent a hugely frustrating 2 hours or so
> trying to get a
> simple nested element to work within a task.
>
> -addElementName(ObjectType t) fails (task doesn't
> support nested element)
> -addConfiguredElementName(ObjectType t) fails
> -createElementName works
>
> Here's pretty much the exact code from the ant
> manual
>
> import org.apache.tools.ant.Task;
> import org.apache.tools.ant.BuildException;
>
> import java.util.Vector;
> import java.util.Enumeration;
> /* from
>
http://ant.apache.org/manual/develop.html#nested-elements
>  * &
>
http://ant.apache.org/manual/tutorial-writing-tasks.html
>  */
> public class EchoTest extends Task {
> private Vector messages = new Vector();
>
>
> public void execute() throws BuildException {
> for(Enumeration e = messages.elements();
> e.hasMoreElements();) {
> getProject().log("MSG:
> "+((Message)e.nextElement()).getMessage());
> }
> }
>
> // works
> //public Message createMessage() {
> //Message m = new Message();
> //messages.add(m);
> //return m;
> //}
>
> //doesn't
> public void addMessage(Message m) {
> messages.add(m);
> }
>
> public class Message {
> private String message;
> public Message() {}
>
> public String getMessage() {
> return message;
> }
>
> public void setMessage(String message) {
> this.message = message;
> }
> }
> }
>
> and my build.xml:
>
> 
> 
> 
> 
>
classname="org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest"
> />
> 
>
> 
>   
> 
> 
>   
> 
> 
>
> output:
> [EMAIL PROTECTED]:~/IdeaProjects/ant-core-trunk$ ant
> -debug -f
> test-control-file.xml test
> Apache Ant version 1.7.1alpha compiled on May 9 2007
> Buildfile: test-control-file.xml
> Adding reference: ant.PropertyHelper
> Detected Java version: 1.6 in:
> /usr/lib/jvm/java-6-sun-1.6.0.00/jre
> Detected OS: Linux
> Adding reference: ant.ComponentHelper
> Setting ro project property: ant.file ->
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Adding reference: ant.projectHelper
> Adding reference: ant.parsing.context
> Adding reference: ant.targets
> parsing buildfile
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> with URI =
>
file:/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Setting ro project property: ant.project.name ->
> test-dpkg
> Adding reference: test-dpkg
> Setting ro project property: ant.file.test-dpkg ->
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Project base dir set to:
> /home/kev/IdeaProjects/ant-core-trunk
>  +Target:
>  +Target: init
>  +Target: test
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> Adding reference: ant.executor
> Build sequence for target(s) `test' is [init, test]
> Complete build sequence is [init, test, ]
>
> init:
> [antlib:org.apache.tools.ant] Could not load
> definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be
> found.
> Class
>
org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
> loaded from parent loader (parentFirst)
>  +Datatype control
>
org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
> Class
> org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest
> loaded from
> parent loader (parentFirst)
>  +Datatype my-echo
> org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest
>
> test:
>
> BUILD FAILED
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml:18:
> my-echo doesn't support the nested "message"
> element.
> at
>
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:356)
> at
>
org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198)
> at
>
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
> at
> org.apache.tools.ant.Task.perform(Task.java:347)
> at
> org.apache.tools.ant.Target.execute(Target.java:357)
> at
>
org.apache.tools.ant.Target.performTasks(Target.java:385)
> at
>
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1331)
> at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1300)
> at
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at
>
org.apache.tools.ant.Project.executeTargets(Project.java:1183)
> at
> org.apache.tools.ant.Main.runBuild(Main.java:758)
> at
> org.apache.tools.ant.Main.startAnt(Main.java:217)
> at
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:

Re: NestedElement weirdness

2007-05-09 Thread Matt Benson
This probably isn't your whole problem, but right off
the bat you generally need to make your inner types
static.

HTH,
Matt

--- Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I've just spent a hugely frustrating 2 hours or so
> trying to get a
> simple nested element to work within a task.
> 
> -addElementName(ObjectType t) fails (task doesn't
> support nested element)
> -addConfiguredElementName(ObjectType t) fails
> -createElementName works
> 
> Here's pretty much the exact code from the ant
> manual
> 
> import org.apache.tools.ant.Task;
> import org.apache.tools.ant.BuildException;
> 
> import java.util.Vector;
> import java.util.Enumeration;
> /* from
>
http://ant.apache.org/manual/develop.html#nested-elements
>  * &
>
http://ant.apache.org/manual/tutorial-writing-tasks.html
>  */
> public class EchoTest extends Task {
> private Vector messages = new Vector();
> 
> 
> public void execute() throws BuildException {
> for(Enumeration e = messages.elements();
> e.hasMoreElements();) {
> getProject().log("MSG:
> "+((Message)e.nextElement()).getMessage());
> }
> }
> 
> // works
> //public Message createMessage() {
> //Message m = new Message();
> //messages.add(m);
> //return m;
> //}
> 
> //doesn't
> public void addMessage(Message m) {
> messages.add(m);
> }
> 
> public class Message {
> private String message;
> public Message() {}
> 
> public String getMessage() {
> return message;
> }
> 
> public void setMessage(String message) {
> this.message = message;
> }
> }
> }
> 
> and my build.xml:
> 
> 
> 
> 
>   
>
classname="org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest"
> />
> 
> 
> 
>   
> 
> 
>   
> 
> 
> 
> output:
> [EMAIL PROTECTED]:~/IdeaProjects/ant-core-trunk$ ant
> -debug -f
> test-control-file.xml test
> Apache Ant version 1.7.1alpha compiled on May 9 2007
> Buildfile: test-control-file.xml
> Adding reference: ant.PropertyHelper
> Detected Java version: 1.6 in:
> /usr/lib/jvm/java-6-sun-1.6.0.00/jre
> Detected OS: Linux
> Adding reference: ant.ComponentHelper
> Setting ro project property: ant.file ->
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Adding reference: ant.projectHelper
> Adding reference: ant.parsing.context
> Adding reference: ant.targets
> parsing buildfile
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> with URI =
>
file:/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Setting ro project property: ant.project.name ->
> test-dpkg
> Adding reference: test-dpkg
> Setting ro project property: ant.file.test-dpkg ->
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
> Project base dir set to:
> /home/kev/IdeaProjects/ant-core-trunk
>  +Target:
>  +Target: init
>  +Target: test
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> Adding reference: ant.executor
> Build sequence for target(s) `test' is [init, test]
> Complete build sequence is [init, test, ]
> 
> init:
> [antlib:org.apache.tools.ant] Could not load
> definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be
> found.
> Class
>
org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
> loaded from parent loader (parentFirst)
>  +Datatype control
>
org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
> Class
> org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest
> loaded from
> parent loader (parentFirst)
>  +Datatype my-echo
> org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest
> 
> test:
> 
> BUILD FAILED
>
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml:18:
> my-echo doesn't support the nested "message"
> element.
> at
>
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:356)
> at
>
org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198)
> at
>
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
> at
> org.apache.tools.ant.Task.perform(Task.java:347)
> at
> org.apache.tools.ant.Target.execute(Target.java:357)
> at
>
org.apache.tools.ant.Target.performTasks(Target.java:385)
> at
>
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1331)
> at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1300)
> at
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at
>
org.apache.tools.ant.Project.executeTargets(Project.java:1183)
> at
> org.apache.tools.ant.Main.runBuild(Main.java:758)
> at
> org.apache.tools.ant.Main.startAnt(Main.java:217)
> at
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> at
>
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: The  type doesn't support the
> nested "message" el

NestedElement weirdness

2007-05-09 Thread Kevin Jackson

Hi all,

I've just spent a hugely frustrating 2 hours or so trying to get a
simple nested element to work within a task.

-addElementName(ObjectType t) fails (task doesn't support nested element)
-addConfiguredElementName(ObjectType t) fails
-createElementName works

Here's pretty much the exact code from the ant manual

import org.apache.tools.ant.Task;
import org.apache.tools.ant.BuildException;

import java.util.Vector;
import java.util.Enumeration;
/* from http://ant.apache.org/manual/develop.html#nested-elements
* & http://ant.apache.org/manual/tutorial-writing-tasks.html
*/
public class EchoTest extends Task {
   private Vector messages = new Vector();


   public void execute() throws BuildException {
   for(Enumeration e = messages.elements(); e.hasMoreElements();) {
   getProject().log("MSG: "+((Message)e.nextElement()).getMessage());
   }
   }

// works
//public Message createMessage() {
//Message m = new Message();
//messages.add(m);
//return m;
//}

//doesn't
   public void addMessage(Message m) {
   messages.add(m);
   }

   public class Message {
   private String message;
   public Message() {}

   public String getMessage() {
   return message;
   }

   public void setMessage(String message) {
   this.message = message;
   }
   }
}

and my build.xml:



   
   
   

   
 
   
   
 
   


output:
[EMAIL PROTECTED]:~/IdeaProjects/ant-core-trunk$ ant -debug -f
test-control-file.xml test
Apache Ant version 1.7.1alpha compiled on May 9 2007
Buildfile: test-control-file.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.00/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file ->
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml with URI =
file:/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
Setting ro project property: ant.project.name -> test-dpkg
Adding reference: test-dpkg
Setting ro project property: ant.file.test-dpkg ->
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml
Project base dir set to: /home/kev/IdeaProjects/ant-core-trunk
+Target:
+Target: init
+Target: test
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `test' is [init, test]
Complete build sequence is [init, test, ]

init:
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
Class org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
loaded from parent loader (parentFirst)
+Datatype control org.apache.tools.ant.taskdefs.optional.dpkg.ControlFileTask
Class org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest loaded from
parent loader (parentFirst)
+Datatype my-echo org.apache.tools.ant.taskdefs.optional.dpkg.EchoTest

test:

BUILD FAILED
/home/kev/IdeaProjects/ant-core-trunk/test-control-file.xml:18:
my-echo doesn't support the nested "message" element.
   at 
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:356)
   at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198)
   at 
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
   at org.apache.tools.ant.Task.perform(Task.java:347)
   at org.apache.tools.ant.Target.execute(Target.java:357)
   at org.apache.tools.ant.Target.performTasks(Target.java:385)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1331)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1300)
   at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1183)
   at org.apache.tools.ant.Main.runBuild(Main.java:758)
   at org.apache.tools.ant.Main.startAnt(Main.java:217)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: The  type doesn't support the nested "message" element.
   at 
org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:480)
   at 
org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:545)
   at 
org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:608)
   at 
org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:543)
   at 
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:343)
   ... 13 more
--- Nested Exception ---
The  type doesn't support the nested "message" element.
   at 
org.apache.tools.ant.IntrospectionHelper.throwNotSupp

svn commit: r536579 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/Concat.java src/tests/antunit/taskdefs/concat-test.xml src/tests/antunit/taskdefs/utf-16.expected src/tests/an

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 09:41:35 2007
New Revision: 536579

URL: http://svn.apache.org/viewvc?view=rev&rev=536579
Log:
massive refactorings to Concat: fix failing testcases in HEAD, and implement 
ResourceCollection

Added:
ant/core/trunk/src/tests/antunit/taskdefs/utf-16.expected   (with props)
ant/core/trunk/src/tests/antunit/types/resources/concat-resource-test.xml   
(with props)
Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=536579&r1=536578&r2=536579
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed May  9 09:41:35 2007
@@ -118,6 +118,8 @@
 *  now sources scripts from nested resources/resource collections. 
This lets you
   define scripts in JARs, remote URLs, or any other supported resource. 
Bugzilla report 41597.
 
+*  is now usable as a single-element ResourceCollection.
+
 
 Changes from Ant 1.6.5 to Ant 1.7.0
 ===

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java?view=diff&rev=536579&r1=536578&r2=536579
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java Wed May  
9 09:41:35 2007
@@ -15,7 +15,6 @@
  *  limitations under the License.
  *
  */
-
 package org.apache.tools.ant.taskdefs;
 
 import java.io.File;
@@ -24,18 +23,18 @@
 import java.io.FileReader;
 import java.io.InputStream;
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.io.OutputStream;
 import java.io.StringReader;
 import java.io.BufferedReader;
-import java.io.BufferedWriter;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.util.Arrays;
-import java.util.Vector;
+import java.util.Collections;
 import java.util.Iterator;
+import java.util.Vector;
+
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.BuildException;
@@ -54,8 +53,10 @@
 import org.apache.tools.ant.types.resources.selectors.Not;
 import org.apache.tools.ant.types.resources.selectors.Exists;
 import org.apache.tools.ant.types.resources.selectors.ResourceSelector;
-import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.ConcatResourceInputStream;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.ReaderInputStream;
+import org.apache.tools.ant.util.StringUtils;
 
 /**
  * This class contains the 'concat' task, used to concatenate a series
@@ -74,7 +75,7 @@
  * 
  *
  */
-public class Concat extends Task {
+public class Concat extends Task implements ResourceCollection {
 
 // The size of buffers to be used
 private static final int BUFFER_SIZE = 8192;
@@ -84,151 +85,504 @@
 private static final ResourceSelector EXISTS = new Exists();
 private static final ResourceSelector NOT_EXISTS = new Not(EXISTS);
 
-// Attributes.
-
 /**
- * The destination of the stream. If null, the system
- * console is used.
- */
-private File destinationFile;
-
-/**
- * Whether or not the stream should be appended if the destination file
- * exists.
- * Defaults to false.
+ * sub element points to a file or contains text
  */
-private boolean append;
+public static class TextElement extends ProjectComponent {
+private String   value = "";
+private boolean  trimLeading = false;
+private boolean  trim = false;
+private boolean  filtering = true;
+private String   encoding = null;
 
-/**
- * Stores the input file encoding.
- */
-private String encoding;
+/**
+ * whether to filter the text in this element
+ * or not.
+ *
+ * @param filtering true if the text should be filtered.
+ *  the default value is true.
+ */
+public void setFiltering(boolean filtering) {
+this.filtering = filtering;
+}
 
-/** Stores the output file encoding. */
-private String outputEncoding;
+/** return the filtering attribute */
+private boolean getFiltering() {
+return filtering;
+}
 
-/** Stores the binary attribute */
-private boolean binary;
+/**
+ * The encoding of the text element
+ *
+ * @param encoding the name of the charset used to encode
+ */
+public void setEncoding(String encoding) {
+

svn commit: r536575 - /ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 08:57:43 2007
New Revision: 536575

URL: http://svn.apache.org/viewvc?view=rev&rev=536575
Log:
okay, REALLY finish antunitizing the length test

Modified:
ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml?view=diff&rev=536575&r1=536574&r2=536575
==
--- ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml Wed May  9 
08:57:43 2007
@@ -29,19 +29,16 @@
 
 
-
+
+
   
-  
-
-  
-
-
-
-  
-
-  
-
+  
+
+
+
+  
+
   
 
   
@@ -50,19 +47,15 @@
 
 
-
+
   
-  
-
-  
-
-
-
-  
-
-  
-
+  
+
+
+
+  
+
   
 
   
@@ -70,160 +63,104 @@
   
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-
-  
-
-  
-
+
+  
+
+
+  
+
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
-  
-
+
+  
+
+  
+
   
 
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
-  
-
+
+  
+
+  
+
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
@@ -241,13 +178,9 @@
   
 
 
-
-  
-
-  
-
-  
-
+
+  
+
   
 
   
@@ -264,33 +197,25 @@
 
   
 
-
-  
-
-  
-
-
-  
-
-  
-
+
+  
+
+
+  
+
   
 
   
-
-  
-
-  
-
-  
-
-
-  
-
-  
-
-  
-
+
+  
+
+  
+
+
+  
+
+  
+
   
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536570 - /ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 08:39:56 2007
New Revision: 536570

URL: http://svn.apache.org/viewvc?view=rev&rev=536570
Log:
finish antunitizing length test

Modified:
ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml?view=diff&rev=536570&r1=536569&r2=536570
==
--- ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml Wed May  9 
08:39:56 2007
@@ -1,10 +1,14 @@
-
+
+
+  
+
   
   
   
   
 
-  
+  
 
 
 
@@ -13,7 +17,12 @@
 
   
 
-  
+  
+
+
+  
+
+  
 
   
 
@@ -35,7 +44,7 @@
 
   
 
-  
+  
 
   
 
@@ -56,7 +65,7 @@
 
   
 
-  
+  
 
   
   
@@ -70,7 +79,7 @@
 
   
 
-  
+  
 
   
 
@@ -83,7 +92,7 @@
 
   
 
-  
+  
 
 
   
@@ -94,7 +103,7 @@
 
   
 
-  
+  
 
   
 
@@ -104,7 +113,7 @@
 
   
 
-  
+  
 
   
 
@@ -117,7 +126,7 @@
 
   
 
-  
+  
 
   
 
@@ -129,7 +138,7 @@
 
   
 
-  
+  
 
   
 
@@ -142,7 +151,7 @@
 
   
 
-  
+  
 
   
 
@@ -218,11 +227,15 @@
   
 
   
-
+
+  
+
   
 
   
-
+
+  
+
   
 
   
@@ -237,7 +250,7 @@
 
   
 
-  
+  
 
   
   
@@ -278,11 +291,6 @@
 
   
 
-  
-
-  
-
-
   
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536557 - /ant/core/trunk/src/etc/testcases/taskdefs/concat.xml

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 08:07:43 2007
New Revision: 536557

URL: http://svn.apache.org/viewvc?view=rev&rev=536557
Log:
wtf

Modified:
ant/core/trunk/src/etc/testcases/taskdefs/concat.xml

Modified: ant/core/trunk/src/etc/testcases/taskdefs/concat.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/concat.xml?view=diff&rev=536557&r1=536556&r2=536557
==
--- ant/core/trunk/src/etc/testcases/taskdefs/concat.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/concat.xml Wed May  9 08:07:43 
2007
@@ -191,7 +191,7 @@
   http://ant.apache.org"; />
   http://ant.apache.org"; />
 
-
+
   
 http://ant.apache.org"; />
 http://ant.apache.org"; />



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536549 - /ant/core/trunk/src/tests/antunit/antunit-base.xml

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 07:50:24 2007
New Revision: 536549

URL: http://svn.apache.org/viewvc?view=rev&rev=536549
Log:
add importable file to give any antunit file a base for running itself

Added:
ant/core/trunk/src/tests/antunit/antunit-base.xml   (with props)

Added: ant/core/trunk/src/tests/antunit/antunit-base.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/antunit-base.xml?view=auto&rev=536549
==
--- ant/core/trunk/src/tests/antunit/antunit-base.xml (added)
+++ ant/core/trunk/src/tests/antunit/antunit-base.xml Wed May  9 07:50:24 2007
@@ -0,0 +1,11 @@
+
+
+
+  
+
+  
+  
+
+  
+
+

Propchange: ant/core/trunk/src/tests/antunit/antunit-base.xml
--
svn:eol-style = native



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536552 - in /ant/core/trunk/src: etc/testcases/taskdefs/length.xml tests/antunit/taskdefs/length-test.xml tests/junit/org/apache/tools/ant/taskdefs/LengthTest.java

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 07:51:57 2007
New Revision: 536552

URL: http://svn.apache.org/viewvc?view=rev&rev=536552
Log:
antunitize length test

Added:
ant/core/trunk/src/tests/antunit/taskdefs/length-test.xml
  - copied unchanged from r535935, 
ant/core/trunk/src/etc/testcases/taskdefs/length.xml
Removed:
ant/core/trunk/src/etc/testcases/taskdefs/length.xml
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/LengthTest.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536548 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 07:49:46 2007
New Revision: 536548

URL: http://svn.apache.org/viewvc?view=rev&rev=536548
Log:
refactorings

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java?view=diff&rev=536548&r1=536547&r2=536548
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Length.java Wed May  
9 07:49:46 2007
@@ -34,6 +34,7 @@
 import org.apache.tools.ant.types.EnumeratedAttribute;
 import org.apache.tools.ant.types.resources.Resources;
 import org.apache.tools.ant.types.resources.FileResource;
+import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.PropertyOutputStream;
 
 /**
@@ -184,13 +185,13 @@
 if (length == null) {
 throw new BuildException(LENGTH_REQUIRED);
 }
-Long ell = null;
+Long ell;
 if (STRING.equals(mode)) {
 ell = new Long(getLength(string, getTrim()));
-} else {
-ConditionHandler h = new ConditionHandler();
+} else { 
+AccumHandler h = new AccumHandler();
 handleResources(h);
-ell = new Long(h.getLength());
+ell = new Long(h.getAccum());
 }
 return when.evaluate(ell.compareTo(length));
 }
@@ -273,7 +274,7 @@
 protected abstract void handle(Resource r);
 
 void complete() {
-ps.close();
+FileUtils.close(ps);
 }
 }
 
@@ -294,9 +295,13 @@
}
 }
 
-private class AllHandler extends Handler {
+private class AccumHandler extends Handler {
 private long accum = 0L;
-AllHandler(PrintStream ps) {
+
+AccumHandler() {
+super(null);
+}
+protected AccumHandler(PrintStream ps) {
 super(ps);
 }
 protected long getAccum() {
@@ -310,20 +315,16 @@
 accum += size;
 }
 }
-void complete() {
-getPs().print(accum);
-super.complete();
-}
 }
 
-private class ConditionHandler extends AllHandler {
-ConditionHandler() {
-super(null);
+private class AllHandler extends AccumHandler {
+AllHandler(PrintStream ps) {
+super(ps);
 }
 void complete() {
-}
-long getLength() {
-return getAccum();
+getPs().print(getAccum());
+super.complete();
 }
 }
+
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r536536 - /ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java

2007-05-09 Thread mbenson
Author: mbenson
Date: Wed May  9 07:08:50 2007
New Revision: 536536

URL: http://svn.apache.org/viewvc?view=rev&rev=536536
Log:
if either resource to be compared has an unknown size, we must compare content

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java?view=diff&rev=536536&r1=536535&r2=536536
==
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ResourceUtils.java Wed 
May  9 07:08:50 2007
@@ -438,8 +438,13 @@
 if (r1.equals(r2)) {
 return true;
 }
-if (!text && r1.getSize() != r2.getSize()) {
-return false;
+if (!text) {
+long s1 = r1.getSize();
+long s2 = r2.getSize();
+if (s1 != Resource.UNKNOWN_SIZE && s2 != Resource.UNKNOWN_SIZE
+&& s1 != s2) {
+return false;
+}
 }
 return compareContent(r1, r2, text) == 0;
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: auto download of antlibs

2007-05-09 Thread Xavier Hanin

On 5/9/07, Steve Loughran <[EMAIL PROTECTED]> wrote:


Xavier Hanin wrote:
> On 5/8/07, Steve Loughran <[EMAIL PROTECTED]> wrote:
>> Xavier Hanin wrote:
>> > On 5/7/07, Steve Loughran <[EMAIL PROTECTED]> wrote:
>>
>> >> hooking in to a named ivy conf:
>> >>
>> >> 
>> > And wher is the version information? And how do we map this package
>> > name to an organization/module name couple? What do you think of
>> > providing all information:
>> > > > org="org.example"
>> > module="example"
>> > rev="1.3"
>> > conf="example" />
>>
>> I'd expect all version info to be in ivy.xml; when I declare a
>> configuration in the  declaration, I say which ivy
configuration
>> I want, without any version info embedded in the build files
> And where is the ivy.xml?
>

alongside the build.xml, of course. I'm assuming that  has
already kicked in.



So you have to call ivy:resolve manually  if you use multiple antlibs (to
name the ivy.xml files). I'm not sure having to use a separate ivy.xml for
each antlib make much sense, since you will usually have only one dependency
in your ivy.xml. I think the inline mode (where you specify the dependency
when calling the task, with no ivy file) should at least be an option. If we
really want to put this information out of the antlib task, I think it
doesn't really that different from what is possible today:
   
   

Am I missing something?

Xavier

-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/


Re: auto download of antlibs

2007-05-09 Thread Xavier Hanin

On 5/9/07, Steve Loughran <[EMAIL PROTECTED]> wrote:


Xavier Hanin wrote:
> On 5/7/07, Stephen McConnell <[EMAIL PROTECTED]> wrote:
>>
>>
>> > -Original Message-
>> > From: Xavier Hanin [mailto:[EMAIL PROTECTED]
>> > Sent: Friday, 4 May 2007 5:56 PM
>> > To: Ant Developers List
>> > Subject: Re: auto download of antlibs
>> >
>> > On 5/4/07, Steve Loughran <[EMAIL PROTECTED]> wrote:
>> > >
>> > > One thing I've been thinking of this week is how could we work with
>> > > Ivy for automatic antlib download.
>> > >
>> > > No code right now, just some thoughts
>> > >
>> > >
>> > > 1. add a -offline argument to say "we are offline". this will set
>> > > a property, (and.build.offline) and the  test will
>> > > work. It is meant to tell things like Ivy that we are offline. At
>> > > some point we could add some way for Ant to guess whether the net
>> > > is there or not, if java integrates with the OS properly (there is
>> > > an API call for this in J2ME, just not Java SE)
>> >
>> > This makes me think that we could improve how Ivy deal with
>> > online/offline mode. Indeed for the moment Ivy doesn't really
>> > know which repository requires a network access and which
>> > doesn't. It would be nice if Ivy would know that, so that
>> > even if offline mode you could still use alocal repository
>> > (for antlib testing for instance).
>>
>> Are you describing a policy at the level of:
>>
>>   a) a multi-project build decision?
>>   b) a specific target project build decision?
>>   c) a repository access decision?
>>   d) some or any of the above?
> I'm describing how Ivy could be improved to better deal with a
> situation where the user do not have network access. You can already
> deal with that pretty efficiently in Ivy, but you have to define
> several settings, to avoid using remote access when it's not
> available. Having something easier for the user in this common
> situation would be interesting.

Maybe every repository in ivyconf.xml would be marked as offline,
meaning they are available when there is no network.When you run ant (or
ivy) with -offline, only offline repositories would be used.



What do you mean?  If all repositories are marked as offline, there is no
added value. We are currently reviewing our cache management, but for the
moment Ivy can already use the cache when you are offline. The problem is
that if you ask for a latest version of something, Ivy will try to connect
to the repository. For the moment this fails if the repository is not
available, but we are planning to make it possible to use cache only in this
case. But even with this improvement, trying to connect to a non available
repository may take time, so the idea of an offline mode would be to say:
"do not use this repository when offline, use only cache" for repositories
requiring a network connection, and for those which do not require this
connection (like a local repo), continue to use the repo and not only the
cache.

- xavier

-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/


Re: auto download of antlibs

2007-05-09 Thread Steve Loughran

Stefan Bodewig wrote:

On Mon, 07 May 2007, Steve Loughran <[EMAIL PROTECTED]> wrote:


You'd have to include a version. One thing you could do is
lib:xmlns="antlib://org/example/something#2.13" ...but that would
place the version into the namespace, which is too early to read
in/expand ant properties, and you'd have to update the xmlns
declaration everywhere you used it...that's a no-no in a big
project.


True.

Apart from the idea to use the not-exactly-automatic approach you
describe (use a typedef instead of a namespace alone) another option
would be a level of indirection.  Something Xavier suggested last
week.

xmlns="antlib:ivy://org.apache.antlibs/antunit#integration" could
trigger a lookup of an ivy.xml file and we'll use the integration
configuration of the artifact antunit in the org.apache.antlibs
organization (making up names here).



oh, so the ivy.xml file (or ivyconf.xml for big-projects), would list 
the mappings. that's a nice idea.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: auto download of antlibs

2007-05-09 Thread Steve Loughran

Xavier Hanin wrote:

On 5/8/07, Steve Loughran <[EMAIL PROTECTED]> wrote:

Xavier Hanin wrote:
> On 5/7/07, Steve Loughran <[EMAIL PROTECTED]> wrote:

>> hooking in to a named ivy conf:
>>
>> 
> And wher is the version information? And how do we map this package
> name to an organization/module name couple? What do you think of
> providing all information:
>  org="org.example"
> module="example"
> rev="1.3"
> conf="example" />

I'd expect all version info to be in ivy.xml; when I declare a
configuration in the  declaration, I say which ivy configuration
I want, without any version info embedded in the build files

And where is the ivy.xml?



alongside the build.xml, of course. I'm assuming that  has 
already kicked in.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: auto download of antlibs

2007-05-09 Thread Steve Loughran

Xavier Hanin wrote:

On 5/7/07, Stephen McConnell <[EMAIL PROTECTED]> wrote:



> -Original Message-
> From: Xavier Hanin [mailto:[EMAIL PROTECTED]
> Sent: Friday, 4 May 2007 5:56 PM
> To: Ant Developers List
> Subject: Re: auto download of antlibs
>
> On 5/4/07, Steve Loughran <[EMAIL PROTECTED]> wrote:
> >
> > One thing I've been thinking of this week is how could we work with
> > Ivy for automatic antlib download.
> >
> > No code right now, just some thoughts
> >
> >
> > 1. add a -offline argument to say "we are offline". this will set
> > a property, (and.build.offline) and the  test will
> > work. It is meant to tell things like Ivy that we are offline. At
> > some point we could add some way for Ant to guess whether the net
> > is there or not, if java integrates with the OS properly (there is
> > an API call for this in J2ME, just not Java SE)
>
> This makes me think that we could improve how Ivy deal with
> online/offline mode. Indeed for the moment Ivy doesn't really
> know which repository requires a network access and which
> doesn't. It would be nice if Ivy would know that, so that
> even if offline mode you could still use alocal repository
> (for antlib testing for instance).

Are you describing a policy at the level of:

  a) a multi-project build decision?
  b) a specific target project build decision?
  c) a repository access decision?
  d) some or any of the above?

I'm describing how Ivy could be improved to better deal with a
situation where the user do not have network access. You can already
deal with that pretty efficiently in Ivy, but you have to define
several settings, to avoid using remote access when it's not
available. Having something easier for the user in this common
situation would be interesting.


Maybe every repository in ivyconf.xml would be marked as offline, 
meaning they are available when there is no network.When you run ant (or 
ivy) with -offline, only offline repositories would be used.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]