ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carpenter, James" <>
Subject Trouble writting Ant task that sets a path reference
Date Tue, 23 Dec 2003 00:27:40 GMT
I am trying to create a custom ant task that sets up a classpath reference based on its arguments.
 My problem is I am not sure how a custom task interacts with references.  My task is responsible
for creating a reference rather than consuming them as is probably more typical.  Can anyone

Do I simply take the classpathid as a java.lang.String and then call the's
"public void addReference(String name, Object value)" method?  (I didn't know about this when
I wrote the rest of the posting.)

An example usage is shown below.  The desired result is that subproject.classpath will contain
a path reference that can be used in a compile task.  Each nested subproject element will
result in one or more jar files being added to the subproject.classpath path reference.

The guts of the task will involve looking in several areas for the desired jars and providing
deprication warnings as appropriate when there is a newer version of the internal library
than is currently being used by a subproject of the overall build.  If the subprojectlibdir/category
directory exists for a given nested subproject element, the jars for that subproject will
be taken from that directory.  If the subprojectdir/category directory for a given nested
subproject element doesn't exist then a standard directory containing internal releases for
each subproject (releasedir) will be searched for a category/desiredversion directory.  In
this event any category/someversion directories indicating a newer internal release (based
on the naming convention for the someversion directories) will result in a deprication warning.
 The deprication warnings are non-fatal and are simply intended to urge developers to move
to the newest version of any internal libraries.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message