blob: 5b4dc1a26a4213998aabf2ae273302d8210f9332 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
******************************************************************************
* Copyright (c) 2008, 2010 VMware Inc., SAP AG
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* VMware Inc. - initial contribution
* SAP AG - initial contribution
******************************************************************************
-->
<project name="artifact-wab" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:bundlor="antlib:com.springsource.bundlor.ant">
<import file="common.xml"/>
<import file="../common/artifact.xml"/>
<!-- Main targets -->
<target name="jar" depends="ivy.init, resolve.compile, compile.init, jar.init"
description="Creates a JAR file containing the output of a compilation of the source tree.">
<delete quiet="true" file="${ivy.output.file}"/>
<mkdir dir="${ivy.output.dir}"/>
<delete quiet="true" file="${wab.output.file}"/>
<mkdir dir="${wab.output.dir}"/>
<delete quiet="true" file="${source-jar.output.file}"/>
<mkdir dir="${source-jar.output.dir}"/>
<copy todir="${wab.staging.dir}">
<fileset dir="${main.webapp.dir}" erroronmissingdir="false"/>
</copy>
<compile classpath.id="compile.classpath" input.dir="${main.java.dir}" output.dir="${wab.classes.dir}"
resources.dir="${main.resources.dir}"/>
<ivy:retrieve resolveId="compile.classpath" conf="compile,runtime" type="jar"
pattern="${wab.lib.dir}/[artifact]-[revision].[ext]" log="download-only"/>
<antcall target="bundlor"/>
<jar destfile="${wab.output.file}" basedir="${wab.staging.dir}" index="true" filesetmanifest="merge">
<manifest>
<attribute name="Bundle-Creator" value="${user.name}"/>
<attribute name="Implementation-Title" value="${implementation.title}"/>
<attribute name="Implementation-Version" value="${implementation.version}"/>
</manifest>
</jar>
<jar destfile="${source-jar.output.file}" index="true" filesetmanifest="merge">
<fileset dir="${main.webapp.dir}"/>
<fileset dir="${main.java.dir}"/>
</jar>
<ivy:publish resolver="integration" pubdate="${timestamp}" status="${release.type}">
<artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${wab.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${source-jar.output.dir}/[artifact].[ext]"/>
</ivy:publish>
</target>
<!-- Other targets -->
<target name="compile.init" depends="ivy.init">
<ivy:cachepath resolveId="spring.ant.classpath" pathid="spring.ant.classpath"
organisation="org.springframework.build" module="org.springframework.build.ant"
revision="${org.springframework.build.ant.version}" conf="runtime" type="jar" inline="true"
log="download-only"/>
<ivy:cachepath resolveId="ecj.classpath" pathid="ecj.classpath" organisation="org.eclipse.jdt"
module="com.springsource.org.eclipse.jdt.core.compiler.batch" revision="${org.eclipse.jdt.core.compiler.batch.version}"
conf="runtime" type="jar" inline="true" log="download-only"/>
<taskdef resource="org/springframework/build/ant/antlib.xml" uri="antlib:org.springframework.build">
<classpath>
<path refid="spring.ant.classpath"/>
<path refid="ecj.classpath"/>
</classpath>
</taskdef>
</target>
<target name="bundlor" depends="bundlor.init" unless="disable.bundlor">
<bundlor:bundlor inputPath="${wab.staging.dir}" outputPath="${wab.staging.dir}"
bundleVersion="${bundle.version}" manifestTemplatePath="${manifest.template.file}"
failOnWarnings="${fail.on.warnings}">
<propertyset refid="bundlor.properties"/>
<propertyset>
<propertyref builtin="all"/>
</propertyset>
</bundlor:bundlor>
</target>
</project>