You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ba...@goodconsultants.com on 2003/12/15 21:00:21 UTC
Can I append classpath variable through multiple targets?
Hi all,
Can I append classpath variable through multiple targets? Please check the
following codes...
<target name="classpath-general">
<echo message="classpath-general in here!"/>
<path id="compile.classpath">
<pathelement location="${j2eeBase}/lib/j2ee.jar"/>
</path>
</target>
<target name="classpath-tomcat" >
<echo message="classpath-tomcat: CATALINA_HOME is
${system.CATALINA_HOME}"/>
<path id="compile.classpath">
<pathelement location="${catalina.home}/common/classes"/>
<fileset dir="${catalina.home}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/shared/classes"/>
<fileset dir="${catalina.home}/shared/lib">
<include name="*.jar"/>
</fileset>
</path>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Can I append classpath variable through multiple targets?
Posted by ba...@goodconsultants.com.
When executing this i have the following output... Is that mean the path has
not bee appended?
classpath-general:
[echo] classpath-general in here!
Overriding previous definition of reference to compile.classpath
classpath-tomcat:
[echo] classpath-tomcat: CATALINA_HOME is /home/barry/thirdparty/tomcat
Overriding previous definition of reference to compile.classpath
Thanks
Barry
Quoting barry@goodconsultants.com:
> Hi all,
>
> Can I append classpath variable through multiple targets? Please check the
> following codes...
>
> <target name="classpath-general">
>
> <echo message="classpath-general in here!"/>
>
> <path id="compile.classpath">
>
> <pathelement location="${j2eeBase}/lib/j2ee.jar"/>
>
> </path>
>
> </target>
>
>
> <target name="classpath-tomcat" >
>
> <echo message="classpath-tomcat: CATALINA_HOME is
> ${system.CATALINA_HOME}"/>
>
> <path id="compile.classpath">
> <pathelement location="${catalina.home}/common/classes"/>
> <fileset dir="${catalina.home}/common/endorsed">
> <include name="*.jar"/>
> </fileset>
>
> <fileset dir="${catalina.home}/common/lib">
> <include name="*.jar"/>
> </fileset>
>
> <pathelement location="${catalina.home}/shared/classes"/>
> <fileset dir="${catalina.home}/shared/lib">
> <include name="*.jar"/>
> </fileset>
>
> </path>
>
>
> </target>
>
>
>
> ---------------------------------------------------------------------
> 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