On Thu, 18 Jul 2002, Nolan Ring <[EMAIL PROTECTED]> wrote:
> For each target in my buildfile, however, I want to be able to
> exclude a *different* jar file.
Argh.
> 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>
So you'd do something like
<path id="base.classpath.path">
<pathelement path="${basedir}"/>
<pathelement path="${classesDir}"/>
<fileset dir="${productionLibDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<path id="classpath.data.path">
<fileset dir="${distDir}" >
<exclude name="${data_jarName}" />
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${productionLibDir}" >
<exclude name="${data_jarName}" />
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<path refid="base.classpath.path"/>
</path>
<path id="classpath.path">
<fileset dir="${distDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${libDir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<path refid="base.classpath.path"/>
</path>
i.e. build a basic path that includes all common parts and add
filesets for each target in a different path - finally create a full
classpath for the targets that don't need exceptions.
Ugly, but I cannot think of a better solution ATM.
Stefan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>