| <?xml version="1.0"?> |
| <!-- |
| |
| Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0 which is available at |
| http://www.eclipse.org/legal/epl-2.0, |
| or the Eclipse Distribution License v. 1.0 which is available at |
| http://www.eclipse.org/org/documents/edl-v10.php. |
| |
| SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| |
| --> |
| |
| <!-- |
| Contributors: |
| egwin - initial API and implementation |
| --> |
| |
| <!-- ============================================================================= |
| * General Comments |
| * This buildfile contains: |
| * - targets to generate a p2 repository for eclipselink on the |
| * download site. |
| * - targets to verify generated p2 repository for eclipselink |
| * |
| * It is setup to run by "default" in test mode on a local windows machine. |
| * To use in production, it should be called after overriding with some variables: |
| * - the target repository dir |
| * - the install location of the Eclipse SDK libraries |
| * - the version qualifier of the built bundles to sign and promote to p2 |
| * |
| * The command-line would look something like: |
| * ant -Dp2.SDK.install.dir=${sdk.install.dir} -Dbundle.install.file=${bundle.install.filepath} \ |
| * -Dnosql.install.file=${nosql.install.filepath} -Dversion.qualifier=${version.qualifier} \ |
| * -Dp2.repos.dir=${update.site.base.dir} |
| * |
| * There are some additional parameters that should be added: |
| * - flags to specify if the repos should be overwritten or built upon (would change how the repos is built) |
| * |
| * In addition, it may be useful to call into this build to access the signing target directly: |
| * <antcall target="pack-and-sign"> |
| * <param name="repack" value="-repack" or ""/> - will 'normalize' the jar |
| * <param name="pack" value="-pack" or ""/> - will pack the jars *.jar->*.jar.gz |
| * <param name="target" value="${classes.dir}"/> - can be a zip, jar, or directory |
| * <param name="destination" value="${p2.feature.dir}"/> - can be a zip, jar, dir or url |
| * </antcall> |
| * |
| * |
| * To install just MOXy feature into some Eclipse installation, use: |
| * ant test-p2-site -Dp2.director.destination=<eclipse> \ |
| * -Dp2.director.action="" \ |
| * -Dp2.director.installIU=org.eclipse.persistence.moxy.feature.group |
| * |
| * If behind proxy: |
| * -pass "-Dp2.director.additionalArgs='-pluginCustomization proxy-settings.ini'" |
| * to the build, where the content of that file is: |
| * # Proxy settings |
| * org.eclipse.core.net/proxyData/HTTP/host=<proxyHost> |
| * org.eclipse.core.net/proxyData/HTTPS/host=<proxyHost> |
| * org.eclipse.core.net/proxyData/HTTPS/hasAuth=false |
| * org.eclipse.core.net/proxyData/HTTP/port=<proxyPort> |
| * org.eclipse.core.net/proxyData/HTTPS/port=<proxyPort> |
| * org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true |
| * org.eclipse.core.net/nonProxiedHosts=<nonProxyHost>|localhost|127.0.0.1 |
| * org.eclipse.core.net/systemProxiesEnabled=false |
| * org.eclipse.core.net/proxyData/HTTP/hasAuth=false |
| * |
| *================================================================================= --> |
| <!-- |
| * Ant naming conventions: |
| * - regardless of the actual OS platform,'/' is the directory separator |
| * (Ant will convert as appropriate). |
| * - multi-word properties use periods '.' |
| * - multi-word targets use hyphens '-' |
| * - multi-word macros use underscores '_' |
| * - multi-word macro attributes are concatenated |
| * e.g. 'runpathref' |
| * - multi-word tasks (taskdef) names are concatenated |
| * e.g. 'validateconnection' |
| * - OS environment variables are in ALLCAPS and have 'env' as a prefix |
| * e.g. ${env.XXX}. |
| * - Ant properties are lower case. |
| --> |
| <project name="features" default="build" basedir="."> |
| |
| <available file="../${ant.project.name}" type="dir" property="p2.is.local"/> |
| <!-- Test to make sure that the calling script doesn't inherit the variable --> |
| <!-- (should be set locally, and be destroyed upon return) --> |
| <fail message="Not running from '${ant.project.name}' directory" unless="p2.is.local"/> |
| |
| <target name="init"> |
| <dirname property="feature.build.location_temp" file="${ant.file.features}"/> |
| <pathconvert targetos="unix" property="feature.build.location"> |
| <path> |
| <pathelement location="${feature.build.location_temp}"/> |
| </path> |
| </pathconvert> |
| <property file="${user.home}/build.properties"/> |
| <!-- feature.2.base.dir needs to be explicit (not relative) for antcall usage --> |
| <!-- (I think the selectbundle call reverts to calling dir - despite the antcall "dir=") --> |
| <property name="feature.2.base.dir" value="${feature.build.location}/.."/> |
| <property name="feature.common.dir" value="${feature.build.location}/common"/> |
| <property name="feature.2.buildsys.dir" value="${feature.2.base.dir}/buildsystem"/> |
| <property name="feature.2.common.plugins.dir" value="${feature.2.base.dir}/plugins"/> |
| <property name="feature.2.jpa.plugins.dir" value="${feature.2.base.dir}/jpa/plugins"/> |
| <property name="feature.2.sdo.plugins.dir" value="${feature.2.base.dir}/sdo/plugins"/> |
| <property name="feature.2.util.plugins.dir" value="${feature.2.base.dir}/utils/plugins"/> |
| <property name="local.p2.repo.dir" value="${feature.2.buildsys.dir}/compdeps/org.eclipse.persistence.compdeps.p2repo/target/repository/plugins"/> |
| <echo message="ant.project.name ='${ant.project.name}'"/> |
| <echo message="basedir ='${basedir}'"/> |
| <echo message="feature.build.location ='${feature.build.location}'"/> |
| <echo message="feature.2.base.dir ='${feature.2.base.dir}'"/> |
| <echo message="feature.common.dir ='${feature.common.dir}'"/> |
| <echo message="feature.2.buildsys.dir ='${feature.2.buildsys.dir}'"/> |
| <echo message="feature.2.common.plugins.dir='${feature.2.common.plugins.dir}'"/> |
| <echo message="feature.2.jpa.plugins.dir ='${feature.2.jpa.plugins.dir}'"/> |
| <echo message="feature.2.sdo.plugins.dir ='${feature.2.sdo.plugins.dir}'"/> |
| <echo message="feature.2.util.plugins.dir ='${feature.2.util.plugins.dir}'"/> |
| <echo message="local.p2.repo.dir ='${local.p2.repo.dir}'"/> |
| <echo message=" ---"/> |
| |
| <!-- Custom task definitions --> |
| <property name="custom.tasks.lib" value="${feature.2.buildsys.dir}/ant_customizations.jar"/> |
| <property name="custom.echo.task.class" value="org.eclipse.persistence.buildtools.ant.taskdefs.Say"/> |
| <property name="custom.selectbundle.task.class" value="org.eclipse.persistence.buildtools.ant.taskdefs.SelectBundle"/> |
| <echo message="custom.tasks.lib ='${custom.tasks.lib}'"/> |
| <echo message="custom.echo.task.class ='${custom.echo.task.class}'"/> |
| <echo message="custom.selectbundle.task.class ='${custom.selectbundle.task.class}'"/> |
| <echo message=" ---"/> |
| <taskdef name="say" classname="${custom.echo.task.class}" classpath="${custom.tasks.lib}"/> |
| <taskdef name="selectbundle" classname="${custom.selectbundle.task.class}" classpath="${custom.tasks.lib}"/> |
| |
| <!-- Defaults of Pre-Set variables --> |
| <property name="release.version" value="3.0.0"/> |
| <property name="version.qualifier" value="qualifier"/> |
| <property name="version.string" value="${release.version}.${version.qualifier}"/> |
| <property name="eclipselink.install.prefix" value="eclipselink"/> |
| <property name="eclipselink.plugins.install.prefix" value="eclipselink-plugins"/> |
| <property name="eclipselink.nosql.install.prefix" value="eclipselink-plugins-nosql"/> |
| <property name="eclipselink.zip.suffix" value=".zip"/> |
| <property name="classes.dir" value="classes"/> |
| <property name="specification.vendor" value="Eclipse.org - EclipseLink Project"/> |
| <property name="p2.archive.presigned.zip" value="${eclipselink.install.prefix}-P2-${version.string}${eclipselink.zip.suffix}"/> |
| <property name="build.id" value="${release.version}"/> |
| <echo message="release.version ='${release.version}'"/> |
| <echo message="version.qualifier ='${version.qualifier}'"/> |
| <echo message="version.string ='${version.string}'"/> |
| <echo message="eclipselink.install.prefix ='${eclipselink.install.prefix}'"/> |
| <echo message="eclipselink.plugins.install.prefix='${eclipselink.plugins.install.prefix}'"/> |
| <echo message="eclipselink.nosql.install.prefix ='${eclipselink.nosql.install.prefix}'"/> |
| <echo message="eclipselink.zip.suffix ='${eclipselink.zip.suffix}'"/> |
| <echo message="classes.dir ='${classes.dir}'"/> |
| <echo message="specification.vendor ='${specification.vendor}'"/> |
| <echo message="p2.archive.presigned.zip ='${p2.archive.presigned.zip}'"/> |
| <echo message="build.id ='${build.id}'"/> |
| <echo message=" ---"/> |
| |
| <!-- Helper definitions derived from Pre-set variables --> |
| <property name="feature.build.dir" value="${classes.dir}/features"/> |
| <property name="bundle.working.dir" value="${classes.dir}/plugins"/> |
| <echo message="feature.build.dir ='${feature.build.dir}'"/> |
| <echo message="bundle.working.dir ='${bundle.working.dir}'"/> |
| <echo message=" ---"/> |
| |
| <!-- Tool definitions --> |
| <property name="p2.SDK.install.dir" value="${eclipse.install.dir}"/> |
| <property name="p2.SDK.plugin.dir" value="${p2.SDK.install.dir}/plugins"/> |
| <property name="p2.publisher.jar" value="org.eclipse.equinox.p2.publisher_*.jar"/> |
| <property name="p2.launcher.jar" value="org.eclipse.equinox.launcher_*.jar"/> |
| <property name="p2.artifact.jar" value="org.eclipse.equinox.artifact.repository_*.jar"/> |
| <property name="signing.script" value="dir"/> |
| <property name="signing.dir" value="${classes.dir}"/> |
| <available file="${p2.SDK.plugin.dir}" property="sdk.install.exist"/> |
| <echo message="p2.SDK.install.dir ='${p2.SDK.install.dir}'"/> |
| <say message="p2.SDK.plugin.dir ='${p2.SDK.plugin.dir}'" if="sdk.install.exist"/> |
| <say message="p2.SDK.plugin.dir: '${p2.SDK.plugin.dir}' not found!" unless="sdk.install.exist"/> |
| <echo message="p2.publisher.jar ='${p2.publisher.jar}'"/> |
| <echo message="p2.launcher.jar ='${p2.launcher.jar}'"/> |
| <echo message="p2.artifact.jar ='${p2.artifact.jar}'"/> |
| <echo message="signing.script ='${signing.script}'"/> |
| <echo message="signing.dir ='${signing.dir}'"/> |
| <echo message=" ---"/> |
| |
| <!-- Input definitions --> |
| <property name="p2.composite.home.dir" value="${basedir}/p2site/__EL-CompositeRepositoryTest2Site"/> |
| <condition property="p2.repos.dir" value="${p2.composite.home.dir}/${version.string}" |
| else="${basedir}/p2site/__EL-RepositorySite"> |
| <isset property="do.composite"/> |
| </condition> |
| <property name="p2.mirror.dir" value="${basedir}/p2site/__EL-MirroredRepoSite"/> |
| <property name="p2.feature.dir" value="${p2.repos.dir}/features"/> |
| <property name="p2.bundle.dir" value="${p2.repos.dir}/plugins"/> |
| <condition property="bundle.install.file" value="${feature.2.base.dir}/${eclipselink.plugins.install.prefix}-${version.string}${eclipselink.zip.suffix}" |
| else="${feature.2.base.dir}/${eclipselink.plugins.install.prefix}${eclipselink.zip.suffix}"> |
| <available file="${feature.2.base.dir}/${eclipselink.plugins.install.prefix}-${version.string}${eclipselink.zip.suffix}"/> |
| </condition> |
| <condition property="nosql.install.file" value="${feature.2.base.dir}/${eclipselink.nosql.install.prefix}-${version.string}${eclipselink.zip.suffix}" |
| else="${feature.2.base.dir}/${eclipselink.nosql.install.prefix}${eclipselink.zip.suffix}"> |
| <available file="${feature.2.base.dir}/${eclipselink.nosql.install.prefix}-${version.string}${eclipselink.zip.suffix}"/> |
| </condition> |
| <property name="site.dir" value="${feature.build.location}/${classes.dir}"/> |
| <property name="site.dir.url" value="file:${site.dir}"/> |
| <property name="site.url" value="${site.dir.url}/site.xml"/> |
| <available file="${bundle.install.file}" property="bundle.installer.exist"/> |
| <available file="${nosql.install.file}" property="nosql.installer.exist"/> |
| <echo message="p2.composite.home.dir ='${p2.composite.home.dir}'"/> |
| <echo message="p2.repos.dir ='${p2.repos.dir}'"/> |
| <echo message="p2.mirror.dir ='${p2.mirror.dir}'"/> |
| <echo message="p2.feature.dir ='${p2.feature.dir}'"/> |
| <echo message="p2.bundle.dir ='${p2.bundle.dir}'"/> |
| <say message="bundle.install.file ='${bundle.install.file}'" if="bundle.installer.exist"/> |
| <say message="bundle.install.file: '${bundle.install.file}' not found!" unless="bundle.installer.exist"/> |
| <say message="nosql.install.file ='${nosql.install.file}'" if="nosql.installer.exist"/> |
| <say message="nosql.install.file: '${nosql.install.file}' not found!" unless="nosql.installer.exist"/> |
| <echo message="site.dir ='${site.dir}'"/> |
| <echo message="site.dir.url ='${site.dir.url}'"/> |
| <echo message="site.url ='${site.url}'"/> |
| <echo message=" ---"/> |
| |
| <!-- Output definitions --> |
| <property name="p2.repos.url" value="file:/${p2.repos.dir}"/> <!-- DO NOT Override this one --> |
| <property name="p2.mirror.url" value="file:/${p2.mirror.dir}"/> <!-- DO NOT Override this one --> |
| <property name="p2.release.repos.name" value="EclipseLink Repository"/> |
| <property name="p2.milestone.repos.name" value="EclipseLink Milestone Repository"/> |
| <property name="p2.nightly.repos.name" value="EclipseLink Nightly Build Repository"/> |
| <property name="p2.release.repos.url" value="http://download.eclipse.org/rt/eclipselink/updates"/> |
| <property name="p2.milestone.repos.url" value="http://download.eclipse.org/rt/eclipselink/incremental-updates/milestone"/> |
| <property name="p2.nightly.repos.url" value="http://download.eclipse.org/rt/eclipselink/incremental-updates/nightly"/> |
| <property name="metadata.repos.name" value=""${p2.release.repos.name}""/> |
| <property name="artifact.repos.name" value=""EclipseLink Artifacts""/> |
| <echo message="p2.repos.url ='${p2.repos.url}'"/> |
| <echo message="p2.mirror.url ='${p2.mirror.url}'"/> |
| <echo message="p2.release.repos.name ='${p2.release.repos.name}'"/> |
| <echo message="p2.milestone.repos.name ='${p2.milestone.repos.name}'"/> |
| <echo message="p2.nightly.repos.name ='${p2.nightly.repos.name}'"/> |
| <echo message="p2.release.repos.url ='${p2.release.repos.url}'"/> |
| <echo message="p2.milestone.repos.url ='${p2.milestone.repos.url}'"/> |
| <echo message="p2.nightly.repos.url ='${p2.nightly.repos.url}'"/> |
| <echo message="metadata.repos.name ='${metadata.repos.name}'"/> |
| <echo message="artifact.repos.name ='${artifact.repos.name}'"/> |
| |
| <!-- Feature Dependency variables --> |
| <!-- Defaults, set var in ${user.home}/build.properties if different version required --> |
| <property name="sdo.prefix" value="commonj.sdo"/> |
| <property name="sdo.criteria" value="[2.1.1,2.2.0)"/> |
| <property name="mail.prefix" value="com.sun.mail.jakarta.mail"/> |
| <property name="mail.criteria" value="(1.6.2,2.0.0)"/> |
| <property name="persistence.prefix" value="jakarta.persistence"/> |
| <property name="persistence.criteria" value="[2.0.100,2.3.0)"/> |
| <property name="resource.prefix" value="jakarta.resource-api"/> |
| <property name="resource.criteria" value="(1.7.2,2.0.0)"/> |
| <property name="servlet.prefix" value="jakarta.servlet-api"/> |
| <property name="servlet.criteria" value="(3.99.99,5.0.0)"/> |
| <property name="wsdl.prefix" value="javax.wsdl"/> |
| <property name="wsdl.criteria" value="[1.0,9.0)"/> |
| <property name="jaxrs.prefix" value="jakarta.ws.rs-api"/> |
| <property name="jaxrs.criteria" value="(2.1.2,3.0.0)"/> |
| <property name="xml.bind.prefix" value="jakarta.xml.bind-api"/> |
| <property name="xml.bind.criteria" value="(2.3.1,3.0.0)"/> |
| <property name="sun.xml.bind.prefix" value="com.sun.xml.bind.jaxb-osgi"/> |
| <property name="sun.xml.bind.criteria" value="(2.3.1,5.0.0)"/> |
| <property name="org.glassfish.corba.orb.prefix" value="org.glassfish.corba.glassfish-corba-orb"/> |
| <property name="org.glassfish.corba.csiv2.prefix" value="org.glassfish.corba.glassfish-corba-csiv2-idl"/> |
| <property name="org.glassfish.corba.iapi.prefix" value="org.glassfish.corba.glassfish-corba-internal-api"/> |
| <property name="org.glassfish.corba.omgapi.prefix" value="org.glassfish.corba.glassfish-corba-omgapi"/> |
| <property name="org.glassfish.corba.eap.prefix" value="org.glassfish.corba.exception-annotation-processor"/> |
| <property name="org.glassfish.corba.criteria" value="[4.0.0,5.0.0)"/> |
| <property name="org.osgi.core.prefix" value="org.osgi.core"/> |
| <property name="org.osgi.core.criteria" value="[1.1.0,2.0.0)"/> |
| <property name="gmbal.api.prefix" value="gmbal-api-only"/> |
| <property name="gmbal.api.criteria" value="[3.1.0,4.0.0)"/> |
| <property name="gmbal.gf.prefix" value="org.glassfish.gmbal.gmbal"/> |
| <property name="gmbal.gf.criteria" value="[4.0.0,5.0.0)"/> |
| <property name="org.glassfish.pfl.basic.prefix" value="org.glassfish.pfl.pfl-basic"/> |
| <property name="org.glassfish.pfl.basic.tools.prefix" value="org.glassfish.pfl.pfl-basic-tools"/> |
| <property name="org.glassfish.pfl.dynamic.prefix" value="org.glassfish.pfl.pfl-dynamic"/> |
| <property name="org.glassfish.pfl.test.prefix" value="org.glassfish.pfl.pfl-test"/> |
| <property name="org.glassfish.pfl.tf.prefix" value="org.glassfish.pfl.pfl-tf"/> |
| <property name="org.glassfish.pfl.asm.prefix" value="org.glassfish.pfl.pfl-asm"/> |
| <property name="org.glassfish.pfl.criteria" value="[4.0.0,5.0.0)"/> |
| <property name="management.api.prefix" value="management-api"/> |
| <property name="management.api.criteria" value="[3.0.0,4.0.0)"/> |
| <property name="mongodb.prefix" value="org.mongodb.mongo-java-driver"/> |
| <property name="mongodb.criteria" value="[2.0.0,9.0.0)"/> |
| <property name="json.prefix" value="org.glassfish.jakarta.json"/> |
| <property name="json.criteria" value="(1.1.4,5.0.0)"/> |
| <!-- Export jdk.unsupported module. --> |
| <property name="sun-misc.prefix" value="org.eclipse.persistence.sun-misc"/> |
| <property name="sun-misc.criteria" value="[3.0,4.0)"/> |
| <!-- For EclipseLink bundles --> |
| <property name="asm.prefix" value="org.eclipse.persistence.asm"/> |
| <property name="asm.criteria" value="[3.0,9.0)"/> |
| <property name="hermes.prefix" value="org.eclipse.persistence.jpa.jpql"/> |
| <property name="hermes.criteria" value="[1.0,9.0)"/> |
| <property name="oracleddl.prefix" value="org.eclipse.persistence.oracleddlparser"/> |
| <property name="oracleddl.criteria" value="[1.0,9.0)"/> |
| <property name="oracle.prefix" value="org.eclipse.persistence.oracle"/> |
| <property name="oracle.criteria" value="[1.0,9.0)"/> |
| <property name="oraclenosql.prefix" value="org.eclipse.persistence.oracle.nosql"/> |
| <property name="oraclenosql.criteria" value="[1.0,9.0)"/> |
| </target> |
| |
| <!-- Need to copy only the bundles that will be in the features into the "p2.repos.dir/plugins" dir |
| (so must copy from main plugins to new temp location). Also need to filter copy the feature xml |
| files to "p2.repos.dir/features" to substitute the actual version.qualifer string into it. |
| Then can Generate P2. --> |
| <target name="build" depends="init, build-features, build-p2"/> |
| <target name="build-p2" depends="create-sign-zipfile, clear-p2-loc, assemble-repos"/> |
| <target name="build-features-sign-jars-wait" depends="init, build-features, sign-jars, retrieve-signed-archive"/> |
| <target name="test-repos" depends="populate-p2-site, publish-p2-repos, test-p2-site"/> |
| <!-- ** DO NOT ALTER LIGHTLY ** - Needed by automated process --> |
| <target name="build-features-create-signzip" depends="init, build-features, create-sign-zipfile"/> |
| <target name="build-features" depends="clean, create-deployable-features"/> |
| <target name="sign-jars" depends="copy-and-queue-for-sign, retrieve-signed-archive"/> |
| <target name="assemble-repos" depends="populate-p2-site, publish-p2-repos"/> |
| <!-- End ** DO NOT ALTER LIGHTLY ** Block --> |
| |
| <!-- Feature Targets --> |
| <!-- clean --> |
| <target name="clean" depends="init" description="Clean all generated content"> |
| <delete dir="${classes.dir}" includeEmptyDirs="true" failonerror="false"/> |
| </target> |
| |
| <!-- build feature jars --> |
| <target name="jar-feature" description="General target for packaging a feature"> |
| <jar jarfile="${feature.build.dir}/${feature.name}_${version.string}.jar" duplicate="preserve"> |
| <fileset dir="${feature.common.dir}"> |
| <include name="*.html"/> |
| </fileset> |
| <fileset dir="${feature.2.base.dir}"> |
| <include name="about.html"/> |
| <include name="readme.html"/> |
| </fileset> |
| <fileset dir="${classes.dir}/${feature.name}"> |
| <include name="*.*"/> |
| </fileset> |
| </jar> |
| </target> |
| |
| <target name="resolve-feature-dependencies" depends="init"> |
| <selectbundle basename="${sdo.prefix}" directory="${feature.2.sdo.plugins.dir}" |
| criterion="${sdo.criteria}" property="sdo.version" versiononly="true" |
| /> |
| <selectbundle basename="${mail.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${mail.criteria}" property="mail.version" versiononly="true" |
| /> |
| <selectbundle basename="${persistence.prefix}" directory="${feature.2.jpa.plugins.dir}" |
| criterion="${persistence.criteria}" property="persistence.version" versiononly="true" |
| /> |
| <selectbundle basename="${resource.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${resource.criteria}" property="resource.version" versiononly="true" |
| /> |
| <selectbundle basename="${servlet.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${servlet.criteria}" property="servlet.version" versiononly="true" |
| /> |
| <selectbundle basename="${xml.bind.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${xml.bind.criteria}" property="xml.bind.version" versiononly="true" |
| /> |
| <selectbundle basename="${sun.xml.bind.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${sun.xml.bind.criteria}" property="sun.xml.bind.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.orb.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.orb.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.csiv2.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.csiv2.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.iapi.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.iapi.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.omgapi.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.omgapi.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.eap.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.eap.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.osgi.core.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.osgi.core.criteria}" property="org.osgi.core.version" versiononly="true" |
| /> |
| <selectbundle basename="${gmbal.api.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${gmbal.api.criteria}" property="gmbal.api.version" versiononly="true" |
| /> |
| <selectbundle basename="${gmbal.gf.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${gmbal.gf.criteria}" property="gmbal.gf.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.basic.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.basic.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.basic.tools.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.basic.tools.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.dynamic.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.dynamic.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.test.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.test.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.tf.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.tf.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.pfl.asm.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.pfl.criteria}" property="org.glassfish.pfl.asm.version" versiononly="true" |
| /> |
| <selectbundle basename="${management.api.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${management.api.criteria}" property="management.api.version" versiononly="true" |
| /> |
| <selectbundle basename="${org.glassfish.corba.orb.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${org.glassfish.corba.criteria}" property="org.glassfish.corba.version" versiononly="true" |
| /> |
| <selectbundle basename="${mongodb.prefix}" directory="${feature.2.common.plugins.dir}" |
| criterion="${mongodb.criteria}" property="mongodb.version" versiononly="true" |
| /> |
| <selectbundle basename="${jaxrs.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${jaxrs.criteria}" property="jaxrs.version" versiononly="true" |
| /> |
| <selectbundle basename="${sun-misc.prefix}" directory="${compdeps.2.common.plugins.dir}" |
| criterion="${sun-misc.criteria}" property="sun-misc.version" versiononly="true" |
| /> |
| <selectbundle basename="${asm.prefix}" directory="${feature.2.common.plugins.dir}" |
| criterion="${asm.criteria}" property="asm.version" versiononly="true" |
| /> |
| <selectbundle basename="${hermes.prefix}" directory="${feature.2.common.plugins.dir}" |
| criterion="${hermes.criteria}" property="hermes.version" versiononly="true" |
| /> |
| <selectbundle basename="${oracleddl.prefix}" directory="${feature.2.util.plugins.dir}" |
| criterion="${oracleddl.criteria}" property="oracleddl.version" versiononly="true" |
| /> |
| <selectbundle basename="${oracle.prefix}" directory="${feature.2.common.plugins.dir}" |
| criterion="${oracle.criteria}" property="oracle.version" versiononly="true" |
| /> |
| <selectbundle basename="${oraclenosql.prefix}" directory="${feature.2.common.plugins.dir}" |
| criterion="${oraclenosql.criteria}" property="oraclenosql.version" versiononly="true" |
| /> |
| <selectbundle basename="${wsdl.prefix}" directory="${feature.2.util.plugins.dir}" |
| criterion="${wsdl.criteria}" property="wsdl.version" versiononly="true" |
| /> |
| <selectbundle basename="${json.prefix}" directory="${local.p2.repo.dir}" |
| criterion="${json.criteria}" property="json.version" versiononly="true" |
| /> |
| <echo message="Searching ${feature.2.util.plugins.dir}..."/> |
| <say message=" oracleddl.version = '${oracleddl.version}'" if="oracleddl.version"/> |
| <say message=" '${oracleddl.prefix}_${oracleddl.criteria}.jar' not found! Generated features will be invalid." unless="oracleddl.version"/> |
| <say message=" wsdl.version = '${wsdl.version}'" if="wsdl.version"/> |
| <say message=" '${wsdl.prefix}_${wsdl.criteria}.jar' not found! Generated features will be invalid." unless="wsdl.version"/> |
| <echo message="Searching ${feature.2.sdo.plugins.dir}..."/> |
| <say message=" sdo.version = '${sdo.version}'" if="sdo.version"/> |
| <say message=" '${sdo.prefix}_${sdo.criteria}.jar' not found! Generated features will be invalid." unless="sdo.version"/> |
| <echo message="Searching ${feature.2.jpa.plugins.dir}..."/> |
| <say message=" persistence.version = '${persistence.version}'" if="persistence.version"/> |
| <say message=" '${persistence.prefix}_${persistence.criteria}.jar' not found! Generated features will be invalid." unless="persistence.version"/> |
| <echo message="Searching ${feature.2.common.plugins.dir}..."/> |
| <say message=" mail.version = '${mail.version}'" if="mail.version"/> |
| <say message=" '${mail.prefix}_${mail.criteria}.jar' not found! Generated features will be invalid." unless="mail.version"/> |
| <say message=" resource.version = '${resource.version}'" if="resource.version"/> |
| <say message=" '${resource.prefix}_${resource.criteria}.jar' not found! Generated features will be invalid." unless="resource.version"/> |
| <say message=" servlet.version = '${servlet.version}'" if="servlet.version"/> |
| <say message=" '${servlet.prefix}_${servlet.criteria}.jar' not found! Generated features will be invalid." unless="servlet.version"/> |
| <say message=" xml.bind.version = '${xml.bind.version}'" if="xml.bind.version"/> |
| <say message=" '${xml.bind.prefix}_${xml.bind.criteria}.jar' not found! Generated features will be invalid." unless="xml.bind.version"/> |
| <say message=" sun.xml.bind.version = '${sun.xml.bind.version}'" if="sun.xml.bind.version"/> |
| <say message=" '${sun.xml.bind.prefix}_${sun.xml.bind.criteria}.jar' not found! Generated features will be invalid." unless="sun.xml.bind.version"/> |
| <say message=" org.glassfish.corba.orb.version = '${org.glassfish.corba.orb.version}'" if="org.glassfish.corba.orb.version"/> |
| <say message=" '${org.glassfish.corba.orb.prefix}_${org.glassfish.corba.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.corba.orb.version"/> |
| <say message=" org.glassfish.corba.csiv2.version = '${org.glassfish.corba.csiv2.version}'" if="org.glassfish.corba.csiv2.version"/> |
| <say message=" '${org.glassfish.corba.csiv2.prefix}_${org.glassfish.corba.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.corba.csiv2.version"/> |
| <say message=" org.glassfish.corba.iapi.version = '${org.glassfish.corba.iapi.version}'" if="org.glassfish.corba.iapi.version"/> |
| <say message=" '${org.glassfish.corba.iapi.prefix}_${org.glassfish.corba.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.corba.iapi.version"/> |
| <say message=" org.glassfish.corba.omgapi.version = '${org.glassfish.corba.omgapi.version}'" if="org.glassfish.corba.omgapi.version"/> |
| <say message=" '${org.glassfish.corba.omgapi.prefix}_${org.glassfish.corba.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.corba.omgapi.version"/> |
| <say message=" org.glassfish.corba.eap.version = '${org.glassfish.corba.eap.version}'" if="org.glassfish.corba.eap.version"/> |
| <say message=" '${org.glassfish.corba.eap.prefix}_${org.glassfish.corba.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.corba.eap.version"/> |
| <say message=" org.osgi.core.version = '${org.osgi.core.version}'" if="org.osgi.core.version"/> |
| <say message=" '${org.osgi.core.prefix}_${org.osgi.core.criteria}.jar' not found! Generated features will be invalid." unless="org.osgi.core.version"/> |
| <say message=" gmbal.api.version = '${gmbal.api.version}'" if="gmbal.api.version"/> |
| <say message=" '${gmbal.api.prefix}_${gmbal.api.criteria}.jar' not found! Generated features will be invalid." unless="gmbal.api.version"/> |
| <say message=" gmbal.gf.version = '${gmbal.gf.version}'" if="gmbal.gf.version"/> |
| <say message=" '${gmbal.gf.prefix}_${gmbal.gf.criteria}.jar' not found! Generated features will be invalid." unless="gmbal.gf.version"/> |
| <say message=" org.glassfish.pfl.basic.version = '${org.glassfish.pfl.basic.version}'" if="org.glassfish.pfl.basic.version"/> |
| <say message=" '${org.glassfish.pfl.basic.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.basic.version"/> |
| <say message=" org.glassfish.pfl.basic.tools.version = '${org.glassfish.pfl.basic.tools.version}'" if="org.glassfish.pfl.basic.tools.version"/> |
| <say message=" '${org.glassfish.pfl.basic.tools.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.basic.tools.version"/> |
| <say message=" org.glassfish.pfl.dynamic.version = '${org.glassfish.pfl.dynamic.version}'" if="org.glassfish.pfl.dynamic.version"/> |
| <say message=" '${org.glassfish.pfl.dynamic.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.dynamic.version"/> |
| <say message=" org.glassfish.pfl.test.version = '${org.glassfish.pfl.test.version}'" if="org.glassfish.pfl.test.version"/> |
| <say message=" '${org.glassfish.pfl.test.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.test.version"/> |
| <say message=" org.glassfish.pfl.tf.version = '${org.glassfish.pfl.tf.version}'" if="org.glassfish.pfl.tf.version"/> |
| <say message=" '${org.glassfish.pfl.tf.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.tf.version"/> |
| <say message=" org.glassfish.pfl.asm.version = '${org.glassfish.pfl.asm.version}'" if="org.glassfish.pfl.asm.version"/> |
| <say message=" '${org.glassfish.pfl.asm.prefix}_${org.glassfish.pfl.criteria}.jar' not found! Generated features will be invalid." unless="org.glassfish.pfl.asm.version"/> |
| <say message=" management.api.version = '${management.api.version}'" if="management.api.version"/> |
| <say message=" '${management.api.prefix}_${management.api.criteria}.jar' not found! Generated features will be invalid." unless="management.api.version"/> |
| <say message=" mongodb.version = '${mongodb.version}'" if="mongodb.version"/> |
| <say message=" '${mongodb.prefix}_${mongodb.criteria}.jar' not found! Generated features will be invalid." unless="mongodb.version"/> |
| <say message=" jaxrs.version = '${jaxrs.version}'" if="jaxrs.version"/> |
| <say message=" '${jaxrs.prefix}_${jaxrs.criteria}.jar' not found! Generated features will be invalid." unless="jaxrs.version"/> |
| <say message=" sun-misc.version = '${sun-misc.version}'" if="sun-misc.version"/> |
| <say message=" '${sun-misc.prefix}_${sun-misc.criteria}.jar' not found! Generated features will be invalid." unless="sun-misc.version"/> |
| <say message=" asm.version = '${asm.version}'" if="asm.version"/> |
| <say message=" '${asm.prefix}_${asm.criteria}.jar' not found! Generated features will be invalid." unless="asm.version"/> |
| <say message=" hermes.version = '${hermes.version}'" if="hermes.version"/> |
| <say message=" '${hermes.prefix}_${hermes.criteria}.jar' not found! Generated features will be invalid." unless="hermes.version"/> |
| <say message=" oracle.version = '${oracle.version}'" if="oracle.version"/> |
| <say message=" '${oracle.prefix}_${oracle.criteria}.jar' not found! Generated features will be invalid." unless="oracle.version"/> |
| <say message=" oraclenosql.version = '${oraclenosql.version}'" if="oraclenosql.version"/> |
| <say message=" '${oraclenosql.prefix}_${oraclenosql.criteria}.jar' not found! Generated features will be invalid." unless="oraclenosql.version"/> |
| <say message=" json.version = '${json.version}'" if="json.version"/> |
| <say message=" '${json.prefix}_${json.criteria}.jar' not found! Generated features will be invalid." unless="json.version"/> |
| </target> |
| |
| <target name="create-deployable-features" depends="resolve-feature-dependencies"> |
| <mkdir dir="${classes.dir}"/> |
| <mkdir dir="${feature.build.dir}"/> |
| <!-- Filters for feature.xml files --> |
| <filter token="VERSION" value="${release.version}"/> |
| <filter token="QUALIFIER" value="${version.qualifier}"/> |
| <!-- Filters for dependencies in feature.xml files --> |
| <filter token="SDO_VERSION" value="${sdo.version}"/> |
| <filter token="MAIL_VERSION" value="${mail.version}"/> |
| <filter token="PERSISTENCE_VERSION" value="${persistence.version}"/> |
| <filter token="SERVLET_VERSION" value="${servlet.version}"/> |
| <filter token="RESOURCE_VERSION" value="${resource.version}"/> |
| <filter token="WSDL_VERSION" value="${wsdl.version}"/> |
| <filter token="JAXRS_VERSION" value="${jaxrs.version}"/> |
| <filter token="XMLBIND_VERSION" value="${xml.bind.version}"/> |
| <filter token="XJC_VERSION" value="${sun.tools.xjc.version}"/> |
| <filter token="JAXB_CORE_VERSION" value="${sun.xml.bind.version}"/> |
| <filter token="GF_CORBA_ORB_VERSION" value="${org.glassfish.corba.orb.version}"/> |
| <filter token="GF_CORBA_CSIV2_VERSION" value="${org.glassfish.corba.csiv2.version}"/> |
| <filter token="GF_CORBA_IAPI_VERSION" value="${org.glassfish.corba.iapi.version}"/> |
| <filter token="GF_CORBA_OMGAPI_VERSION" value="${org.glassfish.corba.omgapi.version}"/> |
| <filter token="GF_CORBA_EAP_VERSION" value="${org.glassfish.corba.eap.version}"/> |
| <filter token="ORG_OSGI_CORE_VERSION" value="${org.osgi.core.version}"/> |
| <filter token="GMBAL_API_VERSION" value="${gmbal.api.version}"/> |
| <filter token="GMBAL_GF_VERSION" value="${gmbal.gf.version}"/> |
| <filter token="PFL_BASIC_VERSION" value="${org.glassfish.pfl.basic.version}"/> |
| <filter token="PFL_BASIC_TOOLS_VERSION" value="${org.glassfish.pfl.basic.tools.version}"/> |
| <filter token="PFL_DYNAMIC_VERSION" value="${org.glassfish.pfl.dynamic.version}"/> |
| <filter token="PFL_TEST_VERSION" value="${org.glassfish.pfl.test.version}"/> |
| <filter token="PFL_TF_VERSION" value="${org.glassfish.pfl.tf.version}"/> |
| <filter token="PFL_ASM_VERSION" value="${org.glassfish.pfl.asm.version}"/> |
| <filter token="MNGMT_API_VERSION" value="${management.api.version}"/> |
| <filter token="MONGODB_VERSION" value="${mongodb.version}"/> |
| <filter token="JSON_VERSION" value="${json.version}"/> |
| <!-- Filter for jdk.unsupported module export bundle in feature.xml files. --> |
| <filter token="SUN_MISC_VERSION" value="${sun-misc.version}"/> |
| <!-- Filters for product bundles in feature.xml files --> |
| <filter token="ASM_VERSION" value="${asm.version}"/> |
| <filter token="HERMES_VERSION" value="${hermes.version}"/> |
| <filter token="ORACLEDDL_VERSION" value="${oracleddl.version}"/> |
| <filter token="ORACLE_VERSION" value="${oracle.version}"/> |
| <filter token="ORACLENOSQL_VERSION" value="${oraclenosql.version}"/> |
| <!-- Filters for feature.properties files --> |
| <filter token="PROVIDER" value="${specification.vendor}"/> |
| <filter token="REPOS_NAME" value="${p2.release.repos.name}"/> |
| <filter token="MILESTONE_REPOS" value="${p2.milestone.repos.name}"/> |
| <filter token="PRIME_UPDATE_URL" value="${p2.release.repos.url}"/> <!-- should be helios update? --> |
| <filter token="SECOND_UPDATE_URL" value="${p2.milestone.repos.url}"/> <!-- should be eclipselink release p2? --> |
| <copy todir="${classes.dir}" filtering="true"> |
| <fileset dir="${feature.build.location}"> |
| <include name="**/feature*.*"/> |
| </fileset> |
| </copy> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.dbws"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.dbwsbuilder"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.jpa"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.nosql"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.moxy"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.sdo"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.dbws.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.dbwsbuilder.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.jpa.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.nosql.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.moxy.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.sdo.source"/> |
| </antcall> |
| <antcall target="jar-feature"> |
| <param name="feature.name" value="org.eclipse.persistence.sdk"/> |
| </antcall> |
| </target> |
| |
| <!-- Signing targets --> |
| <target name="create-eclipselink-buildfile"> |
| <echo message="update eclipselink.build for Galileo, and place in features dir for later check-in."/> |
| <filter token="VERSION" value="${release.version}"/> |
| <filter token="QUALIFIER" value="${version.qualifier}"/> |
| <copy todir="${classes.dir}" filtering="true"> |
| <fileset dir="${feature.2.base.dir}/buildsystem"> |
| <include name="eclipselink.build"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="create-sign-zipfile" depends="create-eclipselink-buildfile"> |
| <delete failonerror="false"> |
| <fileset dir="." includes="${eclipselink.install.prefix}-P2-*.zip"/> |
| </delete> |
| <zip destfile="${p2.archive.presigned.zip}"> |
| <!-- Removed based on decision not to sign non-Galileo artifacts due to signing issues - 5/20/09 --> |
| <!-- zipfileset dir="${feature.2.base.dir}" includes="eclipselink*.jar"/ --> |
| <zipfileset dir="${classes.dir}" includes="eclipselink.build"/> |
| <!-- Removed based on decision to have different repos names, by build type - 5/26/09 --> |
| <!-- zipfileset dir="${classes.dir}" includes="site.xml"/ --> |
| <zipfileset dir="${feature.build.dir}" prefix="features" includes="*.jar"/> |
| <zipfileset dir="${feature.2.common.plugins.dir}" prefix="plugins" includes="org.eclipse.persistence*.jar"/> |
| <zipfileset dir="${feature.2.util.plugins.dir}" prefix="plugins" includes="org.eclipse.persistence*.jar"/> |
| <!-- see https://bugs.eclipse.org/bugs/show_bug.cgi?id=348829 --> |
| <zipfileset dir="${feature.2.jpa.plugins.dir}" prefix="plugins" includes="jakarta.persistence*.jar"/> |
| </zip> |
| </target> |
| |
| <target name="copy-and-queue-for-sign"> |
| <delete file="${signing.dir}/${p2.archive.presigned.zip}" failonerror="false"/> |
| <delete file="${signing.dir}/signed-output/${p2.archive.presigned.zip}" failonerror="false"/> |
| <copy file="${signed.archive.src.file}" todir="${signing.dir}"/> <!-- wait til cleared to avoid version confusion and overwriting? --> |
| <exec executable="${signing.script}" dir="${signing.dir}" failonerror="false"> <!-- need to not stop if authority fails --> |
| <arg value="${p2.archive.presigned.zip}"/> |
| <arg value="nomail"/> |
| <arg value="signed-output/"/> |
| </exec> |
| </target> |
| |
| <target name="retrieve-signed-archive" unless="signing.time.limit.exceeded" depends="wait-for-sign-jar,wait-report-timeout"> |
| <copy tofile="${signed.archive.dest.file}" file="${signing.dir}/signed-output/${p2.archive.presigned.zip}"/> |
| </target> |
| <target name="wait-report-timeout" if="signing.time.limit.exceeded"> |
| <echo message="Signing aborted, wait time exceeded!"/> |
| </target> |
| <target name="wait-for-sign-jar" depends="init"> |
| <echo message="Waiting for ${signing.dir}/signed-output/${p2.archive.presigned.zip}"/> |
| <!-- With nightly builds taking anywhere from 85 to 120 minutes to complete, max wait-time can --> |
| <!-- only be roughly 100 minutes since the build starts at 2:35am and MUST finish before the --> |
| <!-- first continuous build at 6:30 (that leaves roughly a 15 minute window) --> |
| <waitfor maxwait="100" maxwaitunit="minute" checkevery="15" checkeveryunit="second" timeoutproperty="signing.time.limit.exceeded"> |
| <available file="${signing.dir}/signed-output/${p2.archive.presigned.zip}"/> |
| </waitfor> |
| </target> |
| |
| <!-- P2 Targets --> |
| <!-- clean --> |
| <target name="test-ready-to-go"> |
| <condition property="p2.archive.zip" value="${p2.archive.presigned.zip}" else="foobar.error"> |
| <available file="${p2.archive.presigned.zip}"/> |
| </condition> |
| <available file="${p2.archive.zip}" property="signing.archive.exist"/> |
| <say message="p2.archive.zip ='${p2.archive.zip}'" if="signing.archive.exist"/> |
| <say message="p2.archive.zip: '${p2.archive.zip}' not found!" unless="signing.archive.exist"/> |
| <say message="nosql.install.file ='${nosql.install.file}'" if="nosql.installer.exist"/> |
| <say message="nosql.install.file: '${nosql.install.file}' not found!" unless="nosql.installer.exist"/> |
| <say message="bundle.install.file ='${bundle.install.file}'" if="bundle.installer.exist"/> |
| <say message="bundle.install.file: '${bundle.install.file}' not found!" unless="bundle.installer.exist"/> |
| <condition property="ready-to-go"> |
| <and> |
| <isset property="signing.archive.exist"/> |
| <isset property="bundle.installer.exist"/> |
| </and> |
| </condition> |
| </target> |
| |
| <target name="not-ready-to-go" unless="ready-to-go" depends="test-ready-to-go"> |
| <fail message="Bundle Installer (${bundle.install.file}) or p2 archive (${p2.archive.zip})not found! Skipping P2 repos generation."/> |
| </target> |
| |
| <target name="clear-p2-loc" if="ready-to-go" depends="not-ready-to-go"> |
| <delete dir="${p2.repos.dir}" failonerror="true"/> |
| <echo message="Test without cleaning repos first."/> |
| </target> |
| |
| <target name="populate-p2-site" if="ready-to-go" depends="init"> |
| <mkdir dir="${p2.bundle.dir}"/> |
| <mkdir dir="${p2.feature.dir}"/> |
| <!-- populate update site with feature and bundle jars --> |
| <unzip dest="${p2.bundle.dir}" src="${bundle.install.file}"> |
| <patternset> |
| <include name="**/*.jar"/> |
| </patternset> |
| </unzip> |
| <unzip dest="${p2.bundle.dir}" src="${nosql.install.file}"> |
| <patternset> |
| <include name="**/*.jar"/> |
| </patternset> |
| </unzip> |
| <!-- replace with signed bits if applicable --> |
| <unzip dest="${p2.bundle.dir}" src="${p2.archive.zip}"> |
| <patternset> |
| <include name="plugins/*.jar"/> |
| </patternset> |
| <mapper type="flatten"/> |
| </unzip> |
| <!-- Remove jars we are not including in features at this time (needs to be separate because exclude in unzip does not seem to work) --> |
| <delete> |
| <fileset |
| dir="${p2.bundle.dir}" |
| includes=" |
| *jms*.jar, |
| eclipselink*.jar, |
| *ejb*.jar, |
| jakarta.persistence*_1.*.jar, |
| *preview*.jar, |
| *jakarta.transaction*.jar, |
| *jakarta.transaction*.jar, |
| jakarta.xml.bind.source*.jar, |
| *modelgen*.jar, |
| *soap*.jar, |
| *xml.ws*.jar, |
| *jpars*.jar" |
| /> |
| </delete> |
| <unzip dest="${p2.feature.dir}" src="${p2.archive.zip}"> |
| <patternset> |
| <include name="features/*.jar"/> |
| </patternset> |
| <mapper type="flatten"/> |
| </unzip> |
| </target> |
| |
| <target name="publish-p2-repos" depends="init, publish-p2-solitary, publish-p2-child"/> |
| |
| <target name="create-site-for-generation" unless="do.composite"> |
| <mkdir dir="${site.dir}"/> |
| <delete file="${site.dir}/site.xml" quiet="true"/> |
| <filter token="REPOS_URL" value="${p2.repos.url}"/> |
| <filter token="VERSION" value="${release.version}"/> |
| <filter token="QUALIFIER" value="${version.qualifier}"/> |
| <copy todir="${site.dir}" file="${feature.build.location}/site.xml" filtering="true"/> |
| </target> |
| |
| <target name="publish-p2-solitary" unless="do.composite" depends="create-site-for-generation"> |
| <copy todir="${p2.repos.dir}" file="${site.dir}/site.xml" filtering="false"/> |
| <echo message="java.home ='${java.home}'"/> |
| <echo message="p2.SDK.plugin.dir='${p2.SDK.plugin.dir}'"/> |
| <echo message="p2.launcher.jar ='${p2.launcher.jar}'"/> |
| <echo message="p2.publisher.jar ='${p2.publisher.jar}'"/> |
| <echo message="-----"/> |
| <echo message="p2.repos.dir ='${p2.repos.dir}'"/> |
| <echo message="p2.repos.url ='${p2.repos.url}'"/> |
| <!-- Metadata generator apparently doesn't rebuild the artifact and content xml files if they already exist --> |
| <mkdir dir="${p2.repos.dir}"/> |
| <delete failonerror="false"> |
| <fileset dir="${p2.repos.dir}" includes="artifact*.*, content*.*"/> |
| </delete> |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2" |
| jvm="${java.home}/bin/java" failonerror="false" maxmemory="256m"> |
| <classpath> |
| <fileset dir="${p2.SDK.plugin.dir}" |
| includes="${p2.launcher.jar}, |
| ${p2.publisher.jar}"/> |
| <pathelement location="${p2.SDK.plugin.dir}" /> |
| </classpath> |
| <arg line=" -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher" /> |
| <arg line=" -metadataRepository ${p2.repos.url}" /> |
| <arg line=" -artifactRepository ${p2.repos.url}" /> |
| <arg line=" -source ${p2.repos.dir}" /> |
| <arg line=" -compress -publishArtifacts -configs all" /> |
| </java> |
| </target> |
| |
| <target name="publish-p2-child" if="do.composite"> |
| <echo message="java.home ='${java.home}'"/> |
| <echo message="p2.SDK.plugin.dir='${p2.SDK.plugin.dir}'"/> |
| <echo message="p2.launcher.jar ='${p2.launcher.jar}'"/> |
| <echo message="p2.publisher.jar ='${p2.publisher.jar}'"/> |
| <echo message="-----"/> |
| <echo message="p2.repos.dir ='${p2.repos.dir}'"/> |
| <echo message="p2.repos.url ='${p2.repos.url}'"/> |
| <!-- Metadata generator apparently doesn't rebuild the artifact and content xml files if they already exist --> |
| <mkdir dir="${p2.repos.dir}"/> |
| <delete failonerror="false"> |
| <fileset dir="${p2.repos.dir}" includes="artifact*.*, content*.*"/> |
| </delete> |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2" |
| jvm="${java.home}/bin/java" failonerror="false" maxmemory="256m"> |
| <classpath> |
| <fileset dir="${p2.SDK.plugin.dir}" |
| includes="${p2.launcher.jar}, |
| ${p2.publisher.jar}"/> |
| <pathelement location="${p2.SDK.plugin.dir}" /> |
| </classpath> |
| <arg line=" -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher" /> |
| <arg line=" -metadataRepository ${p2.repos.url}" /> |
| <arg line=" -artifactRepository ${p2.repos.url}" /> |
| <arg line=" -source ${p2.repos.dir}" /> |
| <arg line=" -compress -publishArtifacts -configs all" /> |
| </java> |
| </target> |
| |
| <target name="mirror-p2-repos" depends="init"> <!-- , create-site-for-generation" --> |
| <property name="p2.mirror.name" value="EclipseLink build ${version.string} Repository"/> |
| <echo message="java.home ='${java.home}'"/> |
| <echo message="p2.SDK.plugin.dir='${p2.SDK.plugin.dir}'"/> |
| <echo message="p2.launcher.jar ='${p2.launcher.jar}'"/> |
| <echo message="p2.publisher.jar ='${p2.publisher.jar}'"/> |
| <echo message="-----"/> |
| <echo message="source URL (p2.repos.url) ='${p2.repos.url}'"/> |
| <echo message="destination dir (p2.mirror.dir) ='${p2.mirror.dir}'"/> |
| <echo message="destination URL (p2.mirror.url) ='${p2.mirror.url}'"/> |
| <echo message="destination name(p2.mirror.name)='${p2.mirror.name}'"/> |
| <echo message="-----"/> |
| <!-- Metadata generator apparently doesn't rebuild the artifact and content xml files if they already exist --> |
| <mkdir dir="${p2.mirror.dir}"/> |
| <delete failonerror="false"> |
| <fileset dir="${p2.mirror.dir}" includes="artifact*.*, content*.*"/> |
| </delete> |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2.M.mirror" |
| jvm="${java.home}/bin/java" failonerror="false" maxmemory="256m"> |
| <classpath> |
| <fileset dir="${p2.SDK.plugin.dir}" |
| includes="${p2.launcher.jar}, |
| ${p2.artifact.jar}"/> |
| <pathelement location="${p2.SDK.plugin.dir}" /> |
| </classpath> |
| <arg line=" -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication" /> |
| <arg line=" -source ${p2.repos.url}" /> |
| <arg line=" -destination ${p2.mirror.url}" /> |
| <arg line=" -destinationName '${p2.mirror.name}'" /> |
| </java> |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2.A.mirror" |
| jvm="${java.home}/bin/java" failonerror="false" maxmemory="256m"> |
| <classpath> |
| <fileset dir="${p2.SDK.plugin.dir}" |
| includes="${p2.launcher.jar}, |
| ${p2.artifact.jar}"/> |
| <pathelement location="${p2.SDK.plugin.dir}" /> |
| </classpath> |
| <arg line=" -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication" /> |
| <arg line=" -source ${p2.repos.url}" /> |
| <arg line=" -destination ${p2.mirror.url}" /> |
| <arg line=" -destinationName '${p2.mirror.name}'" /> |
| <arg line=" -verbose -raw" /> |
| </java> |
| </target> |
| |
| <target name="test-p2-site" depends="init"> |
| <!-- EclipseLink SDK installation variables --> |
| <property name="p2.director.jar" value="org.eclipse.equinox.p2.director_*.jar"/> |
| <property name="p2.director.destination" location="${p2.SDK.install.dir}" /> |
| <property name="p2.director.bundlepool" location="${p2.director.destination}" /> |
| <property name="p2.director.profile" value="SDKProfile" /> |
| <property name="p2.director.installIU" value="org.eclipse.persistence.sdk.feature.group" /> |
| <property name="p2.director.action" value="-verifyOnly" /> |
| <property name="p2.director.eclipse.version" value="photon" /> |
| <property name="p2.director.eclipse.updateSite" value="http://download.eclipse.org/releases/${p2.director.eclipse.version}" /> |
| <property name="p2.director.additionalArgs" value="" /> |
| <echo message="p2.director.jar ='${p2.director.jar}'"/> |
| <echo message="p2.director.destination ='${p2.director.destination}'"/> |
| <echo message="p2.director.bundlepool ='${p2.director.bundlepool}'"/> |
| <echo message="p2.director.profile ='${p2.director.profile}'"/> |
| <echo message="p2.director.installIU ='${p2.director.installIU}'"/> |
| <echo message="p2.director.action ='${p2.director.action}'"/> |
| <echo message="p2.director.eclipse.version ='${p2.director.eclipse.version}'"/> |
| <echo message="p2.director.eclipse.updateSite ='${p2.director.eclipse.updateSite}'"/> |
| <echo message="p2.director.additionalArgs ='${p2.director.additionalArgs}'"/> |
| |
| <echo message="Verifying EclipseLink Update Site: '${p2.repos.url}'"/> |
| |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2.director" |
| jvm="${java.home}/bin/java" failonerror="true" maxmemory="512m"> |
| <classpath> |
| <fileset dir="${p2.SDK.plugin.dir}" |
| includes="${p2.launcher.jar}, |
| ${p2.director.jar}"/> |
| <pathelement location="${p2.SDK.plugin.dir}" /> |
| </classpath> |
| <arg line="-application org.eclipse.equinox.p2.director" /> |
| <arg line="-nosplash -flavor tooling -roaming" /> |
| <arg line="-profile '${p2.director.profile}'" /> |
| <arg line="-destination '${p2.director.destination}'" /> |
| <arg line="-bundlepool '${p2.director.bundlepool}'" /> |
| <arg line="-installIU '${p2.director.installIU}'" /> |
| <arg line="-tag EclipseLinkSDK"/> |
| <arg line="${p2.director.action}"/> |
| <arg line="-profileProperties org.eclipse.update.install.features=true" /> |
| <arg line="-repository ${p2.repos.url},${p2.director.eclipse.updateSite}" /> |
| <arg line="${p2.director.additionalArgs}"/> |
| </java> |
| </target> |
| </project> |