Thanks for your quick response.
I'm not quite sure I understand what you're suggesting. I have a couple of
directories with many jar files in them - the generic classpath
(classpath.path) includes all jar files in the ${distDir} and
${productionLibDir} directories using a **/*.jar. For each target in my
buildfile, however, I want to be able to exclude a *different* jar file.
So, the expanded version of what I sent previously would be something like:
<path id="classpath.path">
<pathelement path="${basedir}"/>
<pathelement path="${classesDir}"/>
<fileset dir="${distDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${libDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${productionLibDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<path id="classpath.data.path">
<fileset dir="${distDir}" >
<exclude name="${data_jarName}" />
</fileset>
<fileset dir="${productionLibDir}" >
<exclude name="${data_jarName}" />
</fileset>
<path refid="classpath.path"/>
</path>
<path id="classpath.util.path">
<fileset dir="${distDir}" >
<exclude name="${util_jarName}" />
</fileset>
<fileset dir="${productionLibDir}" >
<exclude name="${util_jarName}" />
</fileset>
<path refid="classpath.path"/>
</path>
<path id="classpath.service.path">
<fileset dir="${distDir}" >
<exclude name="${service_jarName}" />
</fileset>
<fileset dir="${productionLibDir}" >
<exclude name="${service_jarName}" />
</fileset>
<path refid="classpath.path"/>
</path>
Does that make sense? Am I missing something?
Nolan
-----Original Message-----
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 9:26 AM
To: [EMAIL PROTECTED]
Subject: Re: is there any way to modify a classpath that referenced with
refid ?
On Thu, 18 Jul 2002, Nolan Ring <[EMAIL PROTECTED]> wrote:
> I've defined a classpath and assigned it the id "classpath.path" ;
> it's a path that I want to use throughout my buildfile with very
> minor modifications. What I want to do is exclude a particular jar
> file that would otherwise be included because of the wildcards in
> the original definition.
And you can build compound <path>s:
<path id="path-without-the-jar">
...
</path>
<path id="with-the-jar">
<path refid="path-without-the-jar" />
<fileset ...>
</path>
and use the first path whenever you want to exclude the extra jar and
the second one where you need it.
Stefan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>