blob: f98fb7c6e055b7085c32d42f4187f242f55adcd0 [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:
* tware - initial API and implementation
* egwin - update to adopt calling standards
#******************************************************************************/-->
<project name="eclipselink.utils.rename" default="build" basedir=".">
<available file="../${ant.project.name}" type="dir" property="rename.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 unless="rename.is.local" message="Not running from '${ant.project.name}' directory"/>
<!-- properties checked into SVN -->
<property file="./antbuild.properties"/>
<!-- versioning -->
<!-- These variables are set in autobuild.xml. A manual build gets defaults -->
<tstamp>
<format property="build.date" pattern="yyyyMMdd"/>
<format property="build.time" pattern="HHmm"/>
</tstamp>
<property name="build.type" value="SNAPSHOT"/>
<property name="svn.revision" value="NA"/>
<property name="version.string" value="${release.version}.qualifier"/>
<property name="release.designation" value="EclipseLink DeveloperBuild"/>
<!-- all -->
<target name="build" depends="clean, compile, package" description="build rename jar"/>
<!-- clean -->
<target name="clean" description="Clean the build">
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${classes.dir}"/>
<fileset dir="." file="${package-rename.jar}"/>
</delete>
</target>
<!-- compile -->
<target name="compile" description="compile Rename Util">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
includes="**/*.java"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
encoding="UTF-8"
optimize="${javac.optimize}"
source="${javac.version}"
target="${javac.version}"
deprecation="${javac.deprecation}"
failonerror="true">
</javac>
</target>
<!-- package -->
<target name="package" description="jar the util">
<delete file="./${package-rename.jar}" failonerror="false"/>
<jar jarfile="./${package-rename.jar}">
<manifest>
<attribute name="Specification-Title" value="${rename.util.specification.title}"/>
<attribute name="Specification-Vendor" value="${specification.vendor}"/>
<attribute name="Specification-Version" value="${release.version}"/>
<attribute name="Implementation-Title" value="${rename.util.implementation.title}"/>
<attribute name="Implementation-Vendor" value="${implementation.vendor}"/>
<attribute name="Implementation-Version" value="${version.string}"/>
<attribute name="Release-Designation" value="${release.designation}"/>
</manifest>
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
</fileset>
</jar>
</target>
</project>