ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: dynamically setting path id (name)
Date Fri, 08 Aug 2003 08:59:10 GMT
You seem to be mixing up properties with references.

The path id at (a) will set the reference "project-compile-classpath".

This should be referred to at (b) using  refid="project-compile-classpath"

Peter

On Friday 08 August 2003 09:38, Svetlin Stanchev wrote:
> I suspect this has been discussed before, but could not find a direct
> answer, so here I go:
>
> I have an editable by anybody list of Java projects belonging to certain
> project groups. Thus, I need to compile any or a group of them based on
> the project name/group based on editable (JBuilder) library
> configuration files.
>
> In my compile target I have smth quite straightforward:
>   <target name="compile" depends="init">
>     <!-- checkout current lib config -->
>     <ant dir="${mountpoint.projects}"
>       antfile="extract-libpaths.xml"
>       target="getProjectLibs">
>     </ant>
>     <!-- compile the source -->
>     <javac
>       srcdir="${project.src.dir}"
>       destdir="${project.build.classes.dir}"
>       debug="${project.build.debug}">
>       <classpath refid="${project.name}.compile.classpath"/> <<== (b)
>     </javac>
>    </target>
>
> In extract-libpaths.xml I have:
>
>     <!-- create the compile path -->
>     <property name="project-compile-classpath"
> value="${project.name}.compile.classpath"/>
>     <path id="project-compile-classpath">  <<==  (a)
>       <pathelement path="${pathvalue}"/>
>     </path>
>     <echo>pathvalue: ${pathvalue}</echo>
>     <echo>${project.name} compile classpath:
> ${project-compile-classpath}</echo>
>
> pathvalue is properly set with after parsing the JBuilder lib config
> file, however the property holding the path does not get set:
>      [echo] pathvalue: <a_path_to_a_lib>;<another_path_to_a_lib>;...
>      [echo] <my_project_name> compile classpath:
> <my_project_name>.compile.classpath
>
> So the compile target fails with:
> BUILD FAILED
> file:<my_build_filename>: Reference <my_project_name>.compile.classpath
> not found.
>
> I suspect <path id=/> does not allow references?
> If so, how can I solve my problem?
>
> Thankful for any advice,


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


Mime
View raw message