Re: [Embedlets-dev] [outhouse] ant build script
Status: Alpha
Brought to you by:
tkosan
|
From: Nicola K. B. <nic...@ap...> - 2003-03-07 07:54:57
|
Ted Kosan wrote, On 07/03/2003 8.04: > Topic tags:[ARCH][JAPL][WIRING][DOCS][MGMT][STRATEGY][NEWBIE] > _______________________________________________ > > Andrzej, > > If a person is only interested in deploying outhouse on a TINI right now what > would be the proper way to configure outhouse's build.xml file so that the > build process would not fail because the com.ajile.tools.ant.JemBuilderTask > could not be found? > > When I comment out the following taskdef line in the build.xml file I can run > most of the tasks: > > <taskdef name="JEMBuilder" classname="com.ajile.tools.ant.JemBuilderTask"/> > > but with it in not even the 'help' task will run. So, commenting out this line > works but is there a way to set up the build.xml file so that one does not need > to comment it out? Try this: Use this to see if the class is there: http://ant.apache.org/manual/CoreTasks/available.html Then put the taskdef in a target, call that, and put an if="" attribute on that target to make it conditional. Off the top of my head: <!-- set have.JEMBuilder==true if the class is present--> <available property="have.JEMBuilder" classname="com.ajile.tools.ant.JemBuilderTask"> <classpath> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </classpath> </available> <antcall target="load.JEMBuilder"> ... and make: <target name="load.JEMBuilder" if="have.JEMBuilder"> <taskdef name="JEMBuilder" classname="com.ajile.tools.ant.JemBuilderTask"/> </target> -- Nicola Ken Barozzi nic...@ap... - verba volant, scripta manent - (discussions get forgotten, just code remains) --------------------------------------------------------------------- |