ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Petterson (KI/EAB)" <mikael.petter...@ericsson.com>
Subject RE: import classpath
Date Thu, 15 Jul 2004 10:49:43 GMT
Hi,

Thanks for the hint. However since the 'compile' target is present in the common.xml
the path in prog( with add value) is not present in compile, inherited from common.

BR

//Mikael 

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: den 14 juli 2004 13:35
To: user@ant.apache.org
Subject: AW: import classpath


Played a little bit:

<project name="prog">
    <import file="common.xml"/>

    <path id="add">
        <fileset dir=".." includes="*.log"/>
    </path>

    <property name="v" refid="path"/>
    <echo>path: ${v}</echo>
</project>

<project name="common">
  <path id="path">
      <fileset dir="."/>
      <path refid="add"/>
  </path>

  <path id="add"/>
</project>

If 'prog' defines a path id=add, the path id=path will include that (and the
common.add will be
overwritten - see log message) otherwise the (empty) common.add will be
used.


Jan





> -----Urspr√ľngliche Nachricht-----
> Von: Mikael Petterson (KI/EAB) [mailto:mikael.petterson@ericsson.com]
> Gesendet am: Mittwoch, 14. Juli 2004 13:21
> An: 'user@ant.apache.org'
> Betreff: import classpath
> 
> Hi,
> 
> I am restructuring my build.xml structure using a common.xml 
> with generic targets ( thanks for all the hints I got).
> I got stuc with the following problem. In my common.xml 
> 'compile' target use a common classpath ( plattform for all 
> my products) but
> for each product I want to add classes, to classpath, that is 
> specific. How can I do this?
> 
> All hints very much welcome!!!
> 
> //Mikael 
> 
> Part of common.xml
> ===============
> 
> <path id="common.classpath">
>         <pathelement location="${CELLO.DIR}/${CMA.JAR}"/>
> 	<pathelement location="${CELLO.DIR}/${FOUNDATION.JAR}"/>
> 	<pathelement location="${CELLO.DIR}/${OMS.JAR}"/>
>         <pathelement location="${CELLO.DIR}/${OMS.JAR}"/>
>      </path>
> 
> <target depends="init" name="compile">
>         <!-- Both srcdir and destdir should be package roots. -->
>        	 <javac debug="true" deprecation="true" 
> destdir="${dest.dir}" srcdir="${src.dir}">
> 	 <classpath refid="common.classpath"/>
> 	</javac>
>    </target>
> 
> Example of tester.xml
> ================
> <project name="tester" default="compile"> 
> <import file="common.xml">
> 
> </project> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message