blob: 9522a89cbe4eb42eb98095c0cf0e2d303877c740 [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 '.'
* - 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.
*
* Contributors:
* egwin - initial API and implementation
#******************************************************************************/-->
<project name="compdeps" 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="generate-p2" if="p2.tooling.available" depends="generate-p2-site, test-p2-site"/>
<target name="init">
<tstamp>
<format property="compdeps.build.date" pattern="yyyyMMdd"/>
<format property="compdeps.build.time" pattern="HHmm"/>
</tstamp>
<dirname property="compdeps.build.location_temp" file="${ant.file.compdeps}"/>
<pathconvert targetos="unix" property="compdeps.build.location">
<path>
<pathelement location="${compdeps.build.location_temp}"/>
</path>
</pathconvert>
<property file="${user.home}/build.properties"/>
<!-- compdeps.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="compdeps.2.base.dir" value="${compdeps.build.location}/../.."/>
<property name="compdeps.2.common.dir" value="${compdeps.2.base.dir}/features/common"/>
<property name="compdeps.2.common.plugins.dir" value="${compdeps.2.base.dir}/plugins"/>
<property name="compdeps.2.jpa.plugins.dir" value="${compdeps.2.base.dir}/jpa/plugins"/>
<property name="compdeps.2.sdo.plugins.dir" value="${compdeps.2.base.dir}/sdo/plugins"/>
<property name="compdeps.2.util.plugins.dir" value="${compdeps.2.base.dir}/utils/plugins"/>
<property name="compdeps.2.buildsys.dir" value="${compdeps.2.base.dir}/buildsystem"/>
<echo message="ant.project.name ='${ant.project.name}'"/>
<echo message="basedir ='${basedir}'"/>
<echo message="compdeps.build.location ='${compdeps.build.location}'"/>
<echo message="compdeps.2.base.dir ='${compdeps.2.base.dir}'"/>
<echo message="compdeps.2.common.dir ='${compdeps.2.common.dir}'"/>
<echo message="compdeps.2.common.plugins.dir ='${compdeps.2.common.plugins.dir}'"/>
<echo message="compdeps.2.jpa.plugins.dir ='${compdeps.2.jpa.plugins.dir}'"/>
<echo message="compdeps.2.sdo.plugins.dir ='${compdeps.2.sdo.plugins.dir}'"/>
<echo message="compdeps.2.util.plugins.dir ='${compdeps.2.util.plugins.dir}'"/>
<echo message="compdeps.2.buildsys.dir ='${compdeps.2.buildsys.dir}'"/>
<echo message=" ---"/>
<!-- Custom task definitions -->
<property name="custom.tasks.lib" value="${compdeps.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="compdeps.version" value="1.0.4"/>
<property name="compdeps.qualifier" value="v${compdeps.build.date}${compdeps.build.time}"/>
<property name="compdeps.version.string" value="${compdeps.version}.${compdeps.qualifier}"/>
<property name="bld.src.dir" value="${compdeps.build.location}/target"/>
<property name="p2repo.dir" value="${compdeps.build.location}/p2repo"/>
<property name="specification.vendor" value="Eclipse.org - EclipseLink Project"/>
<echo message="compdeps.version ='${compdeps.version}'"/>
<echo message="compdeps.qualifier ='${compdeps.qualifier}'"/>
<echo message="compdeps.version.string ='${compdeps.version.string}'"/>
<echo message="p2repo.dir ='${p2repo.dir}'"/>
<echo message="specification.vendor ='${specification.vendor}'"/>
<echo message=" ---"/>
<!-- Tool definitions -->
<property name="eclipse.install.dir" value="D:\Juno-M7\eclipse"/>
<property name="eclipse.plugin.dir" value="${eclipse.install.dir}/plugins"/>
<property name="p2.publisher.prefix" value="org.eclipse.equinox.p2.publisher"/>
<property name="p2.launcher.prefix" value="org.eclipse.equinox.launcher"/>
<property name="p2.artifact.prefix" value="org.eclipse.equinox.artifact.repository"/>
<available file="${eclipse.plugin.dir}" property="eclipse.install.exist"/>
<echo message="eclipse.install.dir ='${eclipse.install.dir}'"/>
<say message="eclipse.plugin.dir ='${eclipse.plugin.dir}'" if="eclipse.install.exist"/>
<say message="eclipse.plugin.dir: '${eclipse.plugin.dir}' not found!" unless="eclipse.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=" ---"/>
<!-- Input definitions -->
<property name="p2.feature.dir" value="${p2repo.dir}/features"/>
<property name="p2.bundle.dir" value="${p2repo.dir}/plugins"/>
<echo message="p2.feature.dir ='${p2.feature.dir}'"/>
<echo message="p2.bundle.dir ='${p2.bundle.dir}'"/>
<echo message=" ---"/>
<!-- Helper definitions derived from Pre-set variables -->
<property name="compdeps.build.dir" value="${p2.feature.dir}"/>
<echo message="compdeps.build.dir ='${compdeps.build.dir}'"/>
<echo message=" ---"/>
<!-- Output definitions -->
<property name="p2.repos.url" value="file:/${p2repo.dir}"/> <!-- DO NOT Override this one -->
<property name="p2.release.repos.name" value="EclipseLink Compdeps Repository"/>
<property name="p2.release.repos.url" value="http://archive.eclipse.org/rt/eclipselink/compdeps-updates"/>
<property name="metadata.repos.name" value="&quot;${p2.release.repos.name}&quot;"/>
<property name="artifact.repos.name" value="&quot;EclipseLink Compdeps Artifacts&quot;"/>
<echo message="p2.repos.url ='${p2.repos.url}'"/>
<echo message="p2.release.repos.name ='${p2.release.repos.name}'"/>
<echo message="p2.release.repos.url ='${p2.release.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="javax.xml.bind.prefix" value="javax.xml.bind"/>
<property name="javax.xml.bind.criteria" value="[0.0.1,5.0.0)"/>
<property name="sun.tools.xjc.prefix" value="jaxb-xjc"/>
<property name="sun.tools.xjc.criteria" value="[2.2.11,5.0.0)"/>
<property name="sun.xml.bind.prefix" value="jaxb-core"/>
<property name="sun.xml.bind.criteria" value="[0.0.1,5.0.0)"/>
<property name="sdo.prefix" value="commonj.sdo"/>
<property name="sdo.criteria" value="[2.1.1,5.0.0)"/>
<property name="ejb.prefix" value="javax.ejb"/>
<property name="ejb.criteria" value="[0.0.1,5.0.0)"/>
<property name="jms.prefix" value="javax.jms"/>
<property name="jms.criteria" value="[0.0.1,5.0.0)"/>
<property name="persistence.prefix" value="javax.persistence"/>
<property name="persistence.criteria" value="[2.0.0,2.3.0)"/>
<property name="resource.prefix" value="javax.resource"/>
<property name="resource.criteria" value="[0.0.1,5.0.0)"/>
<property name="transaction.prefix" value="javax.transaction"/>
<property name="transaction.criteria" value="[0.0.1,5.0.0)"/>
<property name="validation.prefix" value="javax.validation.api"/>
<property name="validation.criteria" value="[0.0.1,5.0.0)"/>
<property name="servlet.prefix" value="javax.servlet"/>
<property name="servlet.criteria" value="[0.0.1,5.0.0)"/>
<property name="wsdl.prefix" value="javax.wsdl"/>
<property name="wsdl.criteria" value="[0.0.1,5.0.0)"/>
<property name="wsrs.prefix" value="javax.ws.rs"/>
<property name="wsrs.criteria" value="[2.0.1,5.0.0)"/>
<property name="xml.soap.prefix" value="javax.xml.soap"/>
<property name="xml.soap.criteria" value="[0.0.1,5.0.0)"/>
<property name="json.prefix" value="org.glassfish.javax.json"/>
<property name="json.criteria" value="[1.0.4,5.0.0)"/>
<!-- For EclipseLink bundles -->
<property name="antlr.prefix" value="org.eclipse.persistence.antlr"/>
<property name="antlr.criteria" value="[3.0,5.0)"/>
<property name="asm.prefix" value="org.eclipse.persistence.asm"/>
<property name="asm.criteria" value="[3.0,9.0)"/>
<property name="oracleddl.prefix" value="org.eclipse.persistence.oracleddlparser"/>
<property name="oracleddl.criteria" value="[0.0.1,5.0)"/>
<property name="slf4j.prefix" value="org.slf4j.api"/>
<property name="slf4j.criteria" value="[0.0.1,5.0)"/>
<property name="mongodb.prefix" value="org.mongodb.mongo-java-driver"/>
<property name="mongodb.criteria" value="[3.0.0,4.0)"/>
</target>
<!-- Need to copy only the bundles that will be in the features into the "p2repo.dir/plugins" dir
(so must copy from main plugins to new temp location). Also need to filter copy the feature xml
files to "p2repo.dir/features" to substitute the actual version.qualifer string into it.
Then can Generate P2. -->
<target name="build" depends="init, build-feature, generate-p2"/>
<target name="build-feature" depends="clean, create-deployable-features"/>
<!-- Feature Targets -->
<!-- clean -->
<target name="clean" depends="init" description="Clean all generated content">
<delete dir="${bld.src.dir}" includeEmptyDirs="true" failonerror="false"/>
<delete dir="${p2repo.dir}" includeEmptyDirs="true" failonerror="false"/>
</target>
<target name="resolve-feature-dependencies" if="eclipse.install.exist" depends="init">
<echo message="Searching ${compdeps.2.common.plugins.dir}..."/>
<selectbundle basename="${javax.xml.bind.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${javax.xml.bind.criteria}" property="javax.xml.bind.version" versiononly="true"
/>
<selectbundle basename="${sun.xml.bind.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${sun.xml.bind.criteria}" property="sun.xml.bind.version" versiononly="true"
/>
<selectbundle basename="${sun.tools.xjc.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${sun.tools.xjc.criteria}" property="sun.tools.xjc.version" versiononly="true"
/>
<selectbundle basename="${ejb.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${ejb.criteria}" property="ejb.version" versiononly="true"
/>
<selectbundle basename="${jms.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${jms.criteria}" property="jms.version" versiononly="true"
/>
<selectbundle basename="${resource.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${resource.criteria}" property="resource.version" versiononly="true"
/>
<selectbundle basename="${transaction.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${transaction.criteria}" property="transaction.version" versiononly="true"
/>
<selectbundle basename="${servlet.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${servlet.criteria}" property="servlet.version" versiononly="true"
/>
<selectbundle basename="${xml.soap.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${xml.soap.criteria}" property="xml.soap.version" versiononly="true"
/>
<selectbundle basename="${antlr.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${antlr.criteria}" property="antlr.version" versiononly="true"
/>
<selectbundle basename="${asm.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${asm.criteria}" property="asm.version" versiononly="true"
/>
<selectbundle basename="${validation.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${validation.criteria}" property="validation.version" versiononly="true"
/>
<selectbundle basename="${json.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${json.criteria}" property="json.version" versiononly="true"
/>
<selectbundle basename="${wsrs.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${wsrs.criteria}" property="wsrs.version" versiononly="true"
/>
<selectbundle basename="${slf4j.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${slf4j.criteria}" property="slf4j.version" versiononly="true"
/>
<selectbundle basename="${mongodb.prefix}" directory="${compdeps.2.common.plugins.dir}"
criterion="${mongodb.criteria}" property="mongodb.version" versiononly="true"
/>
<say message=" javax.xml.bind.version = '${javax.xml.bind.version}'" if="javax.xml.bind.version"/>
<say message=" '{$javax.xml.bind.prefix}_{$javax.xml.bind.criteria}' not found! Generated features will be invalid." unless="javax.xml.bind.version"/>
<say message=" sun.tools.xjc.version = '${sun.tools.xjc.version}'" if="sun.tools.xjc.version"/>
<say message=" '${sun.tools.xjc.prefix}_${sun.tools.xjc.criteria}.jar' not found! Generated features will be invalid." unless="sun.tools.xjc.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=" ejb.version = '${ejb.version}'" if="ejb.version"/>
<say message=" '${ejb.prefix}_${ejb.criteria}.jar' not found! Generated features will be invalid." unless="ejb.version"/>
<say message=" jms.version = '${jms.version}'" if="jms.version"/>
<say message=" '${jms.prefix}_${jms.criteria}.jar' not found! Generated features will be invalid." unless="jms.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=" transaction.version = '${transaction.version}'" if="transaction.version"/>
<say message=" '${transaction.prefix}_${transaction.criteria}.jar' not found! Generated features will be invalid." unless="transaction.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.soap.version = '${xml.soap.version}'" if="xml.soap.version"/>
<say message=" '${xml.soap.prefix}_${xml.soap.criteria}.jar' not found! Generated features will be invalid." unless="xml.soap.version"/>
<say message=" antlr.version = '${antlr.version}'" if="antlr.version"/>
<say message=" '${antlr.prefix}_${antlr.criteria}.jar' not found! Generated features will be invalid." unless="antlr.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=" validation.version = '${validation.version}'" if="validation.version"/>
<say message=" '${validation.prefix}_${validation.criteria}.jar' not found! Generated features will be invalid." unless="validation.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"/>
<say message=" slf4j.version = '${slf4j.version}'" if="slf4j.version"/>
<say message=" '${slf4j.prefix}_${slf4j.criteria}.jar' not found! Generated features will be invalid." unless="slf4j.version"/>
<say message=" wsrs.version = '${wsrs.version}'" if="wsrs.version"/>
<say message=" '${wsrs.prefix}_${wsrs.criteria}.jar' not found! Generated features will be invalid." unless="wsrs.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"/>
<echo message="Searching ${compdeps.2.jpa.plugins.dir}..."/>
<selectbundle basename="${persistence.prefix}" directory="${compdeps.2.jpa.plugins.dir}"
criterion="${persistence.criteria}" property="persistence.version" versiononly="true"
/>
<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 ${compdeps.2.sdo.plugins.dir}..."/>
<selectbundle basename="${sdo.prefix}" directory="${compdeps.2.sdo.plugins.dir}"
criterion="${sdo.criteria}" property="sdo.version" versiononly="true"
/>
<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 ${compdeps.2.util.plugins.dir}..."/>
<selectbundle basename="${oracleddl.prefix}" directory="${compdeps.2.util.plugins.dir}"
criterion="${oracleddl.criteria}" property="oracleddl.version" versiononly="true"
/>
<selectbundle basename="${wsdl.prefix}" directory="${compdeps.2.util.plugins.dir}"
criterion="${wsdl.criteria}" property="wsdl.version" versiononly="true"
/>
<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"/>
</target>
<!-- build feature jars -->
<target name="jar-feature" description="General target for packaging a feature">
<mkdir dir="${compdeps.build.dir}"/>
<jar jarfile="${compdeps.build.dir}/${feature.name}_${compdeps.version.string}.jar" duplicate="preserve">
<fileset dir="${compdeps.2.common.dir}">
<include name="*.html"/>
<exclude name="*.bak"/>
</fileset>
<fileset dir="${compdeps.2.base.dir}">
<include name="about.html"/>
<include name="readme.html"/>
<exclude name="*.bak"/>
</fileset>
<fileset dir="${bld.src.dir}/${feature.name}">
<include name="*.*"/>
<exclude name="*.bak"/>
</fileset>
</jar>
</target>
<target name="create-deployable-features" if="eclipse.install.exist" depends="resolve-feature-dependencies">
<mkdir dir="${bld.src.dir}"/>
<!-- Filters for feature.xml files -->
<filter token="VERSION" value="${compdeps.version}"/>
<filter token="QUALIFIER" value="${compdeps.qualifier}"/>
<!-- Filters for dependencies in feature.xml files -->
<filter token="XJC_VERSION" value="${sun.tools.xjc.version}"/>
<filter token="JAXB_CORE_VERSION" value="${sun.xml.bind.version}"/>
<filter token="JAVAX_XML_BIND_VERSION" value="${javax.xml.bind.version}"/>
<filter token="EJB_VERSION" value="${ejb.version}"/>
<filter token="JMS_VERSION" value="${jms.version}"/>
<filter token="RESOURCE_VERSION" value="${resource.version}"/>
<filter token="TRANSACTION_VERSION" value="${transaction.version}"/>
<filter token="SERVLET_VERSION" value="${servlet.version}"/>
<filter token="XML_SOAP_VERSION" value="${xml.soap.version}"/>
<filter token="PERSISTENCE_VERSION" value="${persistence.version}"/>
<filter token="VALIDATION_VERSION" value="${validation.version}"/>
<filter token="SDO_VERSION" value="${sdo.version}"/>
<filter token="JSON_VERSION" value="${json.version}"/>
<filter token="WSDL_VERSION" value="${wsdl.version}"/>
<filter token="WSRS_VERSION" value="${wsrs.version}"/>
<filter token="MONGODB_VERSION" value="${mongodb.version}"/>
<!-- Filters for product bundles in feature.xml files -->
<filter token="ANTLR_VERSION" value="${antlr.version}"/>
<filter token="ASM_VERSION" value="${asm.version}"/>
<filter token="ORACLEDDL_VERSION" value="${oracleddl.version}"/>
<filter token="SLF4J_VERSION" value="${slf4j.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.release.repos.name}"/>
<filter token="PRIME_UPDATE_URL" value="${p2.release.repos.url}"/>
<filter token="SECOND_UPDATE_URL" value="${p2.release.repos.url}"/>
<copy todir="${bld.src.dir}" filtering="true">
<fileset dir="${compdeps.build.location}">
<include name="**/feature*.*"/>
</fileset>
</copy>
<antcall target="jar-feature">
<param name="feature.name" value="org.eclipse.persistence.compdeps"/>
</antcall>
</target>
<!-- P2 Targets -->
<target name="populate-p2-site" if="eclipse.install.exist" depends="init, resolve-feature-dependencies">
<delete dir="${p2.bundle.dir}" failonerror="false"/>
<mkdir dir="${p2.bundle.dir}"/>
<!-- populate bundle jars -->
<copy todir="${p2.bundle.dir}">
<fileset
dir="${compdeps.2.common.plugins.dir}"
includes="${javax.xml.bind.prefix}_${javax.xml.bind.version}.jar,
${ejb.prefix}_${ejb.version}.jar,
${jms.prefix}_${jms.version}.jar,
${resource.prefix}_${resource.version}.jar,
${transaction.prefix}_${transaction.version}.jar,
${servlet.prefix}_${servlet.version}.jar,
${xml.soap.prefix}_${xml.soap.version}.jar,
${antlr.prefix}_${antlr.version}.jar,
${antlr.prefix}.source_${antlr.version}.jar,
${asm.prefix}_${asm.version}.jar,
${asm.prefix}.source_${asm.version}.jar,
${validation.prefix}_${validation.version}.jar,
${json.prefix}_${json.version}.jar,
${slf4j.prefix}_${slf4j.version}.jar,
${wsrs.prefix}_${wsrs.version}.jar,
${mongodb.prefix}_${mongodb.version}.jar,
${sun.tools.xjc.prefix}_${sun.tools.xjc.version}.jar,
${sun.tools.xjc.prefix}.source_${sun.tools.xjc.version}.jar,
${sun.xml.bind.prefix}_${sun.xml.bind.version}.jar,
${sun.xml.bind.prefix}.source_${sun.xml.bind.version}.jar"
/>
<fileset
dir="${compdeps.2.jpa.plugins.dir}"
includes="${persistence.prefix}_${persistence.version}.jar,
${persistence.prefix}.source_${persistence.version}.jar"
/>
<fileset
dir="${compdeps.2.sdo.plugins.dir}"
includes="${sdo.prefix}_${sdo.version}.jar"
/>
<fileset
dir="${compdeps.2.util.plugins.dir}"
includes="${oracleddl.prefix}_${oracleddl.version}.jar,
${oracleddl.prefix}.source_${oracleddl.version}.jar,
${wsdl.prefix}_${wsdl.version}.jar"
/>
</copy>
</target>
<target name="configure-tooling" if="eclipse.install.exist" depends="init">
<selectbundle basename="${p2.launcher.prefix}" directory="${eclipse.plugin.dir}"
criterion="[0.0.1,9.0.0)" property="p2.launcher.jar"
/>
<selectbundle basename="${p2.publisher.prefix}" directory="${eclipse.plugin.dir}"
criterion="[0.0.1,9.0.0)" property="p2.publisher.jar"
/>
<echo message="eclipse.plugin.dir ='${eclipse.plugin.dir}'"/>
<say message="p2.launcher.jar ='${p2.launcher.jar}'" if="p2.launcher.jar"/>
<say message=" '${p2.launcher.prefix}_[0.0.1,9.0.0).jar' not found! P2 Generation will fail." unless="p2.launcher.jar"/>
<say message="p2.publisher.jar ='${p2.publisher.jar}'" if="p2.publisher.jar"/>
<say message=" '${p2.publisher.prefix}_[0.0.1,9.0.0).jar' not found!P2 Generation will fail." unless="p2.publisher.jar"/>
<condition property="p2.tooling.available">
<and>
<isset property="p2.launcher.jar"/>
<isset property="p2.publisher.jar"/>
</and>
</condition>
<say message="All P2 Generation libraries not available. Generation aborted!" unless="p2.tooling.available"/>
</target>
<target name="generate-p2-site" if="p2.tooling.available" depends="configure-tooling, populate-p2-site">
<delete file="${p2repo.dir}/site.xml" quiet="true"/>
<filter token="REPOS_URL" value="${p2.release.repos.url}"/>
<filter token="VERSION" value="${compdeps.version}"/>
<filter token="QUALIFIER" value="${compdeps.qualifier}"/>
<copy todir="${p2repo.dir}" file="${compdeps.build.location}/site.xml" filtering="true"/>
<echo message="java.home ='${java.home}'"/>
<echo message="-----"/>
<echo message="p2repo.dir ='${p2repo.dir}'"/>
<echo message="p2.repos.url ='${p2.repos.url}'"/>
<echo message="p2.release.repos.url ='${p2.release.repos.url}'"/>
<echo message="-----"/>
<!-- Metadata generator apparently doesn't rebuild the artifact and content xml files if they already exist -->
<delete failonerror="false">
<fileset dir="${p2repo.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="${eclipse.plugin.dir}"
includes="${p2.launcher.jar},
${p2.publisher.jar}"/>
<pathelement location="${eclipse.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 ${p2repo.dir}" />
<arg line=" -compress -publishArtifacts -configs all" />
</java>
</target>
<target name="test-p2-site" if="p2.tooling.available" >
<!-- EclipseLink CompDeps feature installation variables -->
<property name="p2.director.jar" value="org.eclipse.equinox.p2.director_*.jar"/>
<property name="p2.director.destination" location="${eclipse.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.compdeps.feature.group" />
<property name="p2.director.action" value="-verifyOnly" />
<property name="p2.director.eclipse.version" value="luna" />
<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 with Compilation dependencies: '${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="${eclipse.plugin.dir}"
includes="${p2.launcher.jar},
${p2.director.jar}"/>
<pathelement location="${eclipse.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},http://download.eclipse.org/tools/orbit/downloads/drops/R20130827064939/repository,${p2.director.eclipse.updateSite}" />-->
<arg line="-repository ${p2.repos.url},${p2.director.eclipse.updateSite}" />
<arg line="${p2.director.additionalArgs}"/>
</java>
</target>
</project>