ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William E. Kempf" <williamke...@hotmail.com>
Subject Re: Building a Classpath
Date Mon, 22 Jul 2002 19:16:06 GMT
----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Monday, July 22, 2002 11:38 AM
Subject: RE: Building a Classpath


> Sound to me that your task should define a Ant 'Path' data type. Have your
> task ask for an 'id' name, and assign that id to the Path it creates
(using
> setId()). After your class as executed, you should be able to refer to
that
> id, as is <classpath refid="myid"/> inside <javac> for example. But maybe
> not, as real Ant committers will likely say soon. --DD

I'm having trouble codifying this.  Here's the basic code I've used to do
what you mention above:

Path path = new Path(getProject(), classpath);
Reference ref = new Reference(id);
path.setRefid(ref);

When I try and use this in an ant script, however, I get the following error
on the line that calls the custom ant task:

file:C:/build/build.xml:284: You must not specify more than one attribute
when using refid
        at
org.apache.tools.ant.types.DataType.tooManyAttributes(DataType.java:1
90)
        at org.apache.tools.ant.types.Path.setRefid(Path.java:174)
        at com.foo.ant.eclipse.ParseClassPath.endDocument(Unknown Source)
        at
org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXPa
rser.java:735)
        at
org.apache.xerces.impl.XMLNamespaceBinder.endDocument(XMLNamespaceBin
der.java:704)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(XMLDTDValidato
r.java:945)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentSc
annerImpl.java:451)
        at
org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.ja
va:1228)
        at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityM
anager.java:3275)
        at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLE
ntityManager.java:2945)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.
dispatch(XMLDocumentScannerImpl.java:1002)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:333)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:524)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:580)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
ava:1108)
        at com.fdr.ant.eclipse.EclipseClassPath.execute(Unknown Source)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 1 second


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message