| <?xml version="1.0" encoding="UTF-8"?> |
| <project name="build-nano" xmlns:ivy="antlib:org.apache.ivy.ant"> |
| <path id="unit.test.bundles"> |
| <pathelement location="../org.eclipse.virgo.kernel.core"/> |
| <pathelement location="../org.eclipse.virgo.nano.services.ds"/> |
| <pathelement location="../org.eclipse.virgo.nano.services.concurrent"/> |
| <pathelement location="../org.eclipse.virgo.deployer.api"/> |
| <pathelement location="../org.eclipse.virgo.deployer.hot"/> |
| <pathelement location="../org.eclipse.virgo.nano.deployer"/> |
| <pathelement location="../org.eclipse.virgo.nano.war.deployer"/> |
| <pathelement location="../org.eclipse.virgo.kernel.authentication"/> |
| <pathelement location="../org.eclipse.virgo.kernel.shutdown"/> |
| </path> |
| <path id="bundles"> |
| <path refid="unit.test.bundles" /> |
| </path> |
| |
| <property file="${basedir}/../build.properties"/> |
| <property file="${basedir}/../build.versions"/> |
| <import file="${basedir}/../virgo-build/multi-bundle/default.xml"/> |
| <property name="nano-full-package" value="virgo-nano-full"/> |
| |
| <target name="package" depends="ivy.init"> |
| <delete dir="${package.output.dir}" quiet="true"/> |
| <mkdir dir="${package.output.dir}"/> |
| <property name="common.resources.location" value="${target.dir}/common_resources_zipped"/> |
| <property name="specific.resources.location" value="${target.dir}/specific_resources_zipped"/> |
| <property name="scripts.location" value="${target.dir}/scripts_zipped"/> |
| |
| <antcall target="prepare-common-resources"/> |
| <antcall target="prepare-specific-resources"/> |
| <antcall target="prepare-scripts"/> |
| <antcall target="prepare-bundles-and-features"/> |
| <antcall target="publish-p2-repo"/> |
| <antcall target="install-packages"/> |
| <antcall target="assemble-zips"/> |
| <antcall target="clean-up"/> |
| </target> |
| |
| <target name="clean-up"> |
| <delete dir="${target.dir}/assembly" quiet="true"/> |
| <delete dir="${common.resources.location}" quiet="true"/> |
| <delete dir="${specific.resources.location}" quiet="true"/> |
| <delete dir="${scripts.location}" quiet="true"/> |
| <delete dir="${tools.dir}" quiet="true"/> |
| </target> |
| |
| <target name="assemble-zips"> |
| <delete dir="${package.output.dir}/Eclipse.app" quiet="true"/> |
| <delete dir="${package.dir}/${nano-full-package}-${bundle.version}/Eclipse.app" quiet="true"/> |
| |
| <property name="nano.package.dir" value="${package.dir}/${package.basename}"/> |
| <mkdir dir="${artifacts.dir}"/> |
| <zip destfile="${package.output.file}"> |
| <zipfileset dir="${nano.package.dir}" includes="bin/*.sh" filemode="755"/> |
| <zipfileset dir="${nano.package.dir}" includes="configuration/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/> |
| <zipfileset dir="${nano.package.dir}"> |
| <exclude name="bin/*.sh"/> |
| <exclude name="configuration/org.eclipse.virgo.kernel.jmxremote.access.properties"/> |
| </zipfileset> |
| </zip> |
| <property name="nano.full.package.dir" value="${package.dir}/${nano-full-package}-${bundle.version}"/> |
| <zip destfile="${artifacts.dir}/${nano-full-package}-${bundle.version}.zip"> |
| <zipfileset dir="${nano.full.package.dir}" includes="bin/*.sh" filemode="755"/> |
| <zipfileset dir="${nano.full.package.dir}" includes="configuration/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/> |
| <zipfileset dir="${nano.full.package.dir}"> |
| <exclude name="bin/*.sh"/> |
| <exclude name="configuration/org.eclipse.virgo.kernel.jmxremote.access.properties"/> |
| </zipfileset> |
| </zip> |
| <zip destfile="${updatesite.output.file}"> |
| <zipfileset dir="${p2.repository.dir}"/> |
| </zip> |
| </target> |
| |
| <target name="prepare-bundles-and-features"> |
| <!-- Copy the nano kernel artifacts to a prepared for publishing location - a p2 repo will be built around them --> |
| <ivy:resolve resolveId="copy.path" file="${basedir}/nano-ivy.xml" transitive="false"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="nano-runtime" type="jar"/> |
| |
| <ivy:resolve resolveId="copy.path" file="${basedir}/p2runtime-ivy.xml" transitive="true"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="p2-runtime" type="jar"/> |
| |
| <ivy:resolve resolveId="copy.path" file="${basedir}/gemini-web-ivy.xml" transitive="false"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="gemini-web" type="jar"/> |
| |
| <!-- Prepare the features for publishing --> |
| <copy todir="${target.dir}/assembly/features" failonerror="false"> |
| <fileset dir="${basedir}/publish_resources/features" excludes="keystore"/> |
| <filterset> |
| <filter token="GEMINI.WEB" value="${org.eclipse.gemini.web}"/> |
| <filter token="HA.VERSION" value="${org.apache.catalina.ha}"/> |
| <filter token="JASPER.VERSION" value="${org.apache.jasper}"/> |
| <filter token="TRIBES.VERSION" value="${org.apache.catalina.tribes}"/> |
| <filter token="NANO.VERSION" value="${bundle.version}"/> |
| <filter token="EQUINOX.DS.VERSION" value="${org.eclipse.equinox.ds}"/> |
| <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/> |
| <filter token="LOGBACK.CLASSIC.VERSION" value="${ch.qos.logback.classic}"/> |
| <filter token="LOGBACK.CORE.VERSION" value="${ch.qos.logback.core}"/> |
| <filter token="LOGBACK.SLF4J.VERSION" value="${ch.qos.logback.slf4j}"/> |
| <filter token="FELIX.GOGO.SHELL.VERSION" value="${org.apache.felix.gogo.shell}"/> |
| <filter token="FELIX.GOGO.RUNTIME.VERSION" value="${org.apache.felix.gogo.runtime}"/> |
| <filter token="FELIX.GOGO.COMMAND.VERSION" value="${org.apache.felix.gogo.command}"/> |
| <filter token="MINA.CORE.VERSION" value="${org.apache.mina.core}"/> |
| <filter token="SSHD.CORE.VERSION" value="${org.apache.sshd.core}"/> |
| <filter token="EQUINOX.CONSOLE.VERSION" value="${org.eclipse.equinox.console}"/> |
| <filter token="EQUINOX.CONSOLE.SSH.VERSION" value="${org.eclipse.equinox.console.ssh}"/> |
| <filter token="SPRING.DM.VERSION" value="${org.eclipse.gemini.blueprint}"/> |
| <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/> |
| <filter token="CONTENTTYPE.VERSION" value="${org.eclipse.core.contenttype}"/> |
| <filter token="JOBS.VERSION" value="${org.eclipse.core.jobs}"/> |
| <filter token="CORE.VERSION" value="${org.eclipse.core.runtime}"/> |
| <filter token="ECF.VERSION" value="${org.eclipse.ecf}"/> |
| <filter token="ECF.FT.VERSION" value="${org.eclipse.ecf.filetransfer}"/> |
| <filter token="ECF.I.VERSION" value="${org.eclipse.ecf.identity}"/> |
| <filter token="ECF.P.FT.VERSION" value="${org.eclipse.ecf.provider.filetransfer}"/> |
| <filter token="ECF.SSL.VERSION" value="${org.eclipse.ecf.ssl}"/> |
| <filter token="EQUINOX.APP.VERSION" value="${org.eclipse.equinox.app}"/> |
| <filter token="EQUINOX.COMMON.VERSION" value="${org.eclipse.equinox.common}"/> |
| <filter token="EQUINOX.FRKA.VERSION" value="${org.eclipse.equinox.frameworkadmin}"/> |
| <filter token="EQUINOX.FRKA.E.VERSION" value="${org.eclipse.equinox.frameworkadmin.equinox}"/> |
| <filter token="P2.A.R.VERSION" value="${org.eclipse.equinox.p2.artifact.repository}"/> |
| <filter token="P2.CONSOLE.VERSION" value="${org.eclipse.equinox.p2.console}"/> |
| <filter token="P2.CORE.VERSION" value="${org.eclipse.equinox.p2.core}"/> |
| <filter token="P2.DIRECTOR.VERSION" value="${org.eclipse.equinox.p2.director}"/> |
| <filter token="P2.ENGINE.VERSION" value="${org.eclipse.equinox.p2.engine}"/> |
| <filter token="P2.GC.VERSION" value="${org.eclipse.equinox.p2.garbagecollector}"/> |
| <filter token="P2.JP.VERSION" value="${org.eclipse.equinox.p2.jarprocessor}"/> |
| <filter token="P2.METADATA.VERSION" value="${org.eclipse.equinox.p2.metadata}"/> |
| <filter token="P2.M.R.VERSION" value="${org.eclipse.equinox.p2.metadata.repository}"/> |
| <filter token="P2.PUBLISHER.VERSION" value="${org.eclipse.equinox.p2.publisher}"/> |
| <filter token="P2.P.E.VERSION" value="${org.eclipse.equinox.p2.publisher.eclipse}"/> |
| <filter token="P2.REPOSITORY.VERSION" value="${org.eclipse.equinox.p2.repository}"/> |
| <filter token="P2.T.E.VERSION" value="${org.eclipse.equinox.p2.touchpoint.eclipse}"/> |
| <filter token="P2.T.N.VERSION" value="${org.eclipse.equinox.p2.touchpoint.natives}"/> |
| <filter token="P2.T.ECF.VERSION" value="${org.eclipse.equinox.p2.transport.ecf}"/> |
| <filter token="EQUINOX.PFRCS.VERSION" value="${org.eclipse.equinox.preferences}"/> |
| <filter token="EQUINOX.REGISTRY.VERSION" value="${org.eclipse.equinox.registry}"/> |
| <filter token="EQUINOX.SECURITY.VERSION" value="${org.eclipse.equinox.security}"/> |
| <filter token="EQUINOX.SC.VERSION" value="${org.eclipse.equinox.simpleconfigurator}"/> |
| <filter token="EQUINOX.SC.M.VERSION" value="${org.eclipse.equinox.simpleconfigurator.manipulator}"/> |
| </filterset> |
| </copy> |
| </target> |
| |
| <target name="publish-p2-repo"> |
| <antcall target="fetch-unzipped-virgo-build-tools"/> |
| |
| <antcall target="p2.generate-inf"> |
| <param name="source" value="${target.dir}/assembly/features"/> |
| </antcall> |
| |
| <property name="p2.products.location" value="${basedir}/publish_resources/products"/> |
| <property name="p2.categories.location" value="${basedir}/publish_resources/categories"/> |
| |
| <antcall target="p2.publish-binary-chmod"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="source" value="${common.resources.location}"/> |
| <param name="chmod.args" value="org.eclipse.virgo.kernel.jmxremote.access.properties@/configuration#600"/> |
| </antcall> |
| <echo message="Published the commons resources to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-binary-chmod"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="source" value="${scripts.location}"/> |
| <param name="chmod.args" value="startup.sh@/bin#755,dmk.sh@/bin#755,checkJava.sh@/bin#755,jconsole.sh@/bin#755,setupClasspath.sh@/bin#755,shutdown.sh@/bin#755"/> |
| </antcall> |
| <echo message="Published the scripts to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-binary"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="source" value="${specific.resources.location}"/> |
| </antcall> |
| <echo message="Published the specific resources to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-bundles-features"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="source" value="${target.dir}/assembly"/> |
| </antcall> |
| <echo message="Published bundles and features to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="product.file.location" value="${p2.products.location}/base/base.product"/> |
| </antcall> |
| <echo message="Published base product to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="product.file.location" value="${p2.products.location}/nano/nano.product"/> |
| </antcall> |
| <echo message="Published nano product to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="product.file.location" value="${p2.products.location}/nano-full/nano-full.product"/> |
| </antcall> |
| <echo message="Published nano-full product to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="product.file.location" value="${p2.products.location}/nano-full-noscripts/nano-full-noscripts.product"/> |
| </antcall> |
| <echo message="Published nano-full-noscripts product to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-category"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="category.file.location" value="${p2.categories.location}/org.eclipse.virgo.categories/category.xml"/> |
| </antcall> |
| <echo message="Published Virgo Add-Ons feature category in the p2 repository" /> |
| </target> |
| |
| <target name="install-packages"> |
| <antcall target="p2.install-virgo-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="destination" value="${package.output.dir}"/> |
| <param name="product.iu" value="nano.product"/> |
| </antcall> |
| <echo message="Installed Virgo Nano for distribution purposes."/> |
| |
| <antcall target="p2.install-virgo-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="destination" value="${package.dir}/${nano-full-package}-${bundle.version}"/> |
| <param name="product.iu" value="nano-full.product"/> |
| </antcall> |
| <echo message="Installed Virgo Nano Full for distribution purposes."/> |
| </target> |
| |
| <target name="prepare-common-resources"> |
| <property name="common.resources" value="${target.dir}/common_resources"/> |
| <ivy:resolve resolveId="copy.path" file="${basedir}/lib-ivy.xml" transitive="true"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${common.resources}/lib/[artifact]_[revision].[ext]" conf="lib" type="jar"/> |
| |
| <mkdir dir="${common.resources}/configuration"/> |
| <mkdir dir="${common.resources}/pickup"/> |
| |
| <copy todir="${common.resources}" failonerror="false"> |
| <fileset dir="${basedir}/resources"/> |
| </copy> |
| |
| <copy todir="${common.resources}/configuration" failonerror="false"> |
| <fileset dir="${basedir}/configuration" excludes="keystore,serviceability.xml"/> |
| </copy> |
| |
| <copy file="${basedir}/configuration/keystore" todir="${common.resources}/configuration" failonerror="false"/> |
| |
| <mkdir dir="${common.resources.location}/binary"/> |
| <zip destfile="${common.resources.location}/binary/nano_common_resources"> |
| <zipfileset dir="${common.resources}"/> |
| </zip> |
| <delete dir="${common.resources}" quiet="true"/> |
| </target> |
| |
| <target name="prepare-specific-resources"> |
| <property name="specific.resources" value="${target.dir}/specific_resources"/> |
| <mkdir dir="${specific.resources}/lib"/> |
| <echo file="${specific.resources}/lib/.version" |
| message="virgo.nano.version=${bundle.version}
"/> |
| <copy todir="${specific.resources}/configuration" failonerror="false"> |
| <fileset dir="${basedir}/configuration"> |
| <include name="serviceability.xml"/> |
| </fileset> |
| </copy> |
| |
| <mkdir dir="${specific.resources.location}/binary"/> |
| <zip destfile="${specific.resources.location}/binary/nano_specific_resources"> |
| <zipfileset dir="${specific.resources}"/> |
| </zip> |
| <delete dir="${specific.resources}" quiet="true"/> |
| </target> |
| |
| <target name="prepare-scripts"> |
| <property name="scripts" value="${target.dir}/scripts"/> |
| <copy todir="${scripts}/bin" failonerror="false"> |
| <fileset dir="${basedir}/bin"/> |
| </copy> |
| |
| <mkdir dir="${scripts.location}/binary"/> |
| <zip destfile="${scripts.location}/binary/scripts"> |
| <zipfileset dir="${scripts}"/> |
| </zip> |
| <delete dir="${scripts}" quiet="true"/> |
| </target> |
| |
| <target name="publish-multiple-nano-packages-build" description="Uploads all Nano zipped packages to build.eclipse.org"> |
| <antcall target="publish-package-build"> |
| <param name="package.output.file" value="${package.output.file}"/> |
| </antcall> |
| <antcall target="publish-package-build"> |
| <param name="package.output.file" value="${artifacts.dir}/${nano-full-package}-${bundle.version}.zip"/> |
| </antcall> |
| </target> |
| |
| <target name="simrel-package" depends="ivy.init"> |
| <delete dir="${package.output.dir}" quiet="true"/> |
| <mkdir dir="${package.output.dir}"/> |
| <property name="common.resources.location" value="${target.dir}/common_resources_zipped"/> |
| <property name="specific.resources.location" value="${target.dir}/specific_resources_zipped"/> |
| <property name="scripts.location" value="${target.dir}/scripts_zipped"/> |
| |
| <antcall target="simrel-common-resources"/> |
| <antcall target="simrel-bundles-and-features"/> |
| <antcall target="simrel-publish-p2-repo"/> |
| </target> |
| |
| <target name="simrel-publish-p2-repo"> |
| <antcall target="fetch-unzipped-virgo-build-tools"/> |
| |
| <property name="p2.products.location" value="${basedir}/publish_resources/products"/> |
| |
| <antcall target="p2.publish-bundles-features"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="source" value="${target.dir}/assembly"/> |
| </antcall> |
| <echo message="Published bundles and features to ${p2.repository.dir}."/> |
| |
| <antcall target="p2.publish-product"> |
| <param name="repository" value="${p2.repository.dir}"/> |
| <param name="product.file.location" value="${p2.products.location}/virgo-nano/virgo-nano.product"/> |
| </antcall> |
| <echo message="Published virgo-nano product to ${p2.repository.dir}."/> |
| </target> |
| |
| <target name="simrel-bundles-and-features"> |
| <!-- Copy the nano kernel artifacts to a prepared for publishing location - a p2 repo will be built around them --> |
| <ivy:resolve resolveId="copy.path" file="${basedir}/nano-ivy.xml" transitive="false"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="nano-runtime" type="jar"/> |
| |
| <ivy:resolve resolveId="copy.path" file="${basedir}/orbit-ivy.xml" transitive="false"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="orbit-runtime" type="jar"/> |
| |
| <ivy:resolve resolveId="copy.path" file="${basedir}/gemini-web-ivy.xml" transitive="false"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/assembly/plugins/[artifact]_[revision].[ext]" conf="gemini-web" type="jar"/> |
| </target> |
| |
| <target name="simrel-common-resources"> |
| <copy todir="${target.dir}/assembly/plugins/org.eclipse.virgo.common.resources_${bundle.version}" failonerror="false"> |
| <fileset dir="${basedir}/publish_resources/org.eclipse.virgo.common.resources"/> |
| <filterset> |
| <filter token="NANO.VERSION" value="${bundle.version}"/> |
| </filterset> |
| </copy> |
| |
| <property name="common.resources" value="${target.dir}/assembly/plugins/org.eclipse.virgo.common.resources_${bundle.version}/root_content"/> |
| |
| <copy todir="${common.resources}/bin" failonerror="false"> |
| <fileset dir="${basedir}/bin"/> |
| </copy> |
| |
| <ivy:resolve resolveId="copy.path" file="${basedir}/lib-ivy.xml" transitive="true"/> |
| <ivy:retrieve resolveId="copy.path" pattern="${common.resources}/lib/[artifact]_[revision].[ext]" conf="lib" type="jar"/> |
| |
| <mkdir dir="${common.resources}/configuration"/> |
| <mkdir dir="${common.resources}/pickup"/> |
| |
| <copy todir="${common.resources}" failonerror="false"> |
| <fileset dir="${basedir}/resources"/> |
| </copy> |
| |
| <copy todir="${common.resources}/configuration" failonerror="false"> |
| <fileset dir="${basedir}/configuration" excludes="keystore,serviceability.xml"/> |
| </copy> |
| |
| <copy file="${basedir}/configuration/keystore" todir="${common.resources}/configuration" failonerror="false"/> |
| |
| <mkdir dir="${common.resources}/lib"/> |
| <echo file="${common.resources}/lib/.version" |
| message="virgo.nano.version=${bundle.version}
"/> |
| <copy todir="${common.resources}/configuration" failonerror="false"> |
| <fileset dir="${basedir}/configuration"> |
| <include name="serviceability.xml"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="publish-multiple-nano-packages-download" description="Uploads all Nano zipped packages to download.eclipse.org"> |
| <antcall target="publish-package-download"> |
| <param name="package.output.file" value="${package.output.file}"/> |
| </antcall> |
| <antcall target="publish-package-download"> |
| <param name="package.output.file" value="${artifacts.dir}/${nano-full-package}-${bundle.version}.zip"/> |
| </antcall> |
| </target> |
| |
| <target name="ci.publish.nightly" description="Publishes nightly repository to download.eclipse.org. Can be executed on Hudson only!"> |
| |
| <delete dir="${nightly.updatesite.dir}"/> |
| |
| <copy toDir="${nightly.updatesite.dir}"> |
| <fileset dir="${p2.repository.dir}"/> |
| </copy> |
| |
| </target> |
| |
| <target name="smoke-test" description="Runs a smoke test on the nano packaged build"> |
| <path id="smoke.test.bundles"> |
| <pathelement location="${basedir}/../org.eclipse.virgo.nano.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> |