blob: 036df2e0fa35cfb87b81ad11c7e601fab7629401 [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 concatinated
* e.g. 'runpathref'
* - multi-word tasks (taskdef) names are concatinated
* 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="javax.persistence" default="all" basedir=".">
<target name="all" depends="init, clean, compile, package"/>
<target name="init" description="initialize local variables">
<available file="../${ant.project.name}" type="dir" property="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="is.local"/>
<property name="project.version" value="1.99.0"/>
<property name="project.jar" value="${ant.project.name}_${project.version}.jar"/>
<property name="src.dir" value="src"/>
<property name="resource.dir" value="META-INF"/>
<property name="package.dir" value=".."/>
<property name="classes.dir" value="classes"/>
<property name="javac.debug" value="true"/>
<property name="javac.optimize" value="off"/>
<property name="javac.deprecation" value="off"/>
<property name="javac.version" value="1.5"/>
<path id="compile.path">
<pathelement path="../../../plugins/osgi.core.zip"/>
<pathelement path="../../../plugins/osgi.cmpn_4.1.0.jar"/>
</path>
</target>
<target name="clean" description="Clean the build">
<delete dir="${classes.dir}" includeEmptyDirs="true" quiet="true"/>
<delete file="${package.dir}/${project.jar}" quiet="true"/>
</target>
<!-- compile -->
<target name="compile" description="compile ${ant.project.name}">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
includes="**"
debug="${javac.debug}"
optimize="${javac.optimize}"
source="${javac.version}"
target="${javac.version}"
deprecation="${javac.deprecation}"
failonerror="true">
<classpath>
<path refid="compile.path"/>
</classpath>
</javac>
</target>
<target name="package" description="package ${ant.project.name}">
<delete file="${package.dir}/${project.jar}" quiet="true"/>
<jar jarfile="${package.dir}/${project.jar}" manifest="${resource.dir}/MANIFEST.MF">
<fileset dir="${classes.dir}"
includes="**"
/>
<fileset dir="${resource.dir}"
includes="**"
excludes="MANIFEST.MF"
/>
</jar>
</target>
</project>