3
0
Fork 0
old-foei/build/build-jca.xml

122 lines
4.3 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project name="foei-jca" default="deploy" basedir=".././">
<property file="build/build.properties"/>
<path id="classpath">
<fileset dir="${jboss.home}/server/${jboss.server}/lib" includes="*.jar"/>
</path>
<!-- Builds JCA application -->
<target name="build">
<mkdir dir="bin"/>
<javac srcdir="src" destdir="bin" classpathref="classpath"/>
<antcall target="build.${server.name}"/>
<!--
<jar destfile="dd.war">
<zipfileset dir="bin" prefix="WEB-INF/classes" includes="**/web/*.class"/>
<zipfileset dir="web" excludes="WEB-INF/*-web.xml"/>
<zipfileset dir="web" includes="WEB-INF/${server.name}-web.xml"/>
</jar>
-->
</target>
<target name="doBuildBinJar">
<jar destfile="idcanet-foei-bin.jar" basedir="bin" includes="**">
</jar>
</target>
<!-- Packs JBoss version of the resource adapter module -->
<target name="build.jboss">
<jar destfile="foei-ra.rar">
<zipfileset dir="bin" includes="com/idcanet/foei/ee/jca/**/*.class"/>
<zipfileset dir="meta/jboss" prefix="META-INF" includes="ra.xml"/>
</jar>
<jar destfile="bin/foei-ra.jar">
<zipfileset dir="bin" includes="com/idcanet/foei/ee/jca/**/*.class"/>
</jar>
</target>
<!-- Packs Geronimo version of the resource adapter module -->
<target name="build.geronimo">
<jar destfile="bin/foei-ra.jar">
<zipfileset dir="bin" includes="com/idcanet/foei/ee/jca/**/*.class"/>
</jar>
<jar destfile="foei-ra.rar">
<zipfileset dir="bin" includes="foei-ra.jar"/>
<zipfileset dir="meta/geronimo" prefix="META-INF" includes="ra.xml"/>
</jar>
</target>
<!--
Deploys (or redeploys) the application on the currently selected
server
-->
<target name="deploy" depends="build,doBuildBinJar">
<antcall target="deploy.${server.name}"/>
</target>
<!--
Deploys (or redeploys) the application on JBoss. If the server is
started the application will be installed and started on the fly.
The JBoss version of the application must be previously built
and located in the current folder.
-->
<target name="deploy.jboss">
<copy todir="${jboss.home}/server/${jboss.server}/deploy" file="meta/jboss/foei-ds.xml"/>
<copy todir="${jboss.home}/server/${jboss.server}/deploy" file="foei-ra.rar"/>
<copy todir="${jboss.home}/server/${jboss.server}/lib" file="idcanet-foei-bin.jar"/>
<!-- <copy todir="${jboss.home}/server/${jboss.server}/deploy" file="jca.war"/> -->
</target>
<!--
Deploys (or redeploys) the application on Geronimo. The server
should be started.
The Geronimo version of the application must be previously built
and located in the current folder.
-->
<target name="deploy.geronimo">
<java jar="${geronimo.home}/bin/deployer.jar" fork="true">
<arg value="--user"/>
<arg value="${geronimo.user}"/>
<arg value="--password"/>
<arg value="${geronimo.password}"/>
<arg value="undeploy"/>
<arg value="com/ibm/j2g/jca.war"/>
</java>
<java jar="${geronimo.home}/bin/deployer.jar" fork="true">
<arg value="--user"/>
<arg value="${geronimo.user}"/>
<arg value="--password"/>
<arg value="${geronimo.password}"/>
<arg value="undeploy"/>
<arg value="com/ibm/j2g/jca.rar"/>
</java>
<java jar="${geronimo.home}/bin/deployer.jar" fork="true">
<arg value="--user"/>
<arg value="${geronimo.user}"/>
<arg value="--password"/>
<arg value="${geronimo.password}"/>
<arg value="deploy"/>
<arg value="meta/geronimo/jca-plan.xml"/>
<arg value="jca.rar"/>
</java>
<java jar="${geronimo.home}/bin/deployer.jar" fork="true">
<arg value="--user"/>
<arg value="${geronimo.user}"/>
<arg value="--password"/>
<arg value="${geronimo.password}"/>
<arg value="deploy"/>
<arg value="jca.war"/>
</java>
</target>
</project>