blob: b8d9345792e4789e7b3729cd4d567fa8f3713367 [file] [log] [blame]
<!--/*******************************************************************************
* 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, add ability to override
* destination URL (to pub elsewhere override ${maven.repo.url})
* 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.0.8.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
classpathref="maven-ant-tasks.classpath" />
<!-- "maven dir" defined for later use ensuring only single upload occurs -->
<property name="maven.repo.dir" value="${eclipselink.root.download.dir}/maven.repo"/>
<!-- Setup a generic URL variable that can be overridden for publishing to other locations -->
<property name="maven.repo.url" value="file:///${maven.repo.dir}"/>
<!-- The default repository where maven artifacts will be uploaded -->
<artifact:remoteRepository id="eclipselink.repository" url="${maven.repo.url}" />
<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>
<property name="target.repository" value="eclipselink.repository"/>
</target>
<target name="discover-static-built-info" depends="init">
<property name="jpaapi.prefix" value="javax.persistence"/>
<property name="jpaapi.criteria" value="[2.0.100, 2.2)"/>
<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="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="[3.0.0,4.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="${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="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="&lt;dependencies&gt;"/>
<property name="dep.grp" value="&lt;dependency&gt;&lt;groupId&gt;"/>
<property name="dep.art" value="&lt;/groupId&gt;&lt;artifactId&gt;"/>
<property name="dep.ver" value="&lt;/artifactId&gt;&lt;version&gt;"/>
<property name="dep.type" value="&lt;/version&gt;&lt;type&gt;"/>
<property name="dep.scope" value="&lt;/type&gt;&lt;scope&gt;"/>
<property name="dep.opt" value="&lt;/scope&gt;&lt;optional&gt;"/>
<property name="dep.foot" value="&lt;/optional&gt;&lt;/dependency&gt;"/>
<property name="deps.foot" value="&lt;/dependencies&gt;"/>
<!-- 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}"/>
<!-- 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}"/>
<property name="dep.extension" value="${dep.grp}org.eclipse.persistence${dep.art}org.eclipse.persistence.extension{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}${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}${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.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.antlr}${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>
<target name="upload-static-built-jars" depends="discover-static-built-info">
<!-- 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) -->
<antcall target="upload-release-artifact">
<param name="repo.dir" value="/${maven.repo.dir}/org/eclipse/persistence/${jpaapi.prefix}/${jpaapi.mvn.version}"/>
<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>
<antcall target="upload-release-artifact">
<param name="repo.dir" value="/${maven.repo.dir}/org/eclipse/persistence/${sdoapi.prefix}/${sdoapi.mvn.version}"/>
<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 -->
<!-- Change back for (and post) release -->
<!-- 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">
<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">
<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">
<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>
<target name="verify-no-exist">
<available file="${repo.dir}" property="repo.version.exist" type="dir" value="true"/>
<say message="'${artifactName}' version '${artifactVersion}' already deployed to repository... skipping." if="repo.version.exist"/>
</target>
<!-- Uploads a single artifact & source to maven repository only if one doesn't already exist -->
<target name="upload-release-artifact" unless="repo.version.exist" depends="verify-no-exist, prepare-pom">
<echo message="Deploying '${artifactName}' version '${artifactVersion}' to repository..."/>
<!-- Deploy the jar to maven repository along with sources -->
<artifact:pom id="maven.project" file="pom.xml" />
<artifact:deploy file="${artifact}">
<remoteRepository refid="${target.repository}"/>
<pom refid="maven.project"/>
<artifact:attach file="${artifactSrc}" classifier="sources"/>
</artifact:deploy>
<!-- cleanup -->
<delete file="pom.xml"/>
</target>
<!-- Uploads a single artifact & source to maven repository -->
<target name="upload-artifact" depends="prepare-pom">
<!-- Deploy the jar to maven repository along with sources -->
<artifact:pom id="maven.project" file="pom.xml" />
<artifact:deploy file="${artifact}">
<remoteRepository refid="${target.repository}"/>
<pom refid="maven.project"/>
<artifact:attach file="${artifactSrc}" classifier="sources"/>
</artifact:deploy>
<!-- cleanup -->
<delete file="pom.xml"/>
</target>
<!-- Uploads a single artifact, source & javadoc to maven repository -->
<target name="upload-artifact-with-javadoc" depends="prepare-pom">
<!-- Deploy the jar to maven repository along with sources -->
<artifact:pom id="maven.project" file="pom.xml" />
<artifact:deploy file="${artifact}">
<remoteRepository refid="${target.repository}"/>
<pom refid="maven.project"/>
<artifact:attach file="${artifactSrc}" classifier="sources"/>
<artifact:attach file="${artifactJavadoc}" classifier="javadoc"/>
</artifact:deploy>
<!-- cleanup -->
<delete file="pom.xml"/>
</target>
</project>