FAQ
Hi I am having trouble with the Ant build file which I am using in my
program. I am not able to copy the JAR files which are being generated in
the workspace to the deploy folder of jboss. Please let me know what changes
should I do. Here is the build file.

<project name="Sensor EJB" default="jar" basedir=".">

<target name="init">
<property name="src.dir" value="${basedir}/src" />
<property name="classes.dir" value="${basedir}/classes" />
<property name="jboss.home" value="C:\jboss-4.2.3.GA" />
<property name="out.dir" value="${basedir}/build" />
<property name="jboss.deploy" value="${jboss.home}/server/default/deploy"
/>
</target>

<target name="build" depends="init">
<mkdir dir="${classes.dir}" />
<mkdir dir="${out.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}">
<classpath>
<fileset dir="${jboss.home}/client">
<include name="**/*.jar" />
</fileset>
<pathelement location="${classes.dir}" />
</classpath>
</javac>
</target>

<target name="clean" depends="init">
<delete dir="${classes.dir}" quiet="true" />
<delete dir="${out.dir}" quiet="true" />
</target>

<target name="deploy" depends="clean,jar">
<copy file="${out.dir}/sensorDemo.jar" toDir="${jboss.deploy}" />
</target>

<target name="jar" depends="build">
<mkdir dir="${out.dir}/ejb-jar/META-INF" />
<mkdir dir="${out.dir}/ejb-jar/lib" />

<copy file="${basedir}/conf/persistence.xml"
toDir="${out.dir}/ejb-jar/META-INF" />

<copy toDir="${out.dir}/ejb-jar">
<fileset dir="${classes.dir}">
<include name="**/Sensor/data/**" />
<include name="**/Sensor/ejb/**" />
</fileset>
</copy>

<jar destfile="${out.dir}/sensorDemo.jar">
<fileset dir="${out.dir}/ejb-jar">
<include name="**/*" />
</fileset>
</jar>

<jar destfile="${out.dir}/sensor-clt.jar">
<fileset dir="${classes.dir}">
<include name="**/Sensor/ejb/**" />
<exclude name="**/Sensor/ejb/*EJB*" />
<include name="**/Sensor/client/*.class" />
<include name="**/Sensor/data/**" />
</fileset>
</jar>
</target>

<target name="run-once" depends="jar">
<java classname="src.HEMS.Sensor.client.FakeTest">
<classpath>
<pathelement location="${jboss.home}/client/commons-logging.jar" />
<pathelement location="${jboss.home}/client/jbossall-client.jar" />
<pathelement location="${jboss.home}/client/ejb3-persistence.jar" />
<pathelement location="${out.dir}/sensor-clt.jar" />
</classpath>
</java>
</target>

</project>

http://www.nabble.com/file/p25619778/stateful-build.xml stateful-build.xml
--
View this message in context: http://www.nabble.com/Need-Help-urgent-tp25619778p25619778.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 6 | next ›
Discussion Overview
groupuser @
categoriesant
postedSep 25, '09 at 9:48p
activeSep 26, '09 at 5:32a
posts6
users3
websiteant.apache.org

People

Translate

site design / logo © 2022 Grokbase