"Erskine, Chris" <[EMAIL PROTECTED]> writes:

> That starts to solve the issue of the external ext directory although it
> does make it a little more work for the users to set up ant on their
> machine.  (Did you remember to go to your environment control and add the
> ANT_ARGS value?).
> 
> This does not handle the case (poor because I know that JUnit has not
> changed for a while) where all my projects depend on JUnit.  I have a new
> version which breaks all of the old code.  This means that each of 30 (or
> what ever number you want) projects have to modify their test code to
> support the new version of JUnit.  Because of the ant-junit.jar being on the
> system level for Ant, I have to put the JUnit.jar file in a system level
> directory.  This means that I have to now come up with a method to know
> which project has the code for the new version of JUnit and have some sort
> of special command to start Ant for that project to point to the new version
> of JUnit.
>
> What I am asking for is a way to define in my build.xml file a way to define
> which version of JUnit that I am using so that it is defined at the project
> level.  I can handle this type of functionality for build level classes but
> doing this for the system level does not work.

Could you do this with:

   <property file="project_settings.properties"/>
   <property file="company_wide_settings.properties"/>
   <property name="junit.version" value="${JUNIT.PROJECT.VERSION}"/>

   <set classpath appropriately>

And then have all versions of junit in use in your ant../lib dir:

c:/[blah]/apache-ant-1.6.2/lib/junit-v1.jar
c:/[blah]/apache-ant-1.6.2/lib/junit-v2.jar

<FILE:project_settings.properties>
JUNIT.PROJECT.VERSION=v1
</FILE:project_settings.properties>

<FILE:company_wide_settings.properties>
JUNIT.PROJECT.VERSION=v2
</FILE:company_wide_settings.properties>

-- 
Galen Boyer



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to