svn commit: r495488 - in /ant/core/trunk: docs/faq.html xdocs/faq.xml

2007-01-11 Thread bodewig
Author: bodewig
Date: Thu Jan 11 21:22:23 2007
New Revision: 495488

URL: http://svn.apache.org/viewvc?view=rev&rev=495488
Log:
junit.jar is required to build 1.7.0 from sources

Modified:
ant/core/trunk/docs/faq.html
ant/core/trunk/xdocs/faq.xml

Modified: ant/core/trunk/docs/faq.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/faq.html?view=diff&rev=495488&r1=495487&r2=495488
==
--- ant/core/trunk/docs/faq.html (original)
+++ ant/core/trunk/docs/faq.html Thu Jan 11 21:22:23 2007
@@ -343,6 +343,10 @@
 
 Known Problems
 
+
+  Ant 1.7.0 doesn't build from sources without
+JUnit
+  
 
    or  doesn't work in Ant
 1.3 on Unix
@@ -1623,6 +1627,27 @@
 files that your project does, since it will give the correct
 results for properties that were specified on the Ant command line.
 
+  
+  Ant 1.7.0 doesn't build from sources without
+JUnit
+
+  When building Ant 1.7.0 from the source release without
+junit.jar the build fails with the message "We cannot build
+the test jar unless JUnit is present".
+With Ant 1.7.0 we've started to add 
ant-testutil.jar as
+part of the distribution and this causes a hard dependency on
+JUnit - at least in version 1.7.0.  Unfortunately the
+installation docs don't say so.
+There are two workarounds:
+
+
+  Add junit.jar to your CLASSPATH when building Ant.
+
+  Change Ant's buildfile and remove test-jar from the
+  depends list of the dist-lite target.
+
+
+
   
    or  doesn't work in Ant
 1.3 on Unix

Modified: ant/core/trunk/xdocs/faq.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/xdocs/faq.xml?view=diff&rev=495488&r1=495487&r2=495488
==
--- ant/core/trunk/xdocs/faq.xml (original)
+++ ant/core/trunk/xdocs/faq.xml Thu Jan 11 21:22:23 2007
@@ -1329,6 +1329,35 @@
   
 
   
+
+  Ant 1.7.0 doesn't build from sources without
+JUnit
+
+  
+
+When building Ant 1.7.0 from the source release without
+junit.jar the build fails with the message "We cannot build
+the test jar unless JUnit is present".
+
+With Ant 1.7.0 we've started to add ant-testutil.jar as
+part of the distribution and this causes a hard dependency on
+JUnit - at least in version 1.7.0.  Unfortunately the
+installation docs don't say so.
+
+There are two workarounds:
+
+
+
+  Add junit.jar to your CLASSPATH when building Ant.
+
+  Change Ant's buildfile and remove test-jar from the
+  depends list of the dist-lite target.
+
+
+
+  
+
+
 
    or  doesn't work in Ant
 1.3 on Unix



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



svn commit: r495399 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/ComponentHelper.java

2007-01-11 Thread stevel
Author: stevel
Date: Thu Jan 11 14:01:51 2007
New Revision: 495399

URL: http://svn.apache.org/viewvc?view=rev&rev=495399
Log:
Extra diagnostics. Dump all types in a namespace if the one you ask for isnt 
known. Good for identifying typos, and helps you differentiate "library not yet 
loaded" from "task unknown"

Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=495399&r1=495398&r2=495399
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jan 11 14:01:51 2007
@@ -63,6 +63,10 @@
 
 * Allow  to refer directly to a FileNameMapper instance.
 
+* If you try and use a type in a namespace (or an antlib), and the type is not
+  recognized but there are other definitions in that namespace, Ant lists what
+  the known definitions are. This helps you find spelling errors. 
+
 Changes from Ant 1.6.5 to Ant 1.7.0
 ===
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java?view=diff&rev=495399&r1=495398&r2=495399
==
--- ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Thu Jan 
11 14:01:51 2007
@@ -33,6 +33,10 @@
 import java.util.Properties;
 import java.util.Set;
 import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 
 import org.apache.tools.ant.taskdefs.Typedef;
 import org.apache.tools.ant.taskdefs.Definer;
@@ -760,6 +764,8 @@
 /**
  * Called for each component name, check if the
  * associated URI has been examined for antlibs.
+ * @param componentName the name of the component, which should include a 
URI
+ *  prefix if it is in a namespace
  */
 private synchronized void checkNamespace(String componentName) {
 String uri = ProjectHelper.extractUriFromComponentName(componentName);
@@ -929,21 +935,36 @@
 }
 
 /**
- * Print unknown definition.
+ * Print unknown definition.forking
  */
 private void printUnknownDefinition(
 PrintWriter out, String componentName, String dirListing) {
 boolean isAntlib = componentName.indexOf(MagicNames.ANTLIB_PREFIX) == 
0;
+String uri=ProjectHelper.extractUriFromComponentName(componentName);
 out.println("Cause: The name is undefined.");
 out.println("Action: Check the spelling.");
 out.println("Action: Check that any custom tasks/types have been 
declared.");
 out.println("Action: Check that any /"
 + " declarations have taken place.");
-if (isAntlib) {
-out.println();
-out.println("This appears to be an antlib declaration. ");
-out.println("Action: Check that the implementing library exists in 
one of:");
-out.println(dirListing);
+if(uri.length()>0) {
+List matches = antTypeTable.findMatches(uri);
+if(matches.size()>0) {
+out.println();
+out.println("The definitions in the namespace "+uri+" are:");
+for(Iterator it=matches.iterator();it.hasNext();) {
+AntTypeDefinition def=(AntTypeDefinition) it.next();
+String local = 
ProjectHelper.extractNameFromComponentName(def.getName());
+out.println(""+local);
+}
+} else {
+out.println("No types or tasks have been defined in this 
namespace yet");
+if (isAntlib) {
+out.println();
+out.println("This appears to be an antlib declaration. ");
+out.println("Action: Check that the implementing library 
exists in one of:");
+out.println(dirListing);
+}
+}
 }
 }
 
@@ -1035,6 +1056,22 @@
 public boolean containsValue(Object value) {
 return contains(value);
 }
-}
 
+/**
+ * Create a list of all definitions that match a prefix, usually the 
URI
+ * of a library
+ * @param prefix prefix to match off
+ * @return the (possibly empty) list of definitions
+ */
+public List/**/ findMatches(String prefix) {
+ArrayList matches=new ArrayList();
+for (Iterator i = values().iterator(); i.hasNext() ;) {
+AntTypeDefinition def = (AntTypeDefinition) (i.next());
+if(def.getName().startsWith(prefix)) {
+matches

DO NOT REPLY [Bug 41353] - synchronization issues around Ant's properties

2007-01-11 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=41353


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.7.1




--- Additional Comments From [EMAIL PROTECTED]  2007-01-11 11:22 ---
fixed in SVN HEAD.

-- 
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: r495340 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/PropertyHelper.java

2007-01-11 Thread mbenson
Author: mbenson
Date: Thu Jan 11 11:21:54 2007
New Revision: 495340

URL: http://svn.apache.org/viewvc?view=rev&rev=495340
Log:
Synchonization issues in PropertyHelper.  Bugzilla 41353.

Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=495340&r1=495339&r2=495340
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jan 11 11:21:54 2007
@@ -36,7 +36,9 @@
 
 * Strip out all -J arguments to non forking rmic adapters, specifically
   the Sun and Weblogic compilers.
-  Bug report 41349  
+  Bug report 41349
+
+* Synchonization issues in PropertyHelper.  Bugzilla 41353.
 
 Other changes:
 --

Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?view=diff&rev=495340&r1=495339&r2=495340
==
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Thu Jan 11 
11:21:54 2007
@@ -470,7 +470,10 @@
  * (including user properties).
  */
 public Hashtable getProperties() {
-return new Hashtable(properties);
+//avoid concurrent modification:
+synchronized (properties) {
+return new Hashtable(properties);
+}
 // There is a better way to save the context. This shouldn't
 // delegate to next, it's for backward compatibility only.
 }
@@ -480,7 +483,10 @@
  * @return a hashtable containing just the user properties
  */
 public Hashtable getUserProperties() {
-return new Hashtable(userProperties);
+//avoid concurrent modification:
+synchronized (userProperties) {
+return new Hashtable(userProperties);
+}
 }
 
 /**
@@ -526,14 +532,17 @@
  * @since Ant 1.6
  */
 public void copyInheritedProperties(Project other) {
-Enumeration e = inheritedProperties.keys();
-while (e.hasMoreElements()) {
-String arg = e.nextElement().toString();
-if (other.getUserProperty(arg) != null) {
-continue;
+//avoid concurrent modification:
+synchronized (inheritedProperties) {
+Enumeration e = inheritedProperties.keys();
+while (e.hasMoreElements()) {
+String arg = e.nextElement().toString();
+if (other.getUserProperty(arg) != null) {
+continue;
+}
+Object value = inheritedProperties.get(arg);
+other.setInheritedProperty(arg, value.toString());
 }
-Object value = inheritedProperties.get(arg);
-other.setInheritedProperty(arg, value.toString());
 }
 }
 
@@ -550,14 +559,17 @@
  * @since Ant 1.6
  */
 public void copyUserProperties(Project other) {
-Enumeration e = userProperties.keys();
-while (e.hasMoreElements()) {
-Object arg = e.nextElement();
-if (inheritedProperties.containsKey(arg)) {
-continue;
+//avoid concurrent modification:
+synchronized (userProperties) {
+Enumeration e = userProperties.keys();
+while (e.hasMoreElements()) {
+Object arg = e.nextElement();
+if (inheritedProperties.containsKey(arg)) {
+continue;
+}
+Object value = userProperties.get(arg);
+other.setUserProperty(arg.toString(), value.toString());
 }
-Object value = userProperties.get(arg);
-other.setUserProperty(arg.toString(), value.toString());
 }
 }
 



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



DO NOT REPLY [Bug 41353] New: - synchronization issues around Ant's properties

2007-01-11 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=41353

   Summary: synchronization issues around Ant's properties
   Product: Ant
   Version: 1.7.0
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


Mail on user@ reported that ConcurrentModificationExceptions were thrown when
running  tasks in .

-- 
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: memory profiling Ant

2007-01-11 Thread Dominique Devienne

So considering you're asking for it I think we can manage to ask a
license and put a logo on ant's webpage...


Wasn't the answer a no-no when Peter asked about this recently? --DD

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



DO NOT REPLY [Bug 41345] - java clonevm attribute documentation has duplicated word

2007-01-11 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=41345


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.7.1




--- Additional Comments From [EMAIL PROTECTED]  2007-01-11 07:24 ---
fixed in SVN HEAD.  Thanks!

-- 
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: r495253 - /ant/core/trunk/docs/manual/CoreTasks/java.html

2007-01-11 Thread mbenson
Author: mbenson
Date: Thu Jan 11 07:22:53 2007
New Revision: 495253

URL: http://svn.apache.org/viewvc?view=rev&rev=495253
Log:
bugzilla 41345. s/true true/true/ from Darin Swanson

Modified:
ant/core/trunk/docs/manual/CoreTasks/java.html

Modified: ant/core/trunk/docs/manual/CoreTasks/java.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/java.html?view=diff&rev=495253&r1=495252&r2=495253
==
--- ant/core/trunk/docs/manual/CoreTasks/java.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/java.html Thu Jan 11 07:22:53 2007
@@ -200,7 +200,7 @@
   
   
 clonevm
-If set to true true, then all system properties
+If set to true, then all system properties
   and the bootclasspath of the forked Java Virtual Machine will be
   the same as those of the Java VM running Ant.  Default is
   "false" (ignored if fork is disabled).



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



Re: Maven Ant Task problem when used with Ant 1.7.0

2007-01-11 Thread Matt Benson
--- Kevin Jackson <[EMAIL PROTECTED]> wrote:

> Hi Matt,
> 
> > I have checked in code to fix this.  Those
> > experiencing the problem might want to test
> against a
> > build from SVN HEAD to verify the problem is fixed
> for
> > them.  It wouldn't hurt to remind the Maven folks
> to
> > set the Project instance on artifacts they create,
> > either.
> >
> 
> That was quick! And congrats on committership for
> commons btw

RE Quick:  because it was my change that triggered the
error in the first place, even though all I really did
was uncover their error.  :)

RE Congrats:  Thanks!

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



 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
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-01-11 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 12 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 17 secs
Command Line: 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-11012007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-11012007.jar:/usr/local/gump/public/workspace/jakarta-commons/net/dist/commons-net-11012007.jar:/usr/local/gump/packages/jaf-1.1ea/activation.jar:/usr/local/gump/packages/bcel-5.2/bcel-5.2.jar:/usr/local/gump/public/workspace/jakarta-bsf/build/lib/bsf.jar:/usr/local/gump/public/workspace/logging-log4j/dist/lib/log4j-11012007.jar:/usr/local/gump/public/workspace/jakarta-oro/jakarta-oro-11012007.jar:/usr/local/gump/public/workspace/jakarta-regexp/build/jakarta-regexp-11012007.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-11012007.jar:/usr/local/gump/public/workspace/dist/junit/junit.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_11012007/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-11012007.jar
-
[au:antunit] Target: testfirst2 took 0.009 sec
[au

svn commit: r495229 - in /ant/core/trunk: ./ src/etc/testcases/taskdefs/rmic/ src/main/org/apache/tools/ant/taskdefs/rmic/ src/tests/junit/org/apache/tools/ant/taskdefs/

2007-01-11 Thread stevel
Author: stevel
Date: Thu Jan 11 06:02:50 2007
New Revision: 495229

URL: http://svn.apache.org/viewvc?view=rev&rev=495229
Log:
Bug 41349: rmic should strip out -J compiler args when not forking

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

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java

ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=495229&r1=495228&r2=495229
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jan 11 06:02:50 2007
@@ -34,6 +34,10 @@
 * Regression: NPE was thrown when using  against a
   (third-party instantiated) fileset with null Project reference.
 
+* Strip out all -J arguments to non forking rmic adapters, specifically
+  the Sun and Weblogic compilers.
+  Bug report 41349  
+
 Other changes:
 --
 

Modified: ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml?view=diff&rev=495229&r1=495228&r2=495229
==
--- ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml Thu Jan 11 06:02:50 
2007
@@ -153,6 +153,14 @@
 
   
 
+
+  
+
+  
+
+
+  
+
   
 
+  
+
+  
+
+  
+
   
 
   

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java?view=diff&rev=495229&r1=495228&r2=495229
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
 Thu Jan 11 06:02:50 2007
@@ -21,6 +21,9 @@
 import java.io.File;
 import java.util.Random;
 import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
+
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Rmic;
 import org.apache.tools.ant.types.Commandline;
@@ -249,11 +252,48 @@
 cmd.createArgument().setValue("-g");
 }
 
-cmd.addArguments(attributes.getCurrentCompilerArgs());
+String[] compilerArgs = attributes.getCurrentCompilerArgs();
+compilerArgs = preprocessCompilerArgs(compilerArgs);
+cmd.addArguments(compilerArgs);
 
 logAndAddFilesToCompile(cmd);
 return cmd;
  }
+
+/**
+ * Preprocess the compiler arguments in any way you see fit.
+ * This is to allow compiler adapters to validate or filter the arguments.
+ * The base implementation returns the original compiler arguments 
unchanged.
+ * @param compilerArgs the original compiler arguments
+ * @return the filtered set.
+ */
+protected String[] preprocessCompilerArgs(String[] compilerArgs) {
+return compilerArgs;
+}
+
+
+/**
+ * Strip out all -J args from the command list. Invoke this from
+ * [EMAIL PROTECTED] #preprocessCompilerArgs(String[])} if you have a 
non-forking
+ * compiler. 
+ * @param compilerArgs the original compiler arguments
+ * @return the filtered set.
+ */
+protected String[] filterJvmCompilerArgs(String[] compilerArgs) {
+int len = compilerArgs.length;
+List args=new ArrayList(len);
+for(int i=0;ihttp://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java?view=diff&rev=495229&r1=495228&r2=495229
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java Thu 
Jan 11 06:02:50 2007
@@ -100,4 +100,14 @@
 }
 }
 }
+
+
+/**
+ * Strip out all -J args from the command list.
+ * @param compilerArgs the original compiler arguments
+ * @return the filtered set.
+ */
+protected String[] preprocessCompilerArgs(String[] compilerArgs) {
+return filterJvmCompilerArgs(compilerArgs);
+}
 }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java?view=diff&rev=495229&r1=495228&r2=495229
==

DO NOT REPLY [Bug 41349] - rmic should strip out -J compiler args when not forking

2007-01-11 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=41349


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Target Milestone|--- |1.7.1




--- Additional Comments From [EMAIL PROTECTED]  2007-01-11 06:03 ---
Fixed by adding an override point for compilers to preprocess compiler argument;
the sun and weblogic adapters both strip out -J arguments. 

-- 
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]



DO NOT REPLY [Bug 41349] - rmic should strip out -J compiler args when not forking

2007-01-11 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=41349





--- Additional Comments From [EMAIL PROTECTED]  2007-01-11 05:27 ---
You can increase the memory for rmic when ompiler=forking with a JVM option
  

But run that in non-forking, and you get told off


rmi:
 [rmic] RMI Compiling 127 classes to
/home/slo/Projects/SmartFrog/Forge/core/smartfrog/build
 [rmic] -J-mx256m is an invalid option or argument.
 [rmic]
 [rmic] Usage: rmic  
 [rmic]
 [rmic] where  includes:
 [rmic]   -keep  Do not delete intermediate generated source files 
   [rmic]   -keepgenerated (same as "-keep")
 [rmic]   -v1.1  Create stubs/skeletons for 1.1 stub protocol 
version
 [rmic]   -vcompat   Create stubs/skeletons compatible with both
 [rmic]1.1 and 1.2 stub protocol versions
 [rmic]   -v1.2  (default) Create stubs for 1.2 stub protocol
version only
 [rmic]   -iiop  Create stubs for IIOP. When present,  also
includes:
 [rmic]
 [rmic]-always   Create stubs even when they
appear current
 [rmic]-alwaysgenerate   (same as "-always")
 [rmic]-nolocalstubs Do not create stubs optimized
for same process
 [rmic]
 [rmic]   -idl   Create IDL. When present,  also includes:
 [rmic]
 [rmic]-noValueMethods   Do not generate methods for
valuetypes
 [rmic]-always   Create IDL even when it appears
current
 [rmic]-alwaysgenerate   (same as "-always")
 [rmic]
 [rmic]   -g Generate debugging info
 [rmic]   -nowarnGenerate no warnings
 [rmic]   -nowrite   Do not write compiled classes to the file system
 [rmic]   -verbose   Output messages about what the compiler is doing
 [rmic]   -classpath   Specify where to find input class files
 [rmic]   -bootclasspath   Override location of bootstrap class files
 [rmic]   -extdirs Override location of installed extensions 
   [rmic]   -d  Specify where to place generated class files
 [rmic]   -J   Pass argument to the java interpreter
 [rmic]

The non forking rmi compiler adapter must strip out all -J args (maybe with a
hint) before running the in-vm compiler.

-- 
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]



DO NOT REPLY [Bug 41349] New: - rmic should strip out -J compiler args when not forking

2007-01-11 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=41349

   Summary: rmic should strip out -J compiler args when not forking
   Product: Ant
   Version: 1.7.0
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


 

-- 
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: memory profiling Ant

2007-01-11 Thread Stephane Bailliez

Steve Loughran wrote:


What's the best way to memory profile Ant?

We have an interesting problem at work where  is  running out of 
memory when run in an ivy-managed  Run, but not when run 
standalone. So something is eating up lots of memory, and  is 
the symptom, not the problem. Same problem on Ant1.6 and 1.7, java1.4 
and 1.5 BTW.


I was looking somehow at this type of behavior to f and did not go very 
deep into the analysis, I used a trial version of YourKit but did not 
spend time on it..
I was thinking at this time it would be nice to have an opensource 
license of Yourkit for Ant...


So considering you're asking for it I think we can manage to ask a 
license and put a logo on ant's webpage...



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



Re: memory profiling Ant

2007-01-11 Thread Peter Reilly

I have used the -XX:+HeapDumpOnOutOfMemoryError
option in ANT_OPTS,
caused the OOM,
and run yourkit http://www.yourkit.com/changes/index.jsp#memory
to analyize the heap file.
Pretty nice.

Peter


On 1/11/07, Steve Loughran <[EMAIL PROTECTED]> wrote:


What's the best way to memory profile Ant?

We have an interesting problem at work where  is  running out of
memory when run in an ivy-managed  Run, but not when run
standalone. So something is eating up lots of memory, and  is the
symptom, not the problem. Same problem on Ant1.6 and 1.7, java1.4 and
1.5 BTW.

I suspect Ivy may be the cause, it being the most recent change, and it
does have that singleton configuration

-steve

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




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



memory profiling Ant

2007-01-11 Thread Steve Loughran


What's the best way to memory profile Ant?

We have an interesting problem at work where  is  running out of 
memory when run in an ivy-managed  Run, but not when run 
standalone. So something is eating up lots of memory, and  is the 
symptom, not the problem. Same problem on Ant1.6 and 1.7, java1.4 and 
1.5 BTW.


I suspect Ivy may be the cause, it being the most recent change, and it 
does have that singleton configuration


-steve

-
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-01-11 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 120 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 16 secs
Command Line: 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/dist/junit/junit.jar:/usr/local/gump/public/workspace/ant-antlibs/svn/build/ant-svn-11012007.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.OldTestClassRunner.run(OldTestClassRunner.java:35)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
[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 40.206 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.OldTestClassRunner.run(OldTestClassRunner.java:35)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
[junit] at 
org.apac

AW: In AntLib defined type not accessible

2007-01-11 Thread Jan.Materne
Thanks, that works.

Jan 


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



Re: In AntLib defined type not accessible

2007-01-11 Thread Peter Reilly

You cannot (currently) do that like that.
However you can use ant types to do the same thing.
---
src/mymapper/MyMapper.java
---
package mymapper;
import org.apache.tools.ant.util.FileNameMapper;

public class MyMapper implements FileNameMapper {
   public void setFrom(String from) {}
   public void setTo(String to) {}
   public String[] mapFileName(String sourceFileName) {
   return new String[] {
   sourceFileName.toUpperCase()};
   }
}

src/mymapper/antlib.xml
---


 

 
   
   
   
 
   
   
 
   
 
   
 


(Note the use of current: to resolve the namespace that the mymapper
type is placed in - see:
http://ant.apache.org/manual/CoreTypes/antlib.html#currentnamespace)

--
build.xml:
-

 
   
   
   
 
   
   
   
   
 


(For ant.1.6.5, you need to add resource="mymapper/antlib.xml"
to the )

   

Peter

On 1/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I have an AntLib for which I wrote a FileNameMapper.
I cant use that mapper from inside the antlib.xml:


antlib.xml
---8-<---8-<---8-<---8-<---8-<---8-<---8-<--
-8-<












---8-<---8-<---8-<---8-<---8-<---8-<---8-<--
-8-<



build.xml
---8-<---8-<---8-<---8-<---8-<---8-<---8-<--
-8-<












---8-<---8-<---8-<---8-<---8-<---8-<---8-<--
-8-<


When running normally I get "ClassNotFoundException"

The following error occurred while executing this line:

jar:file:/C:/ant/rzf/CCM_AntLib/build/antlib_ccm.jar!/org/apache/tools/a
nt/taskdefs/optional/ccm/antlib.xml:180:
  java.lang.ClassNotFoundException:
org.apache.tools.ant.taskdefs.optional.ccm.ReplaceAllMapper

When invoking with -lib that works. But I dont want our developers
always to type "-lib .." or to disrupt the "clean" Ant installation.

Any ideas with that classloader issue? (best on Java1.4+Ant 1.6.5)


Jan


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




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