Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build-kernel/build.xml')
-rw-r--r--build-kernel/build.xml185
1 files changed, 185 insertions, 0 deletions
diff --git a/build-kernel/build.xml b/build-kernel/build.xml
new file mode 100644
index 00000000..b2c9203c
--- /dev/null
+++ b/build-kernel/build.xml
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="build-kernel" xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <path id="unit.test.bundles">
+ <pathelement location="../org.eclipse.virgo.kernel.shutdown"/>
+ <pathelement location="../org.eclipse.virgo.kernel.authentication"/>
+ <pathelement location="../org.eclipse.virgo.kernel.core"/>
+ <pathelement location="../org.eclipse.virgo.kernel.artifact"/>
+ <pathelement location="../org.eclipse.virgo.kernel.services"/>
+ <pathelement location="../org.eclipse.virgo.kernel.osgi"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer"/>
+ <pathelement location="../org.eclipse.virgo.kernel.userregion"/>
+ <pathelement location="../org.eclipse.virgo.kernel.agent.dm"/>
+ <pathelement location="../org.eclipse.virgo.kernel.kerneldmfragment"/>
+ <pathelement location="../org.eclipse.virgo.kernel.dmfragment"/>
+ <pathelement location="../org.eclipse.virgo.kernel.dm"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.dm"/>
+ <pathelement location="../org.eclipse.virgo.kernel.model"/>
+ <pathelement location="../org.eclipse.virgo.kernel.shell"/>
+ <pathelement location="../org.eclipse.virgo.kernel.stubs"/>
+ </path>
+
+ <path id="bundles">
+ <path refid="unit.test.bundles" />
+ <pathelement location="../org.eclipse.virgo.kernel"/>
+ <pathelement location="../org.eclipse.virgo.kernel.test"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.testbundle"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.test"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/multi-bundle/default.xml"/>
+
+ <target name="precommit" depends="clean, clean-integration, test, findbugs, package, smoke-test"
+ description="Performs a CI server-like build, should be run prior to performing a Git push"/>
+
+ <target name="package" depends="ivy.init">
+ <delete dir="${package.output.dir}" quiet="true"/>
+ <mkdir dir="${package.output.dir}"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/lib-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/lib/[artifact]-[revision].[ext]" conf="lib" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/lib/kernel/[artifact]-[revision].[ext]" conf="lib-kernel" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/repository/ext/[artifact]-[revision].[ext]" conf="repository-ext" type="jar"/>
+
+ <mkdir dir="${package.output.dir}/bin/service"/>
+ <mkdir dir="${package.output.dir}/config"/>
+ <mkdir dir="${package.output.dir}/work"/>
+
+ <echo file="${package.output.dir}/lib/.version"
+ message="virgo.kernel.version=${bundle.version}&#xa;"/>
+
+ <ivy:cachepath resolveId="jsw" pathid="jsw" organisation="org.tanukisoftware"
+ module="org.tanukisoftware.wrapper" revision="${org.tanukisoftware.wrapper}" conf="runtime" type="zip"
+ inline="true" log="download-only"/>
+
+ <unzip dest="${package.output.dir}">
+ <path refid="jsw"/>
+ <patternset>
+ <include name="*/bin/wrapper-*"/>
+ <include name="*/lib/libwrapper-*"/>
+ <include name="*/lib/wrapper-*"/>
+ <include name="*/lib/wrapper.jar"/>
+ </patternset>
+ <globmapper from="wrapper-delta-pack-${org.tanukisoftware.wrapper}/*" to="bin/service/*"/>
+ </unzip>
+
+ <copy todir="${package.output.dir}/bin" failonerror="false">
+ <fileset dir="${basedir}/bin"/>
+ </copy>
+
+ <copy todir="${package.output.dir}/lib" failonerror="false">
+ <fileset dir="${basedir}/lib"/>
+ <filterset>
+ <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
+ <filter token="FELIX.CONFIGADMIN.VERSION" value="${org.apache.felix}"/>
+ <filter token="FELIX.EVENTADMIN.VERSION" value="${org.apache.felix.eventadmin}"/>
+ <filter token="JLINE.VERSION" value="${net.sourceforge.jline}"/>
+ <filter token="KERNEL.VERSION" value="${bundle.version}"/>
+ <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
+ <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
+ <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
+ <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
+ <filter token="SPRING.VERSION" value="${org.springframework}"/>
+ <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${package.output.dir}/config" failonerror="false">
+ <fileset dir="${basedir}/config" excludes="keystore"/>
+ <filterset>
+ <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
+ <filter token="FELIX.CONFIGADMIN.VERSION" value="${org.apache.felix}"/>
+ <filter token="FELIX.EVENTADMIN.VERSION" value="${org.apache.felix.eventadmin}"/>
+ <filter token="JLINE.VERSION" value="${net.sourceforge.jline}"/>
+ <filter token="KERNEL.VERSION" value="${bundle.version}"/>
+ <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
+ <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
+ <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
+ <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
+ <filter token="SPRING.VERSION" value="${org.springframework}"/>
+ <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${package.output.dir}/repository/ext" failonerror="false">
+ <fileset dir="${basedir}/repository/ext"/>
+ </copy>
+
+ <copy todir="${package.output.dir}/repository/ext" failonerror="false">
+ <fileset dir="${package.output.dir}/lib/kernel">
+ <include name="org.eclipse.virgo.kernel.agent.dm-*.jar"/>
+ </fileset>
+ </copy>
+
+ <move todir="${package.output.dir}/repository/ext" failonerror="false">
+ <fileset dir="${package.output.dir}/lib/kernel">
+ <include name="org.eclipse.virgo.kernel.dmfragment-*.jar"/>
+ <include name="org.eclipse.virgo.kernel.deployer.dm-*.jar"/>
+ </fileset>
+ </move>
+
+ <mkdir dir="${package.output.dir}/repository/usr"/>
+
+ <copy file="${basedir}/config/keystore" todir="${package.output.dir}/config" failonerror="false"/>
+
+ <chmod perm="600">
+ <fileset dir="${package.output.dir}/config">
+ <include name="org.eclipse.virgo.kernel.jmxremote.access.properties"/>
+ </fileset>
+ </chmod>
+
+ <chmod perm="755">
+ <fileset dir="${package.output.dir}/bin">
+ <include name="*.sh"/>
+ </fileset>
+ <fileset dir="${package.output.dir}/bin/service">
+ <include name="*.sh"/>
+ </fileset>
+ <fileset dir="${package.output.dir}/bin/service/bin">
+ <exclude name="*.exe"/>
+ </fileset>
+ </chmod>
+
+ <copy todir="${package.output.dir}" failonerror="false">
+ <fileset dir="${basedir}/resources"/>
+ </copy>
+
+ <mkdir dir="${artifacts.dir}"/>
+ <zip destfile="${package.output.file}">
+ <zipfileset dir="${package.dir}" includes="${package.basename}/bin/*.sh" filemode="755"/>
+ <zipfileset dir="${package.dir}" includes="${package.basename}/bin/service/*.sh" filemode="755"/>
+ <zipfileset dir="${package.dir}" includes="${package.basename}/bin/service/bin/*" filemode="755"/>
+ <zipfileset dir="${package.dir}" includes="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/>
+ <zipfileset dir="${package.dir}">
+ <exclude name="${package.basename}/bin/*.sh"/>
+ <exclude name="${package.basename}/bin/service/*.sh"/>
+ <exclude name="${package.basename}/bin/service/bin/*"/>
+ <exclude name="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+<!--publish-package, -->
+
+ <target name="publish" depends="publish-package, publish-multi-bundle.publish"/>
+
+ <target name="smoke-test" description="Runs a smoke test on the kernel packaged build">
+ <path id="smoke.test.bundles">
+ <pathelement location="${basedir}/../org.eclipse.virgo.kernel.smoketest" />
+ </path>
+ <antcall target="test.pre"/>
+ <all-bundles target="test-package" buildpathRef="smoke.test.bundles">
+ <property name="package.output.file" value="${package.output.file}"/>
+ <property name="package.basename" value="${package.basename}"/>
+ </all-bundles>
+ <antcall target="test.post"/>
+ </target>
+
+</project>

Back to the top