[EMAIL PROTECTED] wrote:

All,

In one single build.xml, how can I select different set of classpaths? for Tomcat and for other apps?

I try to do the followings:

<target name="tomcat" if="system.CATALINA_HOME">

       <antcall target="clean"/>
       <antcall target="init-tomcat"/>
       <antcall target="compile-newserver"/>
       <antcall target="dist-tomcat"/>
       <antcall target="deploy-tomcat"/>

</target>

In the init-tomcat target, I have the followings:

<target name="init-tomcat">

<echo message="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>

Unfortunately, it does not work setting classpath like this... Any advice?

Thanks

Barry




ur target above init-tomcat creates a piece of data with id "compile.classpath". But then you need to reference your classpath, for instance in <javac>

<javac classpathref="compile.classpath" ...>
<!-- other nested elements -->
</javac>

will work.

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to