ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@goodconsultants.com
Subject Re: multiple selection of classpath??
Date Mon, 15 Dec 2003 19:12:14 GMT
Antonine,

What should be the content of the init.tomcat? I think I am trying to do the 
same thing like you said but the classpath defined in init.tomcat does not 
seem to recongised in other parts of build.xml... Please see the other email 
for detail codes.

Thanks

BArry

Quoting Antoine Lévy-Lambert <antoine@antbuild.com>:

> barry@goodconsultants.com wrote:
> 
> >All,
> >
> >1. How can I select multiple classpath? I would like to be able NOT to
> define 
> >CATALINA_HOME for tomcat if not compiling things for tomcat, and just use 
> >J2EE... 
> >
> >  
> >
> the normal ant way is then to define one different init target for each 
> variant of your build or deployment.
> 
> <target name="init.tomcat" if="on.tomcat">
>    some action here
> </target>
> <target name="init.j2ee" depends="on.j2ee">
>    some action here
> </target>
> <target name="build" depends="init.tomcat,init.j2ee">
>   some action here
> </target>
> 
> then if you do :
> 
> ant -D"on.tomcat=true" build
> 
> you are going to execute the init.tomcat and build targets. The 
> init.j2ee target will then not be executed, because on.j2ee is not defined.
> 
> ant -D"on.j2ee=true" build
> 
> will make you execute init.j2ee and build
> 
> 
> >2. Can I define the followings in properties file?
> >
> ><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>
> >
> >
> >
> >Thanks
> >
> >Barry
> >
> >
> >
> >
> >  
> >
> the build file snippet above is too complicated for a property file. In 
> ant 1.6, you can save this snippet as a separate xml file and use the 
> <import/> task to use this in several other build files.
> 
> Hopes this helps,
> 
> Antoine
> 
> Antoine
> 
> ---------------------------------------------------------------------
> 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