On Jan 28, 2010, at 12:21 PM, Dan Beaulieu wrote:
I've got a build script that builds multiple components and jars them
up. I currently build a path like so:
<path id="project.class.basepath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${path.to.base}/components">
<include name="*/build/lib/*.jar" />
</fileset>
</path>
And this gets called before every compile target. So every time, its
loading everything in the /lib dir and then scanning all of the
components for jars.
I'd like to just add to this path after I jar each component, So I'd
have:
<jar....>
.
.
</jar>
<path id="project.class.basepath">
<path refid="project.class.basepath"/>
<fileset dir="${path.to.base}/components/${component}">
<include name="*${build.dir}/lib/*.jar" />
</fileset>
</path>
But that doesn't work, with circular dependency failures.
I also tried make a temp path with a different name first, but that
did
not work either with the same message.
My main problem doing it as I currently am, is it's scanning all of
the
components (27 of them) every time for jars, when I really only
want to
add in the last one we just built, and I know when and where we are
doing it so why not there?
Anyway to update a path reference instead of stomping it and
rebuilding
it completely?
I would think the correct way to do this would be to design a task
that would use Ant's built-in facilities to augment a given ref
object with attributes and nested elements, but such is not trivial.
In the meantime you could/should probably script something like this.
HTH,
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org