You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Mark D. Hansen" <m....@verizon.net> on 2005/01/05 14:52:54 UTC

multiple classpaths / subprojects

Is there a "standard method" for running a sub-project using a different classpath than the master project is using?

For example, if you invoke ant using:

ant -f foo-build.xml -lib foo-classpath foo

on the following foo-build.xml:

<target name="foo">

  <do some stuff ...>

  <ant antfile="bar-build.xml" target="bar">
	?? <lib path="bar-classpath"/> ??
  </ant>

</target>

Does the "ant" task invoked inside target "foo" have to inherit the classpath specified when ant was originally invoked?

The reason that this comes up is that I need to build different parts of my system using different implementations of the same APIs (e.g., JAXP, JAX-RPC).

Perhaps the only way to do this is to build the sub-project using <exec ...> or forking  <java ..> task that invokes a new instance of ant with the new classpath.  The problem with that approach is that I'd like to have the sub-project inherit the properties of the master project.

Thanks for the help.

-- Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org