<tstamp/>\r
<!-- Create the build directory structure used by compile -->\r
<mkdir dir="${build}"/>\r
-\r
</target>\r
\r
-\r
<target name="package" depends="package-unix,package-windows"\r
- description="Package CollectionSpace Services" />\r
+ description="Package CollectionSpace Services" /> \r
<target name="package-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="package" />\r
</target>\r
\r
<target name="install" depends="package,install-unix,install-windows"\r
- description="Install" />\r
+ description="Install" />\r
<target name="install-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="install" />\r
</target>\r
\r
<target name="clean" depends="clean-unix,clean-windows"\r
- description="Delete target directories" >\r
+ description="Delete target directories" >\r
<delete dir="${build}"/>\r
</target>\r
<target name="clean-unix" if="osfamily-unix">\r
</target>\r
\r
<target name="deploy" depends="package"\r
- description="deploy 3rdparty in ${jboss.server.cspace}">\r
+ description="deploy 3rdparty in ${jboss.server.cspace}">\r
<ant antfile="nuxeo/build.xml" target="deploy" inheritall="false"/>\r
</target>\r
\r
<target name="undeploy"\r
- description="undeploy 3rdparty from ${jboss.server.cspace}">\r
+ description="undeploy 3rdparty from ${jboss.server.cspace}">\r
<ant antfile="nuxeo/build.xml" target="undeploy" inheritall="false"/>\r
</target>\r
\r
<target name="dist"\r
- description="generate distribution for 3rdparty">\r
+ description="generate distribution for 3rdparty">\r
<ant antfile="nuxeo/build.xml" target="dist" inheritall="false"/>\r
</target>\r
\r
\r
</target>\r
\r
-\r
<target name="package" depends="package-unix,package-windows"\r
- description="Package CollectionSpace Services" />\r
+ description="Package CollectionSpace Services" />\r
<target name="package-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="package" />\r
</target>\r
\r
<target name="install" depends="package,install-unix,install-windows"\r
- description="Install" />\r
+ description="Install" />\r
<target name="install-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="install" />\r
</target>\r
\r
<target name="clean" depends="clean-unix,clean-windows"\r
- description="Delete target directories" >\r
+ description="Delete target directories" >\r
<delete dir="${build}"/>\r
</target>\r
<target name="clean-unix" if="osfamily-unix">\r
</target>\r
\r
<target name="deploy" depends="package"\r
- description="deploy nuxeo client libs to ${jboss.server.cspace}">\r
+ description="deploy nuxeo client libs to ${jboss.server.cspace}">\r
<copy todir="${jboss.server.cspace}/nuxeo-client/lib">\r
<fileset dir="${basedir}/nuxeo-client/lib">\r
<include name="*.jar"/>\r
</target>\r
\r
<target name="dist"\r
- description="generate distribution for nuxeo client libs" depends="package">\r
+ description="generate distribution for nuxeo client libs" depends="package">\r
<copy todir="${services.trunk}/${dist.server.cspace}/nuxeo-client">\r
<fileset dir="${basedir}/nuxeo-client"/>\r
</copy>\r
dist=dist\r
dist.cspace=${dist}/cspace\r
dist.nuxeo=${dist}/nuxeo\r
+dist.installer=${dist}/installer\r
+dist.installer.services=${dist.installer}/services\r
+\r
\r
#dist cspace domain\r
dist.domain.cspace=${domain.cspace}\r
description="generate cspace service distribution">\r
<!-- Create the distribution directory -->\r
<mkdir dir="${basedir}/dist"/>\r
+ \r
<!-- copy db scripts, etc. -->\r
<copy todir="${basedir}/${dist.server.cspace}/cspace/services">\r
<fileset dir="${src}/main/resources/scripts"/>\r
</copy>\r
+ \r
<!-- copy datasources -->\r
<copy todir="${basedir}/${dist.deploy.cspace}">\r
<fileset dir="${src}/main/resources/config"/>\r
<sql driver="com.mysql.jdbc.Driver"\r
url="jdbc:mysql://localhost:3306/cspace"\r
userid="root"\r
- password="admin"\r
+ password=""\r
src="${db.script.dir}/init_db.sql"\r
>\r
<classpath>\r
</exec>\r
</target>\r
\r
+ <target name="dist_installer" depends="package"\r
+ description="Installer: Creates an installer distribution for the CollectionSpace services.">\r
+ <!-- copy install scripts, etc. -->\r
+ <copy todir="${basedir}/${dist.installer}">\r
+ <fileset dir="installer"/>\r
+ <fileset dir="${src}/main/resources/scripts"/> \r
+ </copy>\r
+ <ant antfile="services/build.xml" target="dist_installer" inheritAll="false"/>\r
+ </target>\r
\r
</project>\r
--- /dev/null
+#cspace\r
+cspace.release=0.2\r
+cspace.services.release=cspace-services-${cspace.release}\r
+cspace.services.war=cspace-services.war\r
+domain.cspace=cspace\r
+domain.nuxeo=default\r
+\r
+#nuxeo\r
+#nuxeo.release=5.2.M4\r
+nuxeo.release=5.2.GA\r
+nuxeo.ear=nuxeo.ear\r
+nuxeo.system=${nuxeo.ear}/system\r
+\r
+#distribution\r
+dist=dist\r
+dist.cspace=${dist}/cspace\r
+dist.nuxeo=${dist}/nuxeo\r
+\r
+#dist cspace domain\r
+dist.domain.cspace=${domain.cspace}\r
+dist.server.cspace=${dist.cspace}/server/${jboss.domain.cspace}\r
+dist.deploy.cspace=${dist.server.cspace}/deploy\r
+dist.lib.cspace=${dist.server.cspace}/lib\r
+\r
+#dist nuxeo domain\r
+dist.domain.nuxeo=${domain.nuxeo}\r
+dist.server.nuxeo=${dist.nuxeo}/server/${jboss.domain.nuxeo}\r
+dist.deploy.nuxeo=${dist.server.nuxeo}/deploy\r
+dist.lib.nuxeo=${dist.server.nuxeo}/lib\r
+dist.deploy.nuxeo.system=${dist.deploy.nuxeo}/${nuxeo.system}\r
+\r
+#jboss\r
+#assumption: both nuxeo and cspace domains are using the same JBoss installation\r
+jboss.release=jboss-4.2.3.GA\r
+jboss.dir=C:/dev/${jboss.release}\r
+jboss.home=${jboss.dir}\r
+\r
+#jboss cspace domain\r
+jboss.domain.cspace=${domain.cspace}\r
+jboss.server.cspace=${jboss.home}/server/${jboss.domain.cspace}\r
+jboss.deploy.cspace=${jboss.server.cspace}/deploy\r
+jboss.lib.cspace=${jboss.server.cspace}/lib\r
+jboss.deploy.cspace.services=${jboss.server.cspace}/deploy/${cspace.services.war}\r
+\r
+#jboss nuxeo domain\r
+jboss.domain.nuxeo=${domain.nuxeo}\r
+jboss.server.nuxeo=${jboss.home}/server/${jboss.domain.nuxeo}\r
+jboss.deploy.nuxeo=${jboss.server.nuxeo}/deploy\r
+jboss.lib.nuxeo=${jboss.server.nuxeo}/lib\r
+jboss.deploy.nuxeo.system=${jboss.deploy.nuxeo}/${nuxeo.system}\r
+\r
--- /dev/null
+\r
+<project name="trunk-install" default="package" basedir=".">\r
+ <description>\r
+ collectionspace services\r
+ </description>\r
+ <!-- set global properties for this build -->\r
+ <property file="build.properties" />\r
+ <property name="src" location="src"/>\r
+\r
+ <property name="db" value="mysql"/>\r
+ <property name="db.script.dir" location="${basedir}/db/${db}"/>\r
+\r
+ <condition property="osfamily-unix">\r
+ <os family="unix" />\r
+ </condition>\r
+ <condition property="osfamily-windows">\r
+ <os family="windows" />\r
+ </condition>\r
+ \r
+ <target name="setup">\r
+ <exec executable="echo">\r
+ <arg value="Executing installer's 'setup' target." />\r
+ </exec>\r
+ \r
+ <exec executable="echo">\r
+ <arg value="Creating necessary databases and associated users and privileges." />\r
+ </exec>\r
+ <sql driver="com.mysql.jdbc.Driver"\r
+ url="jdbc:mysql://localhost:3306/cspace"\r
+ userid="root"\r
+ password="admin"\r
+ src="${db.script.dir}/init_db.sql">\r
+ <classpath>\r
+ <pathelement path="${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar"/>\r
+ </classpath>\r
+ </sql>\r
+ \r
+ <!-- Now, invoke the "setup" target on each of the services' install directories -->\r
+ <ant antfile="services/build.xml" target="setup" inheritAll="false"/> \r
+ </target>\r
+ \r
+ <target name="init">\r
+ <exec executable="echo">\r
+ <arg value="Executing installer's 'init' target." />\r
+ </exec>\r
+ <!-- Now, invoke the "setup" target on each of the services' install directories -->\r
+ <ant antfile="services/build.xml" target="init" inheritAll="false"/> \r
+ </target>\r
+\r
+</project>\r
<ant antfile="acquisition/build.xml" target="dist" inheritAll="false"/>\r
<ant antfile="JaxRsServiceProvider/build.xml" target="dist" inheritAll="false"/>\r
</target>\r
+ \r
+ <!-- this target is called in order based on the dependencies between the services -->\r
+ <target name="dist_installer"\r
+ description="create distribution for CollectionSpace installer">\r
+ \r
+ <!-- copy install scripts, etc. -->\r
+ <copy todir="${services.trunk}/${dist.installer.services}">\r
+ <fileset dir="./installer"/>\r
+ </copy>\r
+ <ant antfile="id/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="collectionobject/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="vocabulary/build.xml" target="dist_installer" inheritAll="false"/> \r
+<!--\r
+ <ant antfile="common/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="authentication/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="relation/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="intake/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="acquisition/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="JaxRsServiceProvider/build.xml" target="dist_installer" inheritAll="false"/>\r
+--> \r
+ </target> \r
\r
\r
</project>\r
<ant antfile="nuxeo-platform-cs-collectionobject/build.xml" target="dist" inheritall="false"/>\r
</target>\r
\r
+ <target name="dist_installer"\r
+ description="generate distribution for collectionobject" depends="package">\r
+ <ant antfile="nuxeo-platform-cs-collectionobject/build.xml" target="dist_installer" inheritall="false"/>\r
+ </target>\r
+\r
</project>\r
</target>\r
\r
<target name="dist"\r
- description="generate distribution for collectionobject doctype" depends="package">\r
+ description="generate distribution for collectionobject doctype" depends="package">\r
<copy todir="${services.trunk}/${dist.deploy.nuxeo.system}">\r
<fileset file="${basedir}/target/${nuxeo.collectionobject.jar}"/>\r
</copy>\r
</target>\r
\r
+ <target name="dist_installer"\r
+ description="Creates an installer distribution for CollectionObject doctype" depends="package">\r
+ <copy todir="${services.trunk}/${dist.installer.services}/collectionobject/nuxeo">\r
+ <fileset file="${basedir}/target/${nuxeo.collectionobject.jar}"/>\r
+ </copy>\r
+ </target>\r
</project>\r
</target>\r
\r
<target name="dist" depends="package"\r
- description="distribute collectionobject service}">\r
+ description="distribute collectionobject service}">\r
<ant antfile="3rdparty/build.xml" target="dist" inheritall="false"/>\r
</target>\r
+ \r
+ <!-- Creates a distribution of artifacts for the installer. --> \r
+ <target name="dist_installer" depends="package"\r
+ description="Creates a distribution of artifacts for the installer.">\r
+\r
+ <!-- copy install scripts, etc. -->\r
+ <copy todir="${services.trunk}/${dist.installer.services}/collectionobject">\r
+ <fileset dir="./installer"/>\r
+ </copy> \r
+ <ant antfile="3rdparty/build.xml" target="dist_installer" inheritall="false"/>\r
+ </target>\r
\r
</project>\r
--- /dev/null
+\r
+<project name="collectionobject-install" default="package" basedir=".">\r
+ <description>\r
+ collectionobject service install\r
+ </description>\r
+ <!-- set global properties for this build -->\r
+ <property name="services.trunk" value="../.."/>\r
+ <property file="${services.trunk}/build.properties" />\r
+ <property name="mvn.opts" value="" />\r
+ <property name="src" location="src"/>\r
+ <property name="build" location="build"/>\r
+\r
+ <condition property="osfamily-unix">\r
+ <os family="unix" />\r
+ </condition>\r
+ <condition property="osfamily-windows">\r
+ <os family="windows" />\r
+ </condition>\r
+\r
+ <target name="setup" description="">\r
+ <tstamp/>\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing CollectionObject Service's 'setup' target." />\r
+ </exec>\r
+ </target>\r
+\r
+ <target name="takedown" description="">\r
+ <tstamp/>\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing CollectionObject Service's 'takedown' target." />\r
+ </exec>\r
+ </target>\r
+ \r
+ <target name="init" description="">\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing CollectionObject Service's 'init' target." />\r
+ </exec> \r
+ </target>\r
+ \r
+\r
+</project>\r
<property name="services.trunk" value="../.."/>\r
<property file="${services.trunk}/build.properties" />\r
<property name="mvn.opts" value="" />\r
- <property name="src" location="src"/>\r
+ <property name="src" location="service/src"/>\r
\r
<condition property="osfamily-unix">\r
<os family="unix" />\r
<ant antfile="service/build.xml" target="dist" inheritall="false"/>\r
</target>\r
\r
+ <target name="dist_installer"\r
+ description="generate distribution for id" depends="package"> \r
+ <!-- copy install scripts, etc. -->\r
+ <copy todir="${services.trunk}/${dist.installer.services}/id">\r
+ <fileset dir="${basedir}/installer/"/>\r
+ </copy>\r
+ <!-- copy db scripts, etc. -->\r
+ <copy todir="${services.trunk}/${dist.installer.services}/id/db/mysql">\r
+ <fileset dir="${src}/main/resources/db/mysql"/>\r
+ </copy>\r
+ </target>\r
\r
</project>\r
--- /dev/null
+\r
+<project name="id-service-install" default="package" basedir=".">\r
+ <description>\r
+ CollectionSpace ID Service Installer Targets\r
+ </description>\r
+ <!-- set global properties for this build -->\r
+ <property file="${basedir}/../../build.properties" /> \r
+ <property name="src" location="src"/>\r
+\r
+ <property name="db" value="mysql"/>\r
+ <property name="db.script.dir" location="${basedir}/db/${db}"/>\r
+\r
+ <condition property="osfamily-unix">\r
+ <os family="unix" />\r
+ </condition>\r
+ <condition property="osfamily-windows">\r
+ <os family="windows" />\r
+ </condition>\r
+\r
+ <target name="setup">\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing ID Service's 'setup' target for the ID Service." />\r
+ </exec>\r
+ \r
+ <exec executable="echo">\r
+ <arg value="Installer: Creating necessary database tables for the ID Service." />\r
+ </exec> \r
+ <!-- Create the tables -->\r
+ <sql driver="com.mysql.jdbc.Driver"\r
+ url="jdbc:mysql://localhost:3306/cspace"\r
+ userid="root"\r
+ password="admin"\r
+ src="${db.script.dir}/create_id_generators_table.sql">\r
+ <classpath>\r
+ <pathelement path="${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar"/>\r
+ </classpath>\r
+ </sql>\r
+ \r
+ <exec executable="echo">\r
+ <arg value="Loading tables for the ID Service." />\r
+ </exec> \r
+ \r
+ <!-- Load the tables -->\r
+ <sql driver="com.mysql.jdbc.Driver"\r
+ url="jdbc:mysql://localhost:3306/cspace"\r
+ userid="root"\r
+ password="admin"\r
+ src="${db.script.dir}/load_id_generators.sql">\r
+ <classpath>\r
+ <pathelement path="${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar"/>\r
+ </classpath>\r
+ </sql> \r
+ </target>\r
+ \r
+ <target name="init" description="">\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing ID Service's 'init' target." />\r
+ </exec>\r
+ </target>\r
+ \r
+</project>\r
--- /dev/null
+\r
+<project name="main-install" basedir=".">\r
+ <description>\r
+ </description>\r
+ <!-- set global properties for this build -->\r
+ <property name="services.trunk" value=".."/>\r
+ <property file="${services.trunk}/build.properties" />\r
+ <property name="mvn.opts" value="" />\r
+ <property name="src" location="src"/>\r
+\r
+ <condition property="osfamily-unix">\r
+ <os family="unix" />\r
+ </condition>\r
+ <condition property="osfamily-windows">\r
+ <os family="windows" />\r
+ </condition>\r
+\r
+ <!-- this target is called in order based on the dependencies between the services -->\r
+ <target name="setup" description="">\r
+ <exec executable="echo">\r
+ <arg value="Installer: Executing services 'setup' target." />\r
+ </exec> \r
+<!--\r
+ <ant antfile="common/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="authentication/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="relation/build.xml" target="setup" inheritAll="false"/>\r
+--> \r
+ <ant antfile="id/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="collectionobject/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="vocabulary/build.xml" target="setup" inheritAll="false"/>\r
+<!-- \r
+ <ant antfile="intake/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="acquisition/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="JaxRsServiceProvider/build.xml" target="setup" inheritAll="false"/>\r
+--> \r
+ </target>\r
+\r
+ <!-- this target is called in revese order of deploy targets -->\r
+ <target name="takedown" description="">\r
+ <ant antfile="JaxRsServiceProvider/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="vocabulary/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="acquisition/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="intake/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="collectionobject/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="id/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="relation/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="authentication/build.xml" target="takedown" inheritAll="false"/>\r
+ <ant antfile="common/build.xml" target="takedown" inheritAll="false"/>\r
+ </target>\r
+\r
+ <target name="init" description="">\r
+ <exec executable="echo">\r
+ <arg value="Executing installer's services 'init' target." />\r
+ </exec> \r
+<!--\r
+ <ant antfile="common/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="authentication/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="relation/build.xml" target="setup" inheritAll="false"/>\r
+--> \r
+ <ant antfile="id/build.xml" target="init" inheritAll="false"/>\r
+ <ant antfile="collectionobject/build.xml" target="init" inheritAll="false"/>\r
+ <ant antfile="vocabulary/build.xml" target="init" inheritAll="false"/>\r
+<!-- \r
+ <ant antfile="intake/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="acquisition/build.xml" target="setup" inheritAll="false"/>\r
+ <ant antfile="JaxRsServiceProvider/build.xml" target="setup" inheritAll="false"/>\r
+--> \r
+ </target> \r
+</project>\r
description="generate distribution for vocabulary" depends="package">\r
<ant antfile="nuxeo-platform-cs-vocabulary/build.xml" target="dist" inheritall="false"/>\r
</target>\r
-\r
+ \r
+ <target name="dist_installer"\r
+ description="generate distribution for collectionobject" depends="package">\r
+ <ant antfile="nuxeo-platform-cs-vocabulary/build.xml" target="dist_installer" inheritall="false"/>\r
+ </target>\r
\r
</project>\r
<delete file="${jboss.deploy.nuxeo.system}/${nuxeo.vocabulary.jar}"/>
</target>
-
<target name="dist"
description="generate distribution for vocabulary doctype" depends="package">
<copy todir="${services.trunk}/${dist.deploy.nuxeo.system}">
</copy>
</target>
+ <target name="dist_installer"
+ description="Creates an installer distribution for Vocabulary doctype" depends="package">
+ <copy todir="${services.trunk}/${dist.installer.services}/vocabulary/nuxeo">
+ <fileset file="${basedir}/target/${nuxeo.vocabulary.jar}"/>
+ </copy>
+ </target>
+
</project>
description="distribute vocabulary service">\r
<ant antfile="3rdparty/build.xml" target="dist" inheritall="false"/> \r
<ant antfile="client/build.xml" target="dist" inheritall="false"/>\r
- \r
+ <ant antfile="import/build.xml" target="dist" inheritall="false"/> \r
+ </target>\r
+\r
+ <target name="dist_installer" depends="package"\r
+ description="distribute vocabulary service"> \r
+ <!-- copy install scripts, etc. -->\r
+ <copy todir="${services.trunk}/${dist.installer.services}/vocabulary">\r
+ <fileset dir="${basedir}/installer/"/>\r
+ </copy> \r
+ <ant antfile="3rdparty/build.xml" target="dist_installer" inheritall="false"/> \r
+ <ant antfile="import/build.xml" target="dist_installer" inheritall="false"/> \r
</target>\r
\r
</project>\r
\r
<target name="dist" depends="package"\r
description="distribute vocabulary service importer tool">\r
- \r
+ </target>\r
+\r
+ <target name="dist_installer" depends="package"\r
+ description="distribute vocabulary service importer tool"> \r
<!-- copy install scripts, etc. -->\r
- <copy todir="${services.trunk}/dist/install/services/vocabulary/init">\r
+ <copy todir="${services.trunk}/${dist.installer.services}/vocabulary/init">\r
<fileset dir="${basedir}/target">\r
<include name="*with-dependencies*.jar"/>\r
</fileset>\r
</copy>\r
- \r
</target>\r
\r
</project>\r