| <!--/******************************************************************************* | |
| * This program and the accompanying materials are made available under the | |
| * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 | |
| * which accompanies this distribution. | |
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | |
| * and the Eclipse Distribution License is available at | |
| * http://www.eclipse.org/org/documents/edl-v10.php. | |
| * Ant naming conventions: | |
| * - regardless of the actual OS platform,'/' is the directory separator | |
| * (Ant will convert as appropriate). | |
| * - multi-word properties use periods '.' | |
| * - properties ending in .jar define jarfile names only (no path) | |
| * - properties ending in .lib are fully qualified jars (path and filename) | |
| * - properties ending in .dir are directory paths | |
| * - properties ending in .path are path refid names (classpath fragments) | |
| * - multi-word targets use hyphens '-' | |
| * - targets beginning with test- are reserved for high level test targets, | |
| * and are used in test results parsing | |
| * - targets typically use the form <action>-<object>-<type> (ie. package-bundle-zip) | |
| * - 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. | |
| * | |
| * Contributors: | |
| * mmeswani - initial API and implementation (checked in by tware) | |
| * egwin - updated variables as they have changed in the rest of the system | |
| * updated svnversion to not break build, and default if exec fails | |
| * egwin - updated for publishing to Maven Central, split nexus handling to | |
| * new script | |
| * egwin - converted svn.revision to git.hash (was missed in original | |
| * migration to Git) | |
| #******************************************************************************/--> | |
| <!-- Variables Needed: | |
| * release.version - need three tokens: Major.Minor.Service | |
| * build.date - in format YYYYMMDD | |
| * build.type - should be set to "SNAPSHOT, "M##", or "RELEASE" | |
| * git.hash - for stamping pom, to link build with source repo | |
| * Optional variables: | |
| * bundle.dir - if location of bundles to publish isn't a git "view" | |
| * | |
| *********************************************************************************--> | |
| <!-- Build Assumptions: | |
| * running from a "view" | |
| * Needs: | |
| * ${mavenant.dir}/maven-ant-tasks-2.0.8.jar (assumes: ${build.deps.dir}/mavenant) | |
| * build.properties | |
| * ./buildsystem/ant_customizations.jar | |
| * | |
| *********************************************************************************--> | |
| <project name="Upload2Maven" basedir="." xmlns:artifact="urn:maven-artifact-ant" default="upload-maven-all"> | |
| <property file="${user.home}/build.properties"/> | |
| <property file="build.properties"/> | |
| <!-- The following properties defined so they can be overridden for testing --> | |
| <property name="mavenant.dir" value="${build.deps.dir}/mavenant"/> | |
| <property name="eclipselink.root.download.dir" value="home/data/httpd/download.eclipse.org/rt/eclipselink"/> | |
| <path id="maven-ant-tasks.classpath" path="${mavenant.dir}/maven-ant-tasks-2.1.3.jar" /> | |
| <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" | |
| classpathref="maven-ant-tasks.classpath" /> | |
| <!-- Tool version definitions --> | |
| <property name="gpg.plugin.version" value="1.4"/> | |
| <property name="wagon.http.version" value="2.4"/> | |
| <!-- The repository info of where maven artifacts will be uploaded --> | |
| <!-- Override value to change defaults --> | |
| <property name="stagingId" value="sonatype-nexus-staging"/> | |
| <property name="stagingURL" value="https://oss.sonatype.org/service/local/staging/deploy/maven2"/> | |
| <property name="snapshotId" value="sonatype-nexus-snapshots"/> | |
| <property name="snapshotURL" value="https://oss.sonatype.org/content/repositories/snapshots"/> | |
| <target name="upload-maven-all" depends="upload-eclipselink"/> | |
| <target name="environment-init" if="bundle.dir"> | |
| <!-- If "bundle.dir" specified that means that the Push to Maven is occurring from a constructed --> | |
| <!-- dir (expanded zips), rather than directly from a "view" (git repo) dir structure. --> | |
| <property name="maven.2.pojo.dir" value="${bundle.dir}"/> | |
| <property name="maven.2.common.plugins.dir" value="${bundle.dir}"/> | |
| <property name="maven.2.jpa.plugins.dir" value="${bundle.dir}"/> | |
| <property name="maven.2.sdo.plugins.dir" value="${bundle.dir}"/> | |
| <property name="maven.2.util.plugins.dir" value="${bundle.dir}"/> | |
| </target> | |
| <target name="init" depends="environment-init"> | |
| <dirname property="maven.build.location_temp" file="${ant.file.Upload2Maven}"/> | |
| <pathconvert targetos="unix" property="maven.build.location"> | |
| <path> | |
| <pathelement location="${maven.build.location_temp}"/> | |
| </path> | |
| </pathconvert> | |
| <property file="${user.home}/build.properties"/> | |
| <!-- discover path definitions --> | |
| <property name="maven.2.pojo.dir" value="${maven.build.location}"/> | |
| <property name="maven.2.common.plugins.dir" value="${maven.build.location}/plugins"/> | |
| <property name="maven.2.jpa.plugins.dir" value="${maven.build.location}/jpa/plugins"/> | |
| <property name="maven.2.sdo.plugins.dir" value="${maven.build.location}/sdo/plugins"/> | |
| <property name="maven.2.util.plugins.dir" value="${maven.build.location}/utils/plugins"/> | |
| <property name="maven.2.buildsys.dir" value="${maven.build.location}/buildsystem"/> | |
| <!-- Custom task definitions --> | |
| <property name="custom.tasks.lib" value="${maven.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"/> | |
| <property name="custom.stripqualifier.task.class" value="org.eclipse.persistence.buildtools.ant.taskdefs.StripQualifier"/> | |
| <taskdef name="say" classname="${custom.echo.task.class}" classpath="${custom.tasks.lib}"/> | |
| <taskdef name="selectbundle" classname="${custom.selectbundle.task.class}" classpath="${custom.tasks.lib}"/> | |
| <taskdef name="stripQualifier" classname="${custom.stripqualifier.task.class}" classpath="${custom.tasks.lib}"/> | |
| <echo message="maven.build.location = ${maven.build.location}"/> | |
| <echo message="maven.2.pojo.dir (eclipselink.jar) = ${maven.2.pojo.dir}"/> | |
| <echo message="maven.2.common.plugins.dir (common) = ${maven.2.common.plugins.dir}"/> | |
| <echo message="maven.2.jpa.plugins.dir (JPA-API) = ${maven.2.jpa.plugins.dir}"/> | |
| <echo message="maven.2.sdo.plugins.dir (commonj) = ${maven.2.sdo.plugins.dir}"/> | |
| <echo message="maven.2.util.plugins.dir (DDLparser)= ${maven.2.util.plugins.dir}"/> | |
| <echo message="maven.2.buildsys.dir = ${maven.2.buildsys.dir}"/> | |
| <!-- Defaults for testing, will be previously set on real run --> | |
| <tstamp> | |
| <format property="build.date" pattern="yyyyMMdd"/> | |
| </tstamp> | |
| <fail message="Cannot upload to Maven without a release.version defined!" unless="release.version"/> | |
| <fail message="Cannot upload to Maven without a build.date defined!" unless="build.date"/> | |
| <fail message="Cannot upload to Maven without a build.type defined!" unless="build.type"/> | |
| <fail message="Cannot upload to Maven without 'git.hash' defined!" unless="git.hash"/> | |
| <!-- Set version.string. variable should only be used for uploaded filenames --> | |
| <!-- or manifest entries. --> | |
| <!-- NOTE: Mostly redundant. version.string should already be set. --> | |
| <property name="version.string" value="${release.version}.v${build.date}-${git.hash}"/> | |
| <!-- Set maven.version appropriately depending upon ${build.type}. --> | |
| <!-- variable should only be used for maven version element in POM. --> | |
| <condition property="maven.version" value="${release.version}" | |
| else="${release.version}-${build.type}"> | |
| <equals arg1="${build.type}" arg2="RELEASE"/> | |
| </condition> | |
| <echo message="release.version: ${release.version}"/> | |
| <echo message="build.date: ${build.date}"/> | |
| <echo message="build.type: ${build.type}"/> | |
| <echo message="git.hash: ${git.hash}"/> | |
| <echo message="version.string: ${version.string}"/> | |
| <echo message="maven.version: ${maven.version}"/> | |
| <condition property="sign"> | |
| <not> <equals arg1="${build.type}" arg2="SNAPSHOT"/> </not> | |
| </condition> | |
| <condition property="target.repo.message" value="Target repository ID: '${stagingId}' URL:'${stagingURL}'" | |
| else="Target repository ID: '${snapshotId}' URL:'${snapshotURL}'"> | |
| <isset property="sign"/> | |
| </condition> | |
| <echo message="${target.repo.message}"/> | |
| </target> | |
| <target name="discover-static-built-info" depends="init"> | |
| <property name="jpaapi.prefix" value="javax.persistence"/> | |
| <property name="jpaapi.criteria" value="[2.0.100, 3.0.0)"/> | |
| <property name="jpaapi.name" value="Javax Persistence"/> | |
| <property name="sdoapi.prefix" value="commonj.sdo"/> | |
| <property name="sdoapi.criteria" value="[2.1.1,2.2.0)"/> | |
| <property name="sdoapi.name" value="SDO API"/> | |
| <property name="validation.prefix" value="validation-api"/> | |
| <property name="validation.criteria" value="[1.1.0,2.2.0)"/> | |
| <property name="validation.name" value="Javax Validation"/> | |
| <property name="validation.version" value="1.1.0.Final"/> | |
| <property name="json.prefix" value="javax.json"/> | |
| <property name="json.criteria" value="[1.0.4,5.0.0)"/> | |
| <property name="json.name" value="Javax JSON"/> | |
| <property name="json.version" value="1.0.4"/> | |
| <property name="antlr.prefix" value="org.eclipse.persistence.antlr"/> | |
| <property name="antlr.criteria" value="[3.0.0,4.0.0)"/> | |
| <property name="antlr.name" value="EclipseLink ANTLR"/> | |
| <property name="asm.prefix" value="org.eclipse.persistence.asm"/> | |
| <property name="asm.criteria" value="[5.0.0,9.0.0)"/> | |
| <property name="asm.name" value="EclipseLink ASM"/> | |
| <property name="oracleddl.prefix" value="org.eclipse.persistence.oracleddlparser"/> | |
| <property name="oracleddl.criteria" value="[1.0.0,9.0.0)"/> | |
| <property name="oracleddl.name" value="EclipseLink OracleDDL Parser"/> | |
| <property name="oraclebndl.prefix" value="org.eclipse.persistence.oracle"/> | |
| <property name="oraclebndl.criteria" value="[1.0.0,9.0.0)"/> | |
| <property name="oraclebndl.name" value="EclipseLink Oracle Extensions"/> | |
| <property name="oraclenosql.prefix" value="org.eclipse.persistence.oracle.nosql"/> | |
| <property name="oraclenosql.criteria" value="[1.0.0,9.0.0)"/> | |
| <property name="oraclenosql.name" value="EclipseLink Oracle NoSQL database Extensions"/> | |
| <property name="hermes.prefix" value="org.eclipse.persistence.jpa.jpql"/> | |
| <property name="hermes.criteria" value="[1.0.0,9.0.0)"/> | |
| <property name="hermes.name" value="EclipseLink Hermes JPQL Parser"/> | |
| <property name="extension.prefix" value="org.eclipse.persistence.extension"/> | |
| <property name="extension.criteria" value="[1.0.0,9.0.0)"/> | |
| <property name="extension.name" value="EclipseLink Extensions"/> | |
| <selectbundle basename="${jpaapi.prefix}" directory="${maven.2.jpa.plugins.dir}" | |
| criterion="${jpaapi.criteria}" property="jpaapi.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${sdoapi.prefix}" directory="${maven.2.sdo.plugins.dir}" | |
| criterion="${sdoapi.criteria}" property="sdoapi.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${validation.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${validation.criteria}" property="validation.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${json.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${json.criteria}" property="json.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${antlr.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${antlr.criteria}" property="antlr.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${asm.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${asm.criteria}" property="asm.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${oracleddl.prefix}" directory="${maven.2.util.plugins.dir}" | |
| criterion="${oracleddl.criteria}" property="oracleddl.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${oraclebndl.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${oraclebndl.criteria}" property="oraclebndl.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${oraclenosql.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${oraclenosql.criteria}" property="oraclenosql.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${hermes.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${hermes.criteria}" property="hermes.version" versiononly="true" | |
| /> | |
| <selectbundle basename="${extension.prefix}" directory="${maven.2.common.plugins.dir}" | |
| criterion="${extension.criteria}" property="extension.version" versiononly="true" | |
| /> | |
| <echo message="jpaapi.version = ${jpaapi.version}"/> | |
| <echo message="sdoapi.version = ${sdoapi.version}"/> | |
| <echo message="validation.version = ${validation.version}"/> | |
| <echo message="json.version = ${json.version}"/> | |
| <echo message="antlr.version = ${antlr.version}"/> | |
| <echo message="asm.version = ${asm.version}"/> | |
| <echo message="oracleddl.version = ${oracleddl.version}"/> | |
| <echo message="oraclebndl.version = ${oraclebndl.version}"/> | |
| <echo message="oraclenosql.version= ${oraclenosql.version}"/> | |
| <echo message="hermes.version = ${hermes.version}"/> | |
| <echo message="extension.version = ${extension.version}"/> | |
| <!-- Maven standards state we should publish with a stripped down 3-part version rather --> | |
| <!-- than the 4-part OSGi version. So we need to generate "(bundle).mvn.version" from --> | |
| <!-- the discovered "(bundle).version" (after release) --> | |
| <stripQualifier input="${jpaapi.version}" property="jpaapi.mvn.version"/> | |
| <!-- However, if the bundle versioning is such that only the qualifier will change on --> | |
| <!-- a rebuild (convenient for publishing OSGi-ified jars but against OSGi spec) then --> | |
| <!-- we will either violate Maven's "once published, never changes" rule, or newer --> | |
| <!-- bundles will never be published. --> | |
| <!-- NOTE: Decision made to preserve former rather than latter for commonj.sdo, it has --> | |
| <!-- not revved in several years and so is unlikely to do so in future (BD,DT,EG) --> | |
| <stripQualifier input="${sdoapi.version}" property="sdoapi.mvn.version"/> | |
| <!-- In addition these jars are special cases: --> | |
| <!-- Hermes OSGi versioning has changed, so will move into the regular build section --> | |
| <!-- soon. --> | |
| <!-- OracleDDL is expected to follow suit --> | |
| <!-- The Oracle bundles only build periodically, so the bundle version needs to be --> | |
| <!-- 'discovered' but they should be published as part of the build --> | |
| <!-- ANTLR and ASM bundle versions follow the jar it is based upon, and so new builds--> | |
| <!-- only rev the qualifier. However they are uniquely EclipseLink due to the --> | |
| <!-- package renaming, so while the version needs to be 'discovered' for artifact --> | |
| <!-- publishing they will be published under the EclipseLink build version --> | |
| <!-- In addition, in all these listed cases, the artifacts are EclipseLink specific, --> | |
| <!-- and won't be available separately anyway. --> | |
| <say message="jpaapi.mvn.version = ${jpaapi.mvn.version}" if="jpaapi.mvn.version"/> | |
| <say message="sdoapi.mvn.version = ${sdoapi.mvn.version}" if="sdoapi.mvn.version"/> | |
| <say message="jpaapi.mvn.version: Property not set!" unless="jpaapi.mvn.version"/> | |
| <say message="sdoapi.mvn.version: Property not set!" unless="sdoapi.mvn.version"/> | |
| </target> | |
| <target name="upload-maven-init" depends="discover-static-built-info"> | |
| <!-- Setup static dependency definitions --> | |
| <!-- Would be nice to setup in the beginning, but the library definitions need version.string defined --> | |
| <!-- Also semi-static OSGi libraries need to use a stripped down 3-part version, rather than the 4-part OSGi version --> | |
| <!-- These need to be used in order --> | |
| <property name="deps.head" value="<dependencies>"/> | |
| <property name="dep.grp" value="<dependency><groupId>"/> | |
| <property name="dep.art" value="</groupId><artifactId>"/> | |
| <property name="dep.ver" value="</artifactId><version>"/> | |
| <property name="dep.type" value="</version><type>"/> | |
| <property name="dep.scope" value="</type><scope>"/> | |
| <property name="dep.opt" value="</scope><optional>"/> | |
| <property name="dep.foot" value="</optional></dependency>"/> | |
| <property name="deps.foot" value="</dependencies>"/> | |
| <!-- These use above, in order, to define a single library for an artifact dependency --> | |
| <!-- Public APIs we depend upon that can be found on Maven Central --> | |
| <!-- Add as nosql dependency --> | |
| <property name="dep.resource" value="${dep.grp}javax.resource${dep.art}connector-api${dep.ver}1.5${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.servlet" value="${dep.grp}javax.servlet${dep.art}servlet-api${dep.ver}2.4${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.wsdl" value="${dep.grp}wsdl4j${dep.art}wsdl4j${dep.ver}1.6.3${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <!-- These are EclipseLink maintained public API bundles so are published under the EclipseLink GroupID, but with their own version info --> | |
| <property name="dep.persistence" value="${dep.grp}org.eclipse.persistence${dep.art}${jpaapi.prefix}${dep.ver}${jpaapi.mvn.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.sdoapi" value="${dep.grp}org.eclipse.persistence${dep.art}${sdoapi.prefix}${dep.ver}${sdoapi.mvn.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <!-- APIs that are not EclipseLink's maintained public API bundles but are to be included in EclipseLink pom.xml. --> | |
| <property name="dep.validation" | |
| value="${dep.grp}javax.validation${dep.art}${validation.prefix}${dep.ver}${validation.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.json" value="${dep.grp}org.glassfish${dep.art}${json.prefix}${dep.ver}${json.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <!-- These are EclipseLink jars so will be versioned with the build --> | |
| <property name="dep.antlr" value="${dep.grp}org.eclipse.persistence${dep.art}${antlr.prefix}${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.asm" value="${dep.grp}org.eclipse.persistence${dep.art}${asm.prefix}${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.hermes" value="${dep.grp}org.eclipse.persistence${dep.art}${hermes.prefix}${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.dbws" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.dbws${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.core" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.core${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.oracle" value="${dep.grp}org.eclipse.persistence${dep.art}${oraclebndl.prefix}${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.nosql" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.nosql${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.jpa" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.jpa${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.moxy" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.moxy${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.sdo" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.sdo${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.oracleddl" value="${dep.grp}org.eclipse.persistence${dep.art}${oracleddl.prefix}${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <property name="dep.eclipselink" value="${dep.grp}org.eclipse.persistence${dep.art}eclipselink${dep.ver}${maven.version}${dep.type}jar${dep.scope}compile${dep.opt}false${dep.foot}"/> | |
| <!-- These define the dependency block for a given artifact --> | |
| <!-- * The modelgen processor is a jar containing a single data resource used by the compiler to establish a --> | |
| <!-- canonical modelgen processor during compilation. It has no real dependencies, nor is anything really --> | |
| <!-- dependant upon it, but it is needed for this compiler functionality to work. (think of it as a compiler --> | |
| <!-- add-on). It will need to be downloaded independently for this feature (modelgen) to work. --> | |
| <property name="eclipselink.dependencies" value="${deps.head}${dep.persistence}${dep.sdoapi}${dep.validation}${dep.json}${deps.foot}"/> | |
| <!-- would need the modelgen.jar for modelgen but cannot include dep --> | |
| <property name="jpql.dependencies" value="${deps.head}${dep.hermes}${deps.foot}"/> | |
| <property name="core.dependencies" value="${deps.head}${dep.asm}${dep.json}${deps.foot}"/> | |
| <property name="oracle.dependencies" value="${deps.head}${dep.persistence}${dep.asm}${dep.core}${deps.foot}"/> | |
| <property name="jpa.dependencies" value="${deps.head}${dep.persistence}${dep.asm}${dep.antlr}${dep.json}${dep.hermes}${dep.core}${deps.foot}"/> | |
| <property name="nosql.dependencies" value="${deps.head}${dep.resource}${dep.persistence}${dep.asm}${dep.antlr}${dep.hermes}${dep.core}${deps.foot}"/> | |
| <property name="ora.nosql.dependencies" value="${deps.head}${dep.nosql}${deps.foot}"/> | |
| <property name="modelgen.dependencies" value="${deps.head}${dep.core}${dep.jpa}${deps.foot}"/> | |
| <property name="dbws.dependencies" value="${deps.head}${dep.core}${deps.foot}"/> | |
| <property name="builder.dependencies" value="${deps.head}${dep.core}${dep.dbws}${dep.moxy}${dep.jpa}${dep.nosql}${dep.oracle}${dep.servlet}${dep.wsdl}${dep.oracleddl}${deps.foot}"/> | |
| <property name="moxy.dependencies" value="${deps.head}${dep.core}${dep.validation}${dep.json}${deps.foot}"/> | |
| <property name="sdo.dependencies" value="${deps.head}${dep.sdoapi}${dep.moxy}${dep.core}${deps.foot}"/> | |
| <property name="extension.dependencies" value="${deps.head}${dep.core}${deps.foot}"/> | |
| </target> | |
| <!-- Nexus typicaly is configured to disallow uploads of already published versions (non-snapshot) --> | |
| <!-- Aditionally Sonatype is configured to disallow publishing of non-snapshot versions to the --> | |
| <!-- snapshot server (400 error). Therefore Moving the JPA "snapshot" upload to the regular upload --> | |
| <!-- section, and setting this target to conditionally only run if not a build.type of SNAPSHOT, --> | |
| <!-- and fix it so these uploads won't cause a build failure on Error (already uploaded) --> | |
| <target name="upload-static-built-jars" if="sign" depends="discover-static-built-info"> | |
| <!-- Removed "upload-release-artifact" because it depended upon filesystem access. See below. --> | |
| <!-- repo.dir and artifactId should be (bundle).mvn.version from (bundle).version --> | |
| <!-- (rather than the 4-part OSGi version, we use a stripped down 3-part version) --> | |
| <echo message="Skipping upload of static artifacts to Nexus..."/> | |
| <!-- antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${jpaapi.prefix}"/> | |
| <param name="artifactVersion" value="${jpaapi.mvn.version}"/> | |
| <param name="artifact" value="${maven.2.jpa.plugins.dir}/${jpaapi.prefix}_${jpaapi.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.jpa.plugins.dir}/${jpaapi.prefix}.source_${jpaapi.version}.jar"/> | |
| <param name="artifactName" value="${jpaapi.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall --> | |
| <!-- Removed "upload-release-artifact" because it depended upon filesystem access. See below. --> | |
| <!-- antcall target="upload-release-artifact" --> | |
| <!-- antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${sdoapi.prefix}"/> | |
| <param name="artifactVersion" value="${sdoapi.mvn.version}"/> | |
| <param name="artifact" value="${maven.2.sdo.plugins.dir}/${sdoapi.prefix}_${sdoapi.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.sdo.plugins.dir}/${sdoapi.prefix}.source_${sdoapi.version}.jar"/> | |
| <param name="artifactName" value="${sdoapi.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall --> | |
| </target> | |
| <target name="upload-eclipselink" depends="upload-maven-init,upload-static-built-jars"> | |
| <!-- While JPA is pre-release use "upload-artifact" with fixed up 2.1.0-(EL ${build.type}) as version --> | |
| <!-- Changed back (commented out) for post-release builds --> | |
| <!-- antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${jpaapi.prefix}"/> | |
| <param name="artifactVersion" value="${jpaapi.mvn.version}"/> | |
| <param name="artifact" value="${maven.2.jpa.plugins.dir}/${jpaapi.prefix}_${jpaapi.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.jpa.plugins.dir}/${jpaapi.prefix}.source_${jpaapi.version}.jar"/> | |
| <param name="artifactName" value="${jpaapi.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall --> | |
| <!-- call upload for each artifact we want to upload --> | |
| <antcall target="upload-artifact-with-javadoc"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="eclipselink"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.pojo.dir}/eclipselink.jar"/> | |
| <param name="artifactSrc" value="${maven.2.pojo.dir}/eclipselink-src.zip"/> | |
| <param name="artifactJavadoc" value="${maven.2.pojo.dir}/eclipselink-javadocs.zip"/> | |
| <param name="artifactName" value="EclipseLink (non-OSGi)"/> | |
| <param name="dependencies" value="${eclipselink.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${hermes.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/${hermes.prefix}_${hermes.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/${hermes.prefix}.source_${hermes.version}.jar"/> | |
| <param name="artifactName" value="${hermes.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${antlr.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/${antlr.prefix}_${antlr.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/${antlr.prefix}.source_${antlr.version}.jar"/> | |
| <param name="artifactName" value="${antlr.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${asm.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/${asm.prefix}_${asm.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/${asm.prefix}.source_${asm.version}.jar"/> | |
| <param name="artifactName" value="${asm.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.core"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.core_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.core.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink Core"/> | |
| <param name="dependencies" value="${core.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${oraclebndl.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/${oraclebndl.prefix}_${oraclebndl.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/${oraclebndl.prefix}.source_${oraclebndl.version}.jar"/> | |
| <param name="artifactName" value="${oraclebndl.name}"/> | |
| <param name="dependencies" value="${oracle.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${oraclenosql.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/${oraclenosql.prefix}_${oraclenosql.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/${oraclenosql.prefix}.source_${oraclenosql.version}.jar"/> | |
| <param name="artifactJavadoc" value="${maven.2.pojo.dir}/nosql-javadocs.zip"/> | |
| <param name="artifactName" value="${oraclenosql.name}"/> | |
| <param name="dependencies" value="${ora.nosql.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact-with-javadoc"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.nosql"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.nosql_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.nosql.source_${version.string}.jar"/> | |
| <param name="artifactJavadoc" value="${maven.2.pojo.dir}/nosql-javadocs.zip"/> | |
| <param name="artifactName" value="EclipseLink NoSQL database Extensions"/> | |
| <param name="dependencies" value="${nosql.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.jpa"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpa_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpa.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink JPA"/> | |
| <param name="dependencies" value="${jpa.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact-with-javadoc"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.jpars"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpars_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpars.source_${version.string}.jar"/> | |
| <param name="artifactJavadoc" value="${maven.2.pojo.dir}/eclipselink-jpars-javadocs.zip"/> | |
| <param name="artifactName" value="EclipseLink JPA-RS"/> | |
| <param name="dependencies" value=""/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.jpa.modelgen.processor"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpa.modelgen_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.jpa.modelgen.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink JPA Modelgen (non-OSGi)"/> | |
| <param name="dependencies" value="${modelgen.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.moxy"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.moxy_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.moxy.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink Moxy"/> | |
| <param name="dependencies" value="${moxy.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.sdo"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.sdo_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.sdo.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink SDO"/> | |
| <param name="dependencies" value="${sdo.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.dbws"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.dbws_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.dbws.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink DBWS"/> | |
| <param name="dependencies" value="${dbws.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="${oracleddl.prefix}"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.util.plugins.dir}/${oracleddl.prefix}_${oracleddl.version}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.util.plugins.dir}/${oracleddl.prefix}.source_${oracleddl.version}.jar"/> | |
| <param name="artifactName" value="${oracleddl.name}"/> | |
| <param name="dependencies" value=""/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.dbws.builder"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.dbws.builder_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.dbws.builder.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink DBWS Builder"/> | |
| <param name="dependencies" value="${builder.dependencies}"/> | |
| </antcall> | |
| <antcall target="upload-artifact"> | |
| <param name="groupId" value="org.eclipse.persistence"/> | |
| <param name="artifactId" value="org.eclipse.persistence.extension"/> | |
| <param name="artifactVersion" value="${maven.version}"/> | |
| <param name="artifact" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.extension_${version.string}.jar"/> | |
| <param name="artifactSrc" value="${maven.2.common.plugins.dir}/org.eclipse.persistence.extension.source_${version.string}.jar"/> | |
| <param name="artifactName" value="EclipseLink Extensions"/> | |
| <param name="dependencies" value="${extension.dependencies}"/> | |
| </antcall> | |
| </target> | |
| <!-- Generic targets to do the Maven work --> | |
| <target name="prepare-pom"> | |
| <!-- Copy pom.template to pom.xml filtering various properties --> | |
| <copy file="pom.xml.template" tofile="pom.xml" overwrite="true"> | |
| <filterset> | |
| <filter token="groupId" value="${groupId}"/> | |
| <filter token="version" value="${artifactVersion}"/> | |
| <filter token="git.hash" value="${git.hash}"/> | |
| <filter token="artifactId" value="${artifactId}"/> | |
| <filter token="artifactName" value="${artifactName}"/> | |
| <filter token="dependencies" value="${dependencies}"/> | |
| </filterset> | |
| </copy> | |
| </target> | |
| <!-- Uploads a single artifact & source to maven repository only if one doesn't already exist --> | |
| <!-- Removed "upload-release-artifact" because it depended upon filesystem access. Need a mechanism --> | |
| <!-- to verify an artifact is already uploaded to Nexus server. For now, am hoping nexus is smart enough --> | |
| <!-- to refuse redeployment. (Not hopeful though, seems too restrictive). --> | |
| <!-- Uploads a single artifact & source to maven repository --> | |
| <target name="upload-artifact" depends="prepare-pom, ua-snapshot, ua-staging, us-staging"> | |
| <!-- cleanup --> | |
| <delete file="pom.xml"/> | |
| </target> | |
| <target name="ua-snapshot" unless="sign"> | |
| <!-- Install provider for https protocol --> | |
| <artifact:install-provider artifactId="wagon-http" version="${wagon.http.version}"/> | |
| <!-- Deploy Artifact to repote repo, attach source --> | |
| <artifact:deploy file="${artifact}"> | |
| <artifact:remoteRepository id="${snapshotId}" url="${snapshotURL}" /> | |
| <artifact:pom id="maven.project" file="pom.xml" /> | |
| <artifact:attach file="${artifactSrc}" classifier="sources"/> | |
| </artifact:deploy> | |
| </target> | |
| <!-- Uploads a single artifact, source & javadoc to maven repository --> | |
| <target name="upload-artifact-with-javadoc" depends="prepare-pom, uawj-snapshot, ua-staging, us-staging, uj-staging"> | |
| <!-- cleanup --> | |
| <delete file="pom.xml"/> | |
| </target> | |
| <target name="uawj-snapshot" unless="sign"> | |
| <!-- Install provider for https protocol --> | |
| <artifact:install-provider artifactId="wagon-http" version="${wagon.http.version}"/> | |
| <!-- Deploy Artifact to repote repo, attach source and javadoc --> | |
| <artifact:deploy file="${artifact}"> | |
| <artifact:remoteRepository id="${snapshotId}" url="${snapshotURL}"/> | |
| <artifact:pom id="maven.project" file="pom.xml" /> | |
| <artifact:attach file="${artifactSrc}" type="jar" classifier="sources"/> | |
| <artifact:attach file="${artifactJavadoc}" type="zip" classifier="javadoc"/> | |
| </artifact:deploy> | |
| </target> | |
| <!-- Staging targets --> | |
| <target name="ua-staging" if="sign"> | |
| <!-- sign and deploy the main artifact --> | |
| <artifact:mvn> | |
| <arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/> | |
| <arg value="-Durl=${stagingURL}"/> | |
| <arg value="-DrepositoryId=${stagingId}"/> | |
| <arg value="-DpomFile=${maven.build.location}/pom.xml"/> | |
| <arg value="-Dfile=${artifact}"/> | |
| <arg value="-Pgpg"/> | |
| </artifact:mvn> | |
| </target> | |
| <target name="us-staging" if="sign"> | |
| <!-- sign and deploy the sources artifact --> | |
| <artifact:mvn> | |
| <arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/> | |
| <arg value="-Durl=${stagingURL}"/> | |
| <arg value="-DrepositoryId=${stagingId}"/> | |
| <arg value="-DpomFile=${maven.build.location}/pom.xml"/> | |
| <arg value="-Dfile=${artifactSrc}"/> | |
| <arg value="-Dclassifier=sources"/> | |
| <arg value="-Pgpg"/> | |
| </artifact:mvn> | |
| </target> | |
| <target name="uj-staging" if="sign"> | |
| <!-- sign and deploy the javadoc artifact --> | |
| <artifact:mvn> | |
| <arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/> | |
| <arg value="-Durl=${stagingURL}"/> | |
| <arg value="-DrepositoryId=${stagingId}"/> | |
| <arg value="-DpomFile=${maven.build.location}/pom.xml"/> | |
| <arg value="-Dfile=${artifactJavadoc}"/> | |
| <arg value="-Dclassifier=javadoc"/> | |
| <arg value="-Pgpg"/> | |
| </artifact:mvn> | |
| </target> | |
| <!-- ************************************* NOT USED **************************************** --> | |
| <!-- Manual signing would look something like this (not commented out due to double dashes): --> | |
| <target name="sign-artifact"> | |
| <echo message="Using gpg to sign '${artifactPath}'..."/> | |
| <exec executable="gpg" failonerror="false" logError="true"> | |
| <arg value="-u ${keyID}"/> | |
| <arg value="--sign"/> | |
| <arg value="--detach-sign"/> | |
| <arg value="-a ${artifactPath}"/> | |
| </exec> | |
| </target> | |
| <!-- But the need to expose the key ID and somehow pass on the passphrase in the script is a major issue | |
| Signing and deployment would be called like this: | |
| --> | |
| <target name="uawj-staging" unless="sign"> | |
| <!-- GPG signing calls: --> | |
| <antcall target="sign-artifact"> | |
| <param name="artifactPath" value="${artifact}"/> | |
| </antcall> | |
| <antcall target="sign-artifact"> | |
| <param name="artifactPath" value="${artifactSrc}"/> | |
| </antcall> | |
| <antcall target="sign-artifact"> | |
| <param name="artifactPath" value="${artifactJavadoc}"/> | |
| </antcall> | |
| <!-- Deployment would then look something like: --> | |
| <artifact:deploy file="${artifact}"> | |
| <artifact:remoteRepository id="${stagingId}" url="${stagingURL}"/> | |
| <artifact:pom id="maven.project" file="pom.xml" /> | |
| <artifact:attach file="${artifact}.asc" type="asc" classifier="all???"/> | |
| <artifact:attach file="${artifactSrc}" type="jar" classifier="sources"/> | |
| <artifact:attach file="${artifactSrc}.asc" type="asc" classifier="all"/> | |
| <artifact:attach file="${artifactJavadoc}" type="zip" classifier="javadoc"/> | |
| <artifact:attach file="${artifactJavadoc}.asc" type="asc" classifier="all"/> | |
| </artifact:deploy> | |
| </target> | |
| </project> | |