You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christian Eitner <Ch...@cern.ch> on 2003/07/03 19:29:21 UTC

Global path w/ refid and property file

Hello!

I have something like:

<project ...>

	<path id = "project.classpath">
		<pathelement path = "${binDestDir}/"/>
		<pathelement location = "${junitLib}"/>
	</path>
																							
	<target name = "Build something">
		<property file = "build.properties"/>
		<antcall target = "Echo properties"/>
		<javac ...>
			<classpath refid = "project.classpath"/>
		</javac>
	</target>

	<target name = "Echo properties">
		<property name = "projectClasspath" refid = "project.classpath"/>
		<echo>
			${projectClasspath}
		</echo>
	</target>

</project>

   The `Echo properties' task echoes the classpath with all jars and paths as specified (as one string with separators), with locations taken from build.properties and expanded afterwards, but the javac tasks says

dropping ${binDestDir} from path as it doesn't exist
dropping ${junitLib} from path as it doesn't exist

which looks like something went wrong with the expansion (only my guess).

   Any hints, anybody?

	 Thanks for your consideration,

	 Christian

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


Re: Global path w/ refid and property file

Posted by Christian Eitner <Ch...@cern.ch>.
Hi list, hi Peter,

Thanks, that unveils the mystery.

   Christian

On Thu, Jul 03, 2003 at 06:40:03PM +0100, peter reilly wrote:
> You should place the <property file="build.properties">
> before the <path id="/>
> 
> The reason the echo properties worked is that the
> a new project was created by <antcall> and in this
> project <path id ="/> got called again, but this
> time the properties had been set.
> 
> Peter

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


Re: Global path w/ refid and property file

Posted by peter reilly <pe...@corvil.com>.
You should place the <property file="build.properties">
before the <path id="/>

The reason the echo properties worked is that the
a new project was created by <antcall> and in this
project <path id ="/> got called again, but this
time the properties had been set.

Peter

On Thu, 2003-07-03 at 18:29, Christian Eitner wrote:
> Hello!
> 
> I have something like:
> 
> <project ...>
> 
> 	<path id = "project.classpath">
> 		<pathelement path = "${binDestDir}/"/>
> 		<pathelement location = "${junitLib}"/>
> 	</path>
> 																							
> 	<target name = "Build something">
> 		<property file = "build.properties"/>
> 		<antcall target = "Echo properties"/>
> 		<javac ...>
> 			<classpath refid = "project.classpath"/>
> 		</javac>
> 	</target>
> 
> 	<target name = "Echo properties">
> 		<property name = "projectClasspath" refid = "project.classpath"/>
> 		<echo>
> 			${projectClasspath}
> 		</echo>
> 	</target>
> 
> </project>
> 
>    The `Echo properties' task echoes the classpath with all jars and paths as specified (as one string with separators), with locations taken from build.properties and expanded afterwards, but the javac tasks says
> 
> dropping ${binDestDir} from path as it doesn't exist
> dropping ${junitLib} from path as it doesn't exist
> 
> which looks like something went wrong with the expansion (only my guess).
> 
>    Any hints, anybody?
> 
> 	 Thanks for your consideration,
> 
> 	 Christian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


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