How To Create a Simple Ant Build File
522479Jul 12 2006 — edited Jul 13 2006Hello,
I am trying to create a simple build.xml, but for some reason JDev will not acknowledge it as a valid ant file. Below is my ant file. How do I tell JDev its a valid ant file? I guess I should say that I am trying to integrate JDev JUnit with Cactus. Here are the steps I have tried thus far:
Right click on project -- select preferences
Click on Ant -- select project build file via browse button.
Select file listed below.
Get error: A valid Ant build file must be specified.
BTW no default Targets are populated in drop down menu.
<project name="incontainer_junit_test" default="main" basedir=".">
<target name="init">
<property environment="env" />
<property name="jdev.home" location="C:/dev/jdev"/>
</target>
<target name="main" depends="build_jar,cactify_war">
<echo> =====================================</echo>
<echo> In Container JUnit Test App Deployed</echo>
<echo> =====================================</echo>
</target>
<target name="build_jar">
<!-- create the war file -->
<war destfile="./discussion-board.war" webxml="public_html/WEB-INF/web.xml">
<fileset dir="public_html/WEB-INF/web.xml">
<exclude name="WEB-INF/web.xml"/>
</fileset>
<lib dir="${jdev.home}/jakarta-struts/lib/*">
</lib>
<classes dir="public_html/WEB-INF/classes"/>
</war>
</target>
<!-- Define the Cactus tasks -->
<!-- If you generate the build.xml file with JDeveloper, all the Cactus files should
already be in the classpath, so there is no need to redefine it
<taskdef resource="cactus.tasks">
<classpath refid="classpath"/>
</taskdef>
-->
<!-- Cactify the web-app archive -->
<target name="cactify_war">
<cactifywar srcfile="./discussion-board.war"
destfile="./cactified-discussion-board.war">
<servletredirector/>
<lib file="C:/dev/software/strutstest/lib/strutstest-2.1.0.jar"/>
</cactifywar>
</target>
</project>
Thanks so much!
etnot