Commit 3129e9d6 authored by Nicolas Tachker's avatar Nicolas Tachker

maven migration.

parent 010fe3b9
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="a3/common/target/classes" path="a3/common/src/main/java"/>
<classpathentry kind="src" output="a3/rt/target/classes" path="a3/rt/src/main/java"/>
<classpathentry kind="src" output="jndi/shared/target/classes" path="jndi/shared/src/main/java"/>
<classpathentry kind="src" output="jndi/server/target/classes" path="jndi/server/src/main/java"/>
<classpathentry kind="src" output="jndi/client/target/classes" path="jndi/client/src/main/java"/>
<classpathentry kind="src" output="joram/shared/target/classes" path="joram/shared/src/main/java"/>
<classpathentry kind="src" output="joram/mom/target/classes" path="joram/mom/src/main/java"/>
<classpathentry kind="src" output="joram/mom/core/target/classes" path="joram/mom/core/src/main/java"/>
<classpathentry kind="src" output="joram/client/jms/target/classes" path="joram/client/jms/src/main/java"/>
<classpathentry kind="src" output="joram/client/jca/target/classes" path="joram/client/jca/src/main/java"/>
<classpathentry kind="src" output="joram/mom/extensions/collector/target/classes" path="joram/mom/extensions/collector/src/main/java"/>
<classpathentry kind="src" output="joram/mom/extensions/ftp/target/classes" path="joram/mom/extensions/ftp/src/main/java"/>
<classpathentry kind="src" output="joram/mom/extensions/jmsbridge/target/classes" path="joram/mom/extensions/jmsbridge/src/main/java"/>
<classpathentry kind="src" output="joram/mom/extensions/mail/target/classes" path="joram/mom/extensions/mail/src/main/java"/>
<classpathentry kind="src" output="joram/mom/extensions/scheduler/target/classes" path="joram/mom/extensions/scheduler/src/main/java"/>
<classpathentry kind="src" output="samples/classes" path="samples/src/joram"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0"?>
<project name="joram" default="releases" basedir=".">
<target name="clean">
<ant dir="src" antfile="joram.xml" target="clean"/>
<ant dir="src" antfile="joram.xml" target="clean.releases"/>
</target>
<!-- JORAM releases target -->
<target name="releases"
description="--> Builds a Joram complete distribution.">
<ant dir="src" antfile="joram.xml" target="releases"/>
<antcall target="maven:deploy" inheritall="true"/>
</target>
<!-- JORAM snapshot releases target -->
<target name="snapshot"
description="--> Builds a Joram complete snapshot distribution.">
<ant dir="src" antfile="joram.xml" target="snapshot"/>
<antcall target="deploy_snapshot" inheritall="true"/>
</target>
<!-- JORAM shipment target -->
<target name="ship"
description="--> Build jars needed to use Joram">
<ant dir="src" antfile="joram.xml" target="clean" />
<ant dir="src" antfile="joram.xml" target="ship" />
</target>
<target name="ship.all">
<!-- ant dir="src" antfile="joram.xml" target="clean" / -->
<ant dir="src" antfile="joram.xml" target="ship.adapters"/>
<ant dir="src" antfile="joram.xml" target="ship.osgi"/>
</target>
<!-- =================================
target: deploy_snapshot
================================= -->
<target name="deploy_snapshot"
depends="ship.all"
description="--> Deploy JORAM SNAPSHOT on the OW2 repository">
<ant antfile="maven-build.xml" target="deploy_snapshot" />
</target>
<!-- =================================
target: install_snapshot
================================= -->
<target name="install_snapshot"
depends="ship.all"
description="--> Install JORAM SNAPSHOT in the local artifact repository">
<ant antfile="maven-build.xml" target="install_snapshot" />
</target>
<!-- =================================
target: maven:deploy
================================= -->
<target name="maven:deploy"
depends="ship.all"
description="--> Deploy JORAM on the OW2 Release repository">
<ant antfile="maven-build.xml" target="deploy" />
</target>
<!-- =================================
target: maven:install
================================= -->
<target name="maven:install"
depends="ship.all"
description="--> Install JORAM in the local artifact repository">
<ant antfile="maven-build.xml" target="install" />
</target>
</project>
<?xml version="1.0"?>
<project default="init" basedir=".">
<!-- Initializes the environment paths and properties -->
<target name="init">
<!-- Initializes the directory structure properties -->
<property name="lib.dir" location="ship/lib"/>
<property name="tmp.dir" location="tmp"/>
</target>
<!-- ***************************************************************** -->
<!-- * Update Joram in JOnAS * -->
<!-- ***************************************************************** -->
<target name="jonas.env" depends="init">
<property environment="env"/>
<condition property="jonas.root" value="${env.JONAS_ROOT}">
<and>
<isset property="env.JONAS_ROOT"/>
</and>
</condition>
<fail message="You have to define the JONAS_ROOT environnement variable or the jonas.root property"
unless="jonas.root"/>
<condition property="jonas.base" value="${env.JONAS_BASE}">
<and>
<isset property="env.JONAS_BASE"/>
</and>
</condition>
<echo message="JONAS_ROOT=${jonas.root}"/>
<echo message="JONAS_BASE=${jonas.base}"/>
<available file="${jonas.root}/lib/commons/jonas/joram" type="dir"
property="jonas.root.lib.present"/>
<available file="${jonas.base}/lib/commons/jonas/joram" type="dir"
property="jonas.base.lib.present"/>
<available file="${jonas.root}/rars/joram_for_jonas_ra.rar"
property="jonas.root.rars.present"/>
<available file="${jonas.base}/rars/joram_for_jonas_ra.rar"
property="jonas.base.rars.present"/>
<available file="${jonas.root}/rars/autoload/joram_for_jonas_ra.rar"
property="jonas.root.rars.auto.present"/>
<available file="${jonas.base}/rars/autoload/joram_for_jonas_ra.rar"
property="jonas.base.rars.auto.present"/>
<available file="${jonas.root}/lib/client.jar"
property="jonas.root.clt.present"/>
<available file="${jonas.base}/lib/client.jar"
property="jonas.base.clt.present"/>
</target>
<target name="putJoramInJonas"
depends="jonas.env"
description="--> Install Joram into JOnAS (updating librairies)">
<antcall target="putJarInJonasRoot" inheritAll="true"/>
<antcall target="putJarInJonasBase" inheritAll="true"/>
<antcall target="putRarInJonasRoot" inheritAll="true"/>
<antcall target="putRarInJonasBase" inheritAll="true"/>
<antcall target="putRarInJonasRootAuto" inheritAll="true"/>
<antcall target="putRarInJonasBaseAuto" inheritAll="true"/>
<antcall target="updateClientInJonasRoot" inheritAll="true"/>
<antcall target="updateClientInJonasBase" inheritAll="true"/>
</target>
<target name="putJarInJonasRoot" if="jonas.root.lib.present">
<copy toDir="${jonas.root}/lib/commons/jonas/joram" overwrite="true">
<fileset dir="${lib.dir}">
<include name="joram-client.jar"/>
<include name="joram-connector.jar"/>
<include name="joram-mom.jar"/>
<include name="joram-shared.jar"/>
</fileset>
</copy>
</target>
<target name="putJarInJonasBase" if="jonas.base.lib.present">
<copy toDir="${jonas.base}/lib/commons/jonas/joram" overwrite="true">
<fileset dir="${lib.dir}">
<include name="joram-client.jar"/>
<include name="joram-connector.jar"/>
<include name="joram-mom.jar"/>
<include name="joram-shared.jar"/>
</fileset>
</copy>
</target>
<target name="putRarInJonasRoot" if="jonas.root.rars.present">
<copy file="${lib.dir}/joram_for_jonas_ra.rar" toDir="${jonas.root}/rars" overwrite="true"/>
</target>
<target name="putRarInJonasBase" if="jonas.base.rars.present">
<copy file="${lib.dir}/joram_for_jonas_ra.rar" toDir="${jonas.base}/rars" overwrite="true"/>
</target>
<target name="putRarInJonasRootAuto" if="jonas.root.rars.auto.present">
<copy file="${lib.dir}/joram_for_jonas_ra.rar" toDir="${jonas.root}/rars/autoload" overwrite="true"/>
</target>
<target name="putRarInJonasBaseAuto" if="jonas.base.rars.auto.present">
<copy file="${lib.dir}/joram_for_jonas_ra.rar" toDir="${jonas.base}/rars/autoload" overwrite="true"/>
</target>
<target name="updateClientInJonasRoot" if="jonas.root.clt.present">
<delete dir="${tmp.dir}"/>
<mkdir dir="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-client.jar" dest="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-shared.jar" dest="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-connector.jar" dest="${tmp.dir}"/>
<jar destfile="${jonas.root}/lib/client.jar"
update="true"
basedir="${tmp.dir}">
</jar>
<delete dir="${tmp.dir}"/>
</target>
<target name="updateClientInJonasBase" if="jonas.base.clt.present">
<delete dir="${tmp.dir}"/>
<mkdir dir="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-client.jar" dest="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-shared.jar" dest="${tmp.dir}"/>
<unzip src="${lib.dir}/joram-connector.jar" dest="${tmp.dir}"/>
<jar destfile="${jonas.base}/lib/client.jar"
update="true"
basedir="${tmp.dir}">
</jar>
<delete dir="${tmp.dir}"/>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- JORAM: Java(TM) Open Reliable Asynchronous Messaging
- Copyright (C) 2007 - 2010 ScalAgent Distributed Technologies
- Copyright (C) 2007 - Bull S.A.S.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA
-
- Initial developer(s): Guillaume Sauthier (Bull S.A.S)
- Contributor(s): Scalagent D.T.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<project name="Maven 2 - JORAM"
default="install"
xmlns:m2="urn:maven-artifact-ant">
<!-- directory definition -->
<property name="builder.dir" value="${basedir}/pom" />
<property name="builder.lib.dir" value="${basedir}/lib" />
<property name="releases.dir" value="${basedir}/releases" />
<property name="output.dir" value="${basedir}/build" />
<property name="src.dir" value="${basedir}/src" />
<property name="output.tmp.dir" value="${output.dir}/tmp" />
<property name="output.dist.dir" value="${basedir}/ship/lib" />
<property name="output.bundle.dist.dir" value="${basedir}/ship/bundle" />
<property file="${src.dir}/build.properties" />
<property name="joram.version" value="${joram.major}.${joram.minor}.${joram.build}"/>
<path id="build.lib.path">
<fileset dir="${builder.lib.dir}">
<include name="maven-artifact-ant-*-dep.jar" />
</fileset>
</path>
<!-- m2:* elements loading -->
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant">
<classpath refid="build.lib.path" />
</typedef>
<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<mkdir dir="${output.dir}" />
<mkdir dir="${output.tmp.dir}" />
</target>
<!-- - - - - - - - - - - - - - - - - -
target: update
- - - - - - - - - - - - - - - - - -->
<target name="update" depends="init">
<copy todir="${output.tmp.dir}">
<fileset dir="${builder.dir}" includes="*.pom" />
</copy>
<echo>"${joram.version}"</echo>
<replace dir="${output.tmp.dir}"
token="@VERSION@"
value="${joram.version}" />
<!-- ================================================ -->
<!-- JORAM POMs -->
<!-- ================================================ -->
<m2:pom id="parent.pom" file="${output.tmp.dir}/joram-parent.pom" />
<m2:pom id="connector.pom" file="${output.tmp.dir}/joram-connector.pom" />
<m2:pom id="raconfig.pom" file="${output.tmp.dir}/joram-raconfig.pom" />
<m2:pom id="config.pom" file="${output.tmp.dir}/joram-config.pom" />
<m2:pom id="ra_for_jonas.pom" file="${output.tmp.dir}/joram_ra_for_jonas.pom" />
<m2:pom id="ra_remote.pom" file="${output.tmp.dir}/joram_ra_remote.pom" />
<m2:pom id="ra.pom" file="${output.tmp.dir}/joram_ra.pom" />
<m2:pom id="common-util-bundle.pom" file="${output.tmp.dir}/joram-common-util-bundle.pom" />
<m2:pom id="shared-bundle.pom" file="${output.tmp.dir}/joram-shared-bundle.pom" />
<m2:pom id="client-bundle.pom" file="${output.tmp.dir}/joram-client-bundle.pom" />
<!-- m2:pom id="connector-bundle.pom" file="${output.tmp.dir}/joram-connector-bundle.pom" /-->
<m2:pom id="mom-bundle.pom" file="${output.tmp.dir}/joram-mom-bundle.pom" />
<m2:pom id="rt-bundle.pom" file="${output.tmp.dir}/joram-rt-bundle.pom" />
<m2:pom id="jndi-bundle.pom" file="${output.tmp.dir}/joram-jndi-bundle.pom" />
<m2:pom id="ftp-bundle.pom" file="${output.tmp.dir}/joram-ftp-bundle.pom" />
<m2:pom id="mail-bundle.pom" file="${output.tmp.dir}/joram-mail-bundle.pom" />
<m2:pom id="jmsbridge-bundle.pom" file="${output.tmp.dir}/joram-jmsbridge-bundle.pom" />
<m2:pom id="jcup-bundle.pom" file="${output.tmp.dir}/jcup-bundle.pom" />
</target>
<!-- =================================
target: install SNAPSHOT
================================= -->
<target name="install_snapshot"
description="--> Install SNAPSHOT artifacts">
<antcall target="install" inheritAll="true">
<param name="joram.version" value="${joram.major}.${joram.minor}.${joram.build}-SNAPSHOT"/>
</antcall>
</target>
<!-- =================================
target: install
================================= -->
<target name="install"
depends="update"
description="--> Install artifacts">
<echo>*************************************</echo>
<m2:install>
<m2:pom refid="parent.pom" />
</m2:install>
<m2:install file="${output.dist.dir}/joram-connector.jar">
<m2:pom refid="connector.pom" />
</m2:install>
<m2:install file="${output.dist.dir}/joram-raconfig.jar">
<m2:pom refid="raconfig.pom" />
</m2:install>
<m2:install file="${output.dist.dir}/joram-config.jar">
<m2:pom refid="config.pom" />
</m2:install>
<m2:install file="${releases.dir}/joram-jonasadapter-${joram.version}.rar">
<m2:pom refid="ra_for_jonas.pom" />
</m2:install>
<m2:install file="${releases.dir}/joram-${joram.version}-RA.rar">
<m2:pom refid="ra.pom" />
</m2:install>
<m2:install file="${releases.dir}/joram-${joram.version}-remoteRA.rar">
<m2:pom refid="ra_remote.pom" />
</m2:install>
<!-- ******************* OSGi ********************** -->
<m2:install file="${output.bundle.dist.dir}/joram-common-util.jar">
<m2:pom refid="common-util-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-shared.jar">
<m2:pom refid="shared-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-client.jar">
<m2:pom refid="client-bundle.pom" />
</m2:install>
<!-- m2:install file="${output.bundle.dist.dir}/joram-connector-bundle.jar">
<m2:pom refid="connector-bundle.pom" />
</m2:install -->
<m2:install file="${output.bundle.dist.dir}/joram-mom.jar">
<m2:pom refid="mom-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-rt.jar">
<m2:pom refid="rt-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-jndi.jar">
<m2:pom refid="jndi-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-ftp.jar">
<m2:pom refid="ftp-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-mail.jar">
<m2:pom refid="mail-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/joram-jmsbridge.jar">
<m2:pom refid="jmsbridge-bundle.pom" />
</m2:install>
<m2:install file="${output.bundle.dist.dir}/JCup.jar">
<m2:pom refid="jcup-bundle.pom" />
</m2:install>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - -
- Deployment using Maven2 Ant tasks
- - - - - - - - - - - - - - - - - - - - - -->
<macrodef name="maven-deploy">
<attribute name="pomrefid" />
<attribute name="file" />
<sequential>
<m2:install-provider artifactId="wagon-ssh" version="1.0-alpha-7" />
<!-- <m2:install-provider artifactId="wagon-file" version="1.0-beta-2" /> -->
<m2:deploy file="@{file}" pomRefId="@{pomrefid}">
<!-- may introduce here shared elements -->
</m2:deploy>
</sequential>
</macrodef>
<!-- =================================
target: deploy SNAPSHOT
================================= -->
<target name="deploy_snapshot"
description="--> Deploy SNAPSHOT artifacts">
<!-- Execute the internal target -->
<antcall target="internal:deploy">
<param name="joram.version" value="${joram.major}.${joram.minor}.${joram.build}-SNAPSHOT"/>
<param name="deploy.joram" value="true"/>
</antcall>
</target>
<!-- =================================
target: deploy
================================= -->
<target name="deploy"
description="--> Deploy artifacts">
<!-- Ask confirmation for deployment -->
<input message="This will deploy JORAM ${joram.version} in the OFFICIAL OW2 maven repository. Are you sure ?"
validargs="y,Y,n,N"
addproperty="deploy.joram.input" />
<!-- Set a property if the user has confirmed -->
<condition property="deploy.joram">
<or>
<equals arg1="${deploy.joram.input}" arg2="y" />
<equals arg1="${deploy.joram.input}" arg2="Y" />
</or>
</condition>
<!-- Execute the internal target -->
<antcall target="internal:deploy" />
</target>
<!-- - - - - - - - - - - - - - - - - -
target: internal:deploy
- - - - - - - - - - - - - - - - - -->
<target name="internal:deploy" depends="update" if="deploy.joram">
<!-- Deploy the parent -->
<m2:install-provider artifactId="wagon-ssh" version="1.0-alpha-7" />
<m2:deploy>
<m2:pom refid="parent.pom" />
</m2:deploy>
<maven-deploy pomRefId="config.pom"
file="${output.dist.dir}/joram-config.jar" />
<maven-deploy pomRefId="connector.pom"
file="${output.dist.dir}/joram-connector.jar" />
<maven-deploy pomRefId="raconfig.pom"
file="${output.dist.dir}/joram-raconfig.jar" />
<maven-deploy pomRefId="ra_for_jonas.pom"
file="${releases.dir}/joram-jonasadapter-${joram.version}.rar" />
<maven-deploy pomRefId="ra.pom"
file="${releases.dir}/joram-${joram.version}-RA.rar" />
<maven-deploy pomRefId="ra_remote.pom"
file="${releases.dir}/joram-${joram.version}-remoteRA.rar" />
<!-- ******************* OSGi ********************** -->
<maven-deploy pomRefId="client-bundle.pom"
file="${output.bundle.dist.dir}/joram-client.jar" />
<!-- maven-deploy pomRefId="connector-bundle.pom"
file="${output.bundle.dist.dir}/joram-connector-bundle.jar" / -->
<maven-deploy pomRefId="mom-bundle.pom"
file="${output.bundle.dist.dir}/joram-mom.jar" />
<maven-deploy pomRefId="common-util-bundle.pom"
file="${output.bundle.dist.dir}/joram-common-util.jar" />
<maven-deploy pomRefId="shared-bundle.pom"
file="${output.bundle.dist.dir}/joram-shared.jar" />
<maven-deploy pomRefId="rt-bundle.pom"
file="${output.bundle.dist.dir}/joram-rt.jar" />
<maven-deploy pomRefId="jndi-bundle.pom"
file="${output.bundle.dist.dir}/joram-jndi.jar" />
<maven-deploy pomRefId="ftp-bundle.pom"
file="${output.bundle.dist.dir}/joram-ftp.jar" />
<maven-deploy pomRefId="mail-bundle.pom"
file="${output.bundle.dist.dir}/joram-mail.jar" />
<maven-deploy pomRefId="jmsbridge-bundle.pom"
file="${output.bundle.dist.dir}/joram-jmsbridge.jar" />
<maven-deploy pomRefId="jcup-bundle.pom"
file="${output.bundle.dist.dir}/JCup.jar" />
</target>
</project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment