You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
3.8 KiB
109 lines
3.8 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
<!-- |
|
Copyright 2010 SpringSource |
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); |
|
you may not use this file except in compliance with the License. |
|
You may obtain a copy of the License at |
|
|
|
http://www.apache.org/licenses/LICENSE-2.0 |
|
|
|
Unless required by applicable law or agreed to in writing, software |
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
See the License for the specific language governing permissions and |
|
limitations under the License. |
|
--> |
|
<project name="package-common" xmlns:ivy="antlib:org.apache.ivy.ant"> |
|
|
|
<import file="common.xml"/> |
|
|
|
<!-- Main targets --> |
|
<target name="package" |
|
description="Copies all external and created artifacts to a packaging location. Unless overriden, copies nothing."> |
|
<echo message="${ant.project.name} contributed no artifacts to packaging. To contribute, override the 'package' target in the bundle." /> |
|
</target> |
|
|
|
<target name="copy-dist-jar" depends="ivy.init" |
|
description="Copies the distributable jar to a location"> |
|
<dist-jar output.dir="${copy.to.dir}"/> |
|
</target> |
|
|
|
<target name="copy-ext-jars" depends="ivy.init" |
|
description="Copies the external jars to a location"> |
|
<ext-jars output.dir="${copy.to.dir}"/> |
|
</target> |
|
|
|
<target name="copy-provided-jars" depends="ivy.init" |
|
description="Copies the provided jars to a location"> |
|
<provided-jars output.dir="${copy.to.dir}"/> |
|
</target> |
|
|
|
<target name="copy-provided-libs" depends="ivy.init" |
|
description="Copies the provided libs to a location"> |
|
<provided-libs output.dir="${copy.to.dir}"/> |
|
</target> |
|
|
|
<!-- Macros --> |
|
<macrodef name="dist-jar"> |
|
<attribute name="output.dir" default="${package.dist.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<copy file="${jar.output.file}" tofile="@{output.dir}/${package.jar.output.file}"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="src-jar"> |
|
<attribute name="output.dir" default="${package.src.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<copy file="${source-jar.output.file}" tofile="@{output.dir}/${package.source-jar.output.file}"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="add-jars"> |
|
<attribute name="output.dir" default="${package.lib.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<ivy:retrieve resolveId="additional.classpath" conf="additional" type="jar" |
|
pattern="@{output.dir}/[artifact]-[revision].[ext]" log="download-only"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="ext-jars"> |
|
<attribute name="output.dir" default="${package.lib.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<ivy:retrieve resolveId="runtime.classpath" conf="runtime" type="jar" |
|
pattern="@{output.dir}/[artifact]-[revision].[ext]" log="download-only"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="ext-jars-shallow"> |
|
<attribute name="output.dir" default="${package.lib.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<ivy:retrieve resolveId="runtime.classpath" conf="runtime" type="jar" transitive="false" |
|
pattern="@{output.dir}/[artifact]-[revision].[ext]" log="download-only"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="provided-jars"> |
|
<attribute name="output.dir" default="${package.lib.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<ivy:retrieve resolveId="provided.classpath" conf="provided" type="jar" |
|
pattern="@{output.dir}/[artifact]-[revision].[ext]" log="download-only"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
<macrodef name="provided-libs"> |
|
<attribute name="output.dir" default="${package.lib.dir}"/> |
|
<sequential> |
|
<mkdir dir="@{output.dir}"/> |
|
<ivy:retrieve resolveId="provided.classpath" conf="provided" type="library" |
|
pattern="@{output.dir}/[artifact]-[revision].[ext]" log="download-only"/> |
|
</sequential> |
|
</macrodef> |
|
|
|
</project> |