ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: pathelement location
Date Thu, 20 Oct 2005 20:11:38 GMT
On 10/20/05, <> wrote:
> To run my main project I currently include all the existing jars using a <fileset
/> and include the classes of the subproject that I have changed and eclipse has compiled
using a <pathelement location="....."/>
> eg.,    <path id="allClassesCP">
>                <path refid="javaJars"/>
>                <pathelement location="C:/ProjectBuilds/${}/build/${project}/classes"
>                <pathelement location="C:/ProjectBuilds/${}/build/${project}/idl"
>                <fileset dir="${mainJarDir}" includes="Foundation.jar"/>
>                <fileset dir="${mainJarDir}" includes="*.jar" excludes="Reports.jar"/>
>                <fileset dir="${mainJarDir}/3rd" includes="*.jar"/>
>        </path>
> ${project} is the subproject. and the 'classes' and 'idl' directories have the route
of classes for that subproject (com/project/...)
> I would like to be able to specify on the ant command line -Dprojects="subproj1, subproj2"
and for the 'classes' and 'idl' directories to be included for each of the specified subprojects.
I have tried using * char in the location path to include any classes: C:/ProjectBuilds/${}/build/*/classes
but no success.
> Any ideas on how to achieve this?

Have you tried:

<path id="allClassesCP">
  <path refid="javaJars"/>

  <dirset dir="C:/ProjectBuilds/${}/build">
    <include name="*/classes" />
    <include name="*/idl" />

  <pathelement location="${mainJarDir}/Foundation.jar"/>
  <fileset dir="${mainJarDir}" includes="*.jar" excludes="Reports.jar"/>
  <fileset dir="${mainJarDir}/3rd" includes="*.jar"/>

You could replace the * by a property called 'project', but you
couldn't specify your "subproj1, subproj2" value. In XSL 2.0 you could
do "(subproj1 | subproj2)/(classes | idl)", but this is not XSL 2.0
;-) --DD

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

View raw message