ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: AW: <import> and <path>s
Date Wed, 06 Oct 2004 12:02:18 GMT
This will cause the annoying
Overriding previous definition of reference to classpath.additional
message.

There is a bug report requesting the reduction of this message to verbose,
perhaps this would be a good thing to do!

Peter
Jan.Materne@rzf.fin-nrw.de wrote:

>yep:
>
>common.xml:
>-----------
>    <property name="prop" value="common"/>
>    <path id="classpath.additional"/>
>    <path id="classpath">
>        <path refid="classpath.additional"/>
>    </path>
>
>build.xml:
>----------
>    <property name="prop" value="specific"/>
>    <import file="../../common.xml"/>
>    <path id="classpath.additional">
>        <pathelement location="../../dist/cli.jar"/>
>    </path>
>
>Other than properties paths will be muted. Therefore the build.xml imports
>the additional
>classpath and overrides it after it (with properties you have to import
>after prop-settings).
>The "classpath.additional" has to defined in the common.xml because its
>references there.
>
>In your tasks you only refer to "classpath".
>
>
>Jan
>
>
>  
>
>>-----Urspr√ľngliche Nachricht-----
>>Von: Stefano Mancarella [mailto:stefano.mancarella@caboto.it]
>>Gesendet am: Mittwoch, 6. Oktober 2004 10:38
>>An: Ant Users List
>>Betreff: <import> and <path>s
>>
>>Is there a way to reuse path definitions when using <import>, 
>>in a way 
>>similar to what you can do with targets?
>>
>>I've a standard path defined in a common build file, which is 
>>good for 
>>almost all my projects.
>>When I need to change it I'm forced to redefine it 
>>completely, even when 
>>it would be better to extend it.
>>
>>Example:
>>
>>common-build.xml:
>>
>><path id="project.classpath">
>>     <pathelement location="${build.classes}"/>
>>     <fileset dir="${lib.dir}" includes="*.jar,*.zip"/>
>></path>
>>
>>build.xml:
>>
>><import file="common-build.xml"/>
>>
>><path id="project.classpath">
>>     <pathelement location="${build.classes}"/>
>>     <fileset dir="${lib.dir}" includes="*.jar,*.zip"/>
>>     <pathelement location="some.dir/some.file"/>
>>     <!-- .... -->
>></path>
>>
>>Is there a way to reuse the path elements specified in the 
>>common build 
>>file?
>>
>>
>>    
>>
>
>  
>


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


Mime
View raw message