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

2007-01-10 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

   Summary: java clonevm attribute documentation has duplicated word
   Product: Ant
   Version: 1.7.0
  Platform: Other
OS/Version: other
Status: NEW
  Severity: minor
  Priority: P2
 Component: Documentation
AssignedTo: dev@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


Currently reads:
If set to true 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). since Ant 1.7

Note the duplicated "true"

-- 
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: Maven Ant Task problem when used with Ant 1.7.0

2007-01-10 Thread Kevin Jackson

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

Kev

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



svn commit: r495014 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Mapper.java src/tests/antunit/types/mapper-ref.xml

2007-01-10 Thread mbenson
Author: mbenson
Date: Wed Jan 10 14:34:45 2007
New Revision: 495014

URL: http://svn.apache.org/viewvc?view=rev&rev=495014
Log:
as discussed on dev@, allow  to refer to a FileNameMapper

Added:
ant/core/trunk/src/tests/antunit/types/mapper-ref.xml   (with props)
Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/types/Mapper.java

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=495014&r1=495013&r2=495014
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Jan 10 14:34:45 2007
@@ -55,6 +55,8 @@
 * Show Previous Revision in the tagdiff.xsl stylesheet
   Bugzilla 29143
 
+* Allow  to refer directly to a FileNameMapper instance.
+
 Changes from Ant 1.6.5 to Ant 1.7.0
 ===
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Mapper.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Mapper.java?view=diff&rev=495014&r1=495013&r2=495014
==
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Mapper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Mapper.java Wed Jan 10 
14:34:45 2007
@@ -198,7 +198,18 @@
  */
 public FileNameMapper getImplementation() throws BuildException {
 if (isReference()) {
-return getRef().getImplementation();
+dieOnCircularReference();
+Reference r = getRefid();
+Object o = r.getReferencedObject(getProject());
+if (o instanceof FileNameMapper) {
+return (FileNameMapper) o;
+}
+if (o instanceof Mapper) {
+return ((Mapper) o).getImplementation();
+}
+String od = o == null ? "null" : o.getClass().getName();
+throw new BuildException(od + " at reference '"
++ r.getRefId() + "' is not a valid mapper reference.");
 }
 
 if (type == null && classname == null && container == null) {
@@ -256,6 +267,8 @@
 /**
  * Performs the check for circular references and returns the
  * referenced Mapper.
+ * @deprecated since Ant 1.7.1 because a mapper might ref a
+ * FileNameMapper implementation directly.
  * @return the referenced Mapper
  */
 protected Mapper getRef() {

Added: ant/core/trunk/src/tests/antunit/types/mapper-ref.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/mapper-ref.xml?view=auto&rev=495014
==
--- ant/core/trunk/src/tests/antunit/types/mapper-ref.xml (added)
+++ ant/core/trunk/src/tests/antunit/types/mapper-ref.xml Wed Jan 10 14:34:45 
2007
@@ -0,0 +1,38 @@
+
+
+
+  
+
+  
+
+
+  
+  
+
+  
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+  
+
+

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



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



svn commit: r494970 - /ant/core/trunk/WHATSNEW

2007-01-10 Thread mbenson
Author: mbenson
Date: Wed Jan 10 12:38:55 2007
New Revision: 494970

URL: http://svn.apache.org/viewvc?view=rev&rev=494970
Log:
document null Project reference bug

Modified:
ant/core/trunk/WHATSNEW

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=494970&r1=494969&r2=494970
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Jan 10 12:38:55 2007
@@ -31,6 +31,9 @@
 *  forks properly and so memory settings are picked up.
   Bug report 41280.
 
+* Regression: NPE was thrown when using  against a
+  (third-party instantiated) fileset with null Project reference.
+
 Other changes:
 --
 
@@ -3756,4 +3759,4 @@
 
 * The packagelistloc attribute of 's  child will be
   resolved as a file (i.e. it is either absolute or relative to
-  basedir).
\ No newline at end of file
+  basedir).



-
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-10 Thread Matt Benson

--- Matt Benson <[EMAIL PROTECTED]> wrote:

> --- Peter Reilly <[EMAIL PROTECTED]>
> wrote:
> 
> > It looks like it is some strange stuff with
> > path through the code  that just avoids an NPE in
> > ant.1.6.5.
> [SNIP]
> > I am not sure how to fix this in ant.
> > 
> 
> I've got it.  It is indeed a case of the Maven code
> not having set Project references on their
> artifacts. 
> PITA, but not the end of the world.  The simplified
> pathconvert code triggers the problem.  My simple
> testcase is:
> 
> 
>   
> 
>   
> fs.setProject(null);
>   
> 
>   
> 
> 
> which triggers the NPE in AbstractFileSet.  I am
> testing a fix now.
> 

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.

-Matt

> -Matt
> 
> > Peter
> [SNIP]
> 
> 
>  
>

> Any questions? Get answers on any topic at
> www.Answers.yahoo.com.  Try it now.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



svn commit: r494953 - in /ant/core/trunk/src/main/org/apache/tools/ant/types/resources: BaseResourceCollectionContainer.java BaseResourceCollectionWrapper.java

2007-01-10 Thread mbenson
Author: mbenson
Date: Wed Jan 10 11:48:57 2007
New Revision: 494953

URL: http://svn.apache.org/viewvc?view=rev&rev=494953
Log:
when child resource collection added with null Project, it inherits ours

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java

ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java?view=diff&rev=494953&r1=494952&r2=494953
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 Wed Jan 10 11:48:57 2007
@@ -82,6 +82,12 @@
 if (c == null) {
 return;
 }
+if (Project.getProject(c) == null) {
+Project p = getProject();
+if (p != null) {
+p.setProjectReference(c);
+}
+}
 rc.add(c);
 FailFast.invalidate(this);
 coll = null;

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java?view=diff&rev=494953&r1=494952&r2=494953
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
 Wed Jan 10 11:48:57 2007
@@ -73,6 +73,12 @@
 throw oneNested();
 }
 rc = c;
+if (Project.getProject(rc) == null) {
+Project p = getProject();
+if (p != null) {
+p.setProjectReference(rc);
+}
+}
 setChecked(false);
 }
 



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



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

2007-01-10 Thread mbenson
Author: mbenson
Date: Wed Jan 10 11:46:47 2007
New Revision: 494952

URL: http://svn.apache.org/viewvc?view=rev&rev=494952
Log:
move and publish public static Project getProject(Object)

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

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=494952&r1=494951&r2=494952
==
--- ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Wed Jan 
10 11:46:47 2007
@@ -579,7 +579,7 @@
  */
 public static String getElementName(Project p, Object o, boolean brief) {
 if (p == null) {
-p = getProject(o);
+p = Project.getProject(o);
 }
 return p == null ? getUnmappedElementName(o.getClass(), brief)
 : getComponentHelper(p).getElementName(o, brief);
@@ -591,21 +591,6 @@
 return name.substring(name.lastIndexOf('.') + 1);
 }
 return c.toString();
-}
-
-private static Project getProject(Object o) {
-if (o instanceof ProjectComponent) {
-return ((ProjectComponent) o).getProject();
-}
-try {
-Method m = o.getClass().getMethod("getProject", (Class[]) null);
-if (Project.class == m.getReturnType()) {
-return (Project) m.invoke(o, (Object[]) null);
-}
-} catch (Exception e) {
-//too bad
-}
-return null;
 }
 
 /**

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?view=diff&rev=494952&r1=494951&r2=494952
==
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Wed Jan 10 
11:46:47 2007
@@ -1652,6 +1652,26 @@
 }
 
 /**
+ * Get the Project instance associated with the specified object.
+ * @return Project instance, if any.
+ * @since Ant 1.7.1
+ */
+public static Project getProject(Object o) {
+if (o instanceof ProjectComponent) {
+return ((ProjectComponent) o).getProject();
+}
+try {
+Method m = o.getClass().getMethod("getProject", (Class[]) null);
+if (Project.class == m.getReturnType()) {
+return (Project) m.invoke(o, (Object[]) null);
+}
+} catch (Exception e) {
+//too bad
+}
+return null;
+}
+
+/**
  * Topologically sort a set of targets.  Equivalent to calling
  * topoSort(new String[] {root}, targets, true).
  *



-
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-10 Thread Matt Benson
--- Peter Reilly <[EMAIL PROTECTED]> wrote:

> It looks like it is some strange stuff with
> path through the code  that just avoids an NPE in
> ant.1.6.5.
[SNIP]
> I am not sure how to fix this in ant.
> 

I've got it.  It is indeed a case of the Maven code
not having set Project references on their artifacts. 
PITA, but not the end of the world.  The simplified
pathconvert code triggers the problem.  My simple
testcase is:


  

  
fs.setProject(null);
  

  


which triggers the NPE in AbstractFileSet.  I am
testing a fix now.

-Matt

> Peter
[SNIP]


 

Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.

-
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-10 Thread Peter Reilly

It looks like it is some strange stuff with
path through the code  that just avoids an NPE in ant.1.6.5.

On ant 1.6.5 with the following file and the maven jar in lib,
the first echo works but the second echo fails:


 
   
 
   
 
   
   Here
   
   
   
   
   
 
   
   

   ${echo.dependency.files}   
   ${toString:dependency.files}  
 


I am not sure how to fix this in ant.

Peter


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

Sorry... to go farther down the stacktrace, I should
correct myself:  it appears that the Maven guys don't
set a project on their fileset when they create it, or
something.  So it's a bug for them, but possibly a
regression for Ant after all, if you want to look at
it that way.

-Matt

--- Matt Benson <[EMAIL PROTECTED]> wrote:

> That looks like a bug in the Maven task.  The only
> way
> for an NPE to be triggered here would seem to
> indicate
> the task passed null as the project argument to
> getDirectoryScanner().  Looking at Ant 1.6.5's code
> it
> appears that the same exception would be thrown,
> however, so I am confused how this problem only
> showed
> up with Ant 1.7.0.
>
> -Matt
>
> --- Loic Jay <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have submitted the following problem to the
> Maven
> > mailing list which
> > redirected me to this Ant mailing list.
> >
> > The problem occurs when I use the maven ant task
> > 2.0.4 with Ant 1.7.0.
> > The fileset created by the 
> task
> > raises a
> > NullPointerException when used in the Ant
> >  task.
> >
> > The following code :
> >
> > 
> >  > value="junit"/>
> >  value="junit"/>
> >
> >  > value="3.8.1"/>
> >
> >
> >  > filesetId="dependency.files">
> >  > groupId="${artifact.groupid}"
> > artifactId="${artifact.id}"
> > version="${artifact.version}"/>
>
> >
> > 
> > 
> > 
> > 
> >  > refid="dependency.files"
> > type="fileset"/>
> > 
> > 
> > 
> >  > property="echo.dependency.files"
> > refid="dependency.files"/>
> >
> > Raises the following NullPointerException:
> >
> > java.lang.NullPointerException
> > at
> >
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
> > at
> > org.apache.tools.ant.Task.perform(Task.java:348)
> > 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:1329)
> > at
> >
>
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> > at
> >
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> > at
> >
>
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> > at
> > org.apache.tools.ant.Main.runBuild(Main.java:698)
> > at
> > org.apache.tools.ant.Main.startAnt(Main.java:199)
> > at
> >
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> > at
> >
>
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> > Caused by: java.lang.NullPointerException
> > at
> >
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> > at
> >
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> > at
> >
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> > at
> >
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> > at
> >
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > at
> >
> sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
> > Source)
> > at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at
> > java.lang.reflect.Method.invoke(Method.java:585)
> > at
> >
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> > ... 11 more
> > --- Nested Exception ---
> > java.lang.NullPointerException
> > at
> >
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> > at
> >
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> > at
> >
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> > at
> >
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> > at
> >
>
org.apache.tools.ant.UnknownElement.execute(U

Re: Maven Ant Task problem when used with Ant 1.7.0

2007-01-10 Thread Matt Benson
Sorry... to go farther down the stacktrace, I should
correct myself:  it appears that the Maven guys don't
set a project on their fileset when they create it, or
something.  So it's a bug for them, but possibly a
regression for Ant after all, if you want to look at
it that way.

-Matt

--- Matt Benson <[EMAIL PROTECTED]> wrote:

> That looks like a bug in the Maven task.  The only
> way
> for an NPE to be triggered here would seem to
> indicate
> the task passed null as the project argument to
> getDirectoryScanner().  Looking at Ant 1.6.5's code
> it
> appears that the same exception would be thrown,
> however, so I am confused how this problem only
> showed
> up with Ant 1.7.0.
> 
> -Matt
> 
> --- Loic Jay <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> > 
> > I have submitted the following problem to the
> Maven
> > mailing list which 
> > redirected me to this Ant mailing list.
> > 
> > The problem occurs when I use the maven ant task
> > 2.0.4 with Ant 1.7.0.
> > The fileset created by the 
> task
> > raises a 
> > NullPointerException when used in the Ant
> >  task.
> > 
> > The following code :
> > 
> > 
> >  > value="junit"/>
> >  value="junit"/>
> >   
> >  > value="3.8.1"/>
> > 
> >
> >  > filesetId="dependency.files">
> >  > groupId="${artifact.groupid}"
> > artifactId="${artifact.id}"
> > version="${artifact.version}"/>   
>  
> >  
> >   
> > 
> > 
> > 
> >  > refid="dependency.files" 
> > type="fileset"/>
> > 
> > 
> > 
> >  > property="echo.dependency.files" 
> > refid="dependency.files"/>
> > 
> > Raises the following NullPointerException:
> > 
> > java.lang.NullPointerException
> > at 
> >
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
> > at
> > org.apache.tools.ant.Task.perform(Task.java:348)
> > 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:1329)
> > at
> >
>
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> > at 
> >
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> > at
> >
>
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> > at
> > org.apache.tools.ant.Main.runBuild(Main.java:698)
> > at
> > org.apache.tools.ant.Main.startAnt(Main.java:199)
> > at
> >
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> > at
> >
>
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> > Caused by: java.lang.NullPointerException
> > at 
> >
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> > at 
> >
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> > at
> >
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> > at 
> >
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> > at 
> >
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> > at 
> >
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > at
> >
> sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
> > Source)
> > at 
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at
> > java.lang.reflect.Method.invoke(Method.java:585)
> > at 
> >
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> > ... 11 more
> > --- Nested Exception ---
> > java.lang.NullPointerException
> > at 
> >
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> > at 
> >
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> > at
> >
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> > at 
> >
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> > at
> >
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> > at 
> >
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> > at 
> >
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > at
> >
> sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
> > Source)
> > at 
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at
> > java.lang.reflect.Method.invoke(Method.java:585)
> > at 
> >
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> >  

Re: Maven Ant Task problem when used with Ant 1.7.0

2007-01-10 Thread Matt Benson
That looks like a bug in the Maven task.  The only way
for an NPE to be triggered here would seem to indicate
the task passed null as the project argument to
getDirectoryScanner().  Looking at Ant 1.6.5's code it
appears that the same exception would be thrown,
however, so I am confused how this problem only showed
up with Ant 1.7.0.

-Matt

--- Loic Jay <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have submitted the following problem to the Maven
> mailing list which 
> redirected me to this Ant mailing list.
> 
> The problem occurs when I use the maven ant task
> 2.0.4 with Ant 1.7.0.
> The fileset created by the  task
> raises a 
> NullPointerException when used in the Ant
>  task.
> 
> The following code :
> 
> 
>  value="junit"/>
> 
>   
>  value="3.8.1"/>
> 
>
>  filesetId="dependency.files">
>  groupId="${artifact.groupid}"
> artifactId="${artifact.id}"
> version="${artifact.version}"/> 
>  
>   
> 
> 
> 
>  refid="dependency.files" 
> type="fileset"/>
> 
> 
> 
>  property="echo.dependency.files" 
> refid="dependency.files"/>
> 
> Raises the following NullPointerException:
> 
> java.lang.NullPointerException
> at 
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
> at
> org.apache.tools.ant.Task.perform(Task.java:348)
> 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:1329)
> at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> at 
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at
>
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> at
> org.apache.tools.ant.Main.runBuild(Main.java:698)
> at
> org.apache.tools.ant.Main.startAnt(Main.java:199)
> at
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> at
>
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: java.lang.NullPointerException
> at 
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> at 
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> at
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> at 
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> at
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> at 
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> at 
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at
> sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
> Source)
> at 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> java.lang.reflect.Method.invoke(Method.java:585)
> at 
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> ... 11 more
> --- Nested Exception ---
> java.lang.NullPointerException
> at 
>
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
> at 
>
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)
> at
>
org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
> at 
>
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
> at
>
org.apache.tools.ant.types.resources.Union.list(Union.java:67)
> at 
>
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
> at 
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at
> sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
> Source)
> at 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> java.lang.reflect.Method.invoke(Method.java:585)
> at 
>
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> at
> org.apache.tools.ant.Task.perform(Task.java:348)
> 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:1329)
> at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> at 
>
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at
>
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> at
> org.apache.tools.ant.Main.runBuild(Main.java:698)
> at
> org.apache.tools.ant.Main.startAnt(Main.java:199)
> at
>
org.ap

Maven Ant Task problem when used with Ant 1.7.0

2007-01-10 Thread Loic Jay

Hi,

I have submitted the following problem to the Maven mailing list which 
redirected me to this Ant mailing list.


The problem occurs when I use the maven ant task 2.0.4 with Ant 1.7.0.
The fileset created by the  task raises a 
NullPointerException when used in the Ant  task.


The following code :

   

   
  
   


  
   
  version="${artifact.version}"/>   
  
   
   

   
   type="fileset"/>

   
   
   
   refid="dependency.files"/>


Raises the following NullPointerException:

java.lang.NullPointerException
   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)

   at org.apache.tools.ant.Task.perform(Task.java:348)
   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:1329)

   at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
   at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

   at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
   at org.apache.tools.ant.Main.runBuild(Main.java:698)
   at org.apache.tools.ant.Main.startAnt(Main.java:199)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NullPointerException
   at 
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
   at 
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)

   at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
   at 
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)

   at org.apache.tools.ant.types.resources.Union.list(Union.java:67)
   at 
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
   at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

   at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)

   ... 11 more
--- Nested Exception ---
java.lang.NullPointerException
   at 
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464)
   at 
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430)

   at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
   at 
org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)

   at org.apache.tools.ant.types.resources.Union.list(Union.java:67)
   at 
org.apache.tools.ant.taskdefs.PathConvert.execute(PathConvert.java:339)
   at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

   at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)

   at org.apache.tools.ant.Task.perform(Task.java:348)
   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:1329)

   at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
   at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

   at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
   at org.apache.tools.ant.Main.runBuild(Main.java:698)
   at org.apache.tools.ant.Main.startAnt(Main.java:199)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Any idea if this is an incompatibility introduced with Ant 1.7.0 ?

Thanks

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



In AntLib defined type not accessible

2007-01-10 Thread Jan.Materne
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]



svn commit: r494794 - /ant/core/trunk/docs/manual/CoreTypes/mapper.html

2007-01-10 Thread jhm
Author: jhm
Date: Wed Jan 10 04:12:44 2007
New Revision: 494794

URL: http://svn.apache.org/viewvc?view=rev&rev=494794
Log:
Add separators between the mappers for easier reading of the source code. (Like 
it was before Script Mapper and Filter Mapper).

Modified:
ant/core/trunk/docs/manual/CoreTypes/mapper.html

Modified: ant/core/trunk/docs/manual/CoreTypes/mapper.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTypes/mapper.html?view=diff&rev=494794&r1=494793&r2=494794
==
--- ant/core/trunk/docs/manual/CoreTypes/mapper.html (original)
+++ ant/core/trunk/docs/manual/CoreTypes/mapper.html Wed Jan 10 04:12:44 2007
@@ -109,6 +109,11 @@
   the generally available to and from.
   The  usage
   form remains valid for reasons of backward compatibility.
+
+
+
+
+
 identity
 The target file name is identical to the source file name. Both
 to and from will be ignored.
@@ -139,6 +144,11 @@
 Classes/dir/dir2/A.properties
   
 
+
+
+
+
+
 flatten
 The target file name is identical to the source file name, with all
 leading directory information stripped off. Both to and
@@ -170,6 +180,11 @@
 A.properties
   
 
+
+
+
+
+
 merge
 The target file name will always be the same, as defined by
 to - from will be ignored.
@@ -200,6 +215,11 @@
 archive.tar
   
 
+
+
+
+
+
 glob
 Both to and from define patterns that may
 contain at most one *. For each source file that matches
@@ -324,6 +344,11 @@
   will output "x is f/j.java".
 
 
+
+
+
+
+
 regexp
 Both to and from define regular
 expressions. If the source file name matches the from
@@ -535,6 +560,11 @@
 
   will set hd.prop to "f\j.java".
 
+
+
+
+
+
 package
 Sharing the same syntax as the glob mapper,
 the package mapper replaces
@@ -560,6 +590,11 @@
 ignored
   
 
+
+
+
+
+
 unpackage (since Ant 1.6.0)
   This mapper is the inverse of the package 
mapper.
 It replaces the dots in a package name with directory separators. This
@@ -582,6 +617,11 @@
 ${test.src.dir}/org/acme/AcmeTest.java
   
 
+
+
+
+
+
 composite (since Ant 1.6.2)
   This mapper implementation can contain multiple nested mappers.
 File mapping is performed by passing the source filename to each nested
@@ -610,6 +650,11 @@
   The composite mapper has no corresponding
  attribute.
   
+
+
+
+
+
 chained (since Ant 1.6.2)
   This mapper implementation can contain multiple nested mappers.
 File mapping is performed by passing the source filename to the first



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



svn commit: r494793 - /ant/core/trunk/docs/manual/CoreTypes/mapper.html

2007-01-10 Thread jhm
Author: jhm
Date: Wed Jan 10 04:08:28 2007
New Revision: 494793

URL: http://svn.apache.org/viewvc?view=rev&rev=494793
Log:
Use the style like on the other examples.

Modified:
ant/core/trunk/docs/manual/CoreTypes/mapper.html

Modified: ant/core/trunk/docs/manual/CoreTypes/mapper.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTypes/mapper.html?view=diff&rev=494793&r1=494792&r2=494793
==
--- ant/core/trunk/docs/manual/CoreTypes/mapper.html (original)
+++ ant/core/trunk/docs/manual/CoreTypes/mapper.html Wed Jan 10 04:08:28 2007
@@ -788,8 +788,11 @@
 Target file names
   
   
-foo\bar\A.java
-FOO\BAR\A.JAVA foo\bar\a.java
+foo\bar\A.java
+FOO\BAR\A.JAVA
+  
+  
+foo\bar\a.java
   
 
 
@@ -811,7 +814,7 @@
   
 
 
-  self
+  self
   
 the scriptmapper itself
   



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