blob: 9aa373da688a36d4ad78394402c92455a8278cbd [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
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.
-->
<!-- $Rev$ $Date$ -->
<project default="default"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant">
<goal name="jar:jar">
<ant:available property="jarExsts" file="${basedir}/target/${pom.artifactId}-${pom.currentVersion}.jar"/>
<j:if test="${jarExsts}">
<j:forEach var="artifact" items="${pom.artifacts}">
<uptodate property="rebuildJar"
srcfile="${basedir}/target/${pom.artifactId}-${pom.currentVersion}.jar"
targetfile="${artifact.path}"/>
<j:if test="${rebuildJar}">
<j:break/>
</j:if>
</j:forEach>
</j:if>
<j:if test="${!jarExsts || rebuildJar}">
<ant:mkdir dir="${basedir}/target"/>
<ant:delete file="${basedir}/target/${pom.artifactId}-${pom.currentVersion}.jar"/>
<ant:jar destfile="${basedir}/target/${pom.artifactId}-${pom.currentVersion}.jar">
<ant:metainf dir="${basedir}">
<ant:include name="LICENSE.txt"/>
</ant:metainf>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dependency" value="${artifact.dependency}"/>
<j:if test="${dependency.getProperty('geronimo.spec.bundle') == 'true'}">
<zipfileset src="${artifact.path}" excludes="META-INF/LICENSE.txt"/>
</j:if>
</j:forEach>
</ant:jar>
</j:if>
</goal>
<!-- install jar - ->
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<ant:mkdir dir="${jardir__}"/>
<ant:copy
file="${basedir}/target/${pom.artifactId}-${pom.currentVersion}.jar"
todir="${jardir__}"
overwrite="false"
/>
</goal-->
</project>