Explicity use ant name space. In prep for removal of jeez etc

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113194 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion
2003-03-26 12:32:50 +00:00
parent ed977c30b3
commit dd6a81a782
5 changed files with 111 additions and 102 deletions

View File

@@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:license="license"
xmlns:maven="jelly:maven"
xmlns:deploy="deploy"
@@ -21,24 +22,24 @@
<j:choose>
<j:when test="${!pom.build.resources.includes.isEmpty()}">
<property name="maven.has.jar.resource.patterns" value="true"/>
<ant:property name="maven.has.jar.resource.patterns" value="true"/>
</j:when>
<j:when test="${!pom.build.resources.excludes.isEmpty()}">
<property name="maven.has.jar.resource.patterns" value="true"/>
<ant:property name="maven.has.jar.resource.patterns" value="true"/>
</j:when>
<j:otherwise>
<property name="maven.has.jar.resource.patterns" value="false"/>
<ant:property name="maven.has.jar.resource.patterns" value="false"/>
</j:otherwise>
</j:choose>
<patternset id="maven.jar.resources.set">
<ant:patternset id="maven.jar.resources.set">
<j:forEach var="res" items="${pom.build.resources.includes}">
<include name="${res}"/>
<ant:include name="${res}"/>
</j:forEach>
<j:forEach var="res" items="${pom.build.resources.excludes}">
<exclude name="${res}"/>
<ant:exclude name="${res}"/>
</j:forEach>
</patternset>
</ant:patternset>
<!-- ================================================================== -->
<!-- P R E P A R E F I L E S Y S T E M -->
@@ -46,7 +47,7 @@
<goal name="java:prepare-filesystem"
description="Create the directory structure needed to compile">
<mkdir dir="${maven.build.dest}"/>
<ant:mkdir dir="${maven.build.dest}"/>
</goal>
<!-- ================================================================== -->
@@ -59,15 +60,15 @@
<j:choose>
<j:when test="${sourcesPresent == 'true'}">
<javac
<ant:javac
destdir="${maven.build.dest}"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<path refid="maven.compile.src.set"/>
</src>
<ant:src>
<ant:path refid="maven.compile.src.set"/>
</ant:src>
<!--
|
@@ -76,52 +77,52 @@
-->
<j:forEach var="sm" items="${pom.build.sourceModifications}">
<available property="classPresent" classname="${sm.className}"/>
<ant:available property="classPresent" classname="${sm.className}"/>
<j:if test="${classPresent != 'true'}">
<j:forEach var="exclude" items="${sm.excludes}">
<exclude name="${exclude}"/>
<ant:exclude name="${exclude}"/>
</j:forEach>
<j:forEach var="include" items="${sm.includes}">
<include name="${include}"/>
<ant:include name="${include}"/>
</j:forEach>
</j:if>
</j:forEach>
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement path="${maven.build.dest}"/>
</classpath>
<ant:classpath>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
</ant:classpath>
<j:if test="${context.getVariable('maven.compile.compilerargs') != null}">
<compilerarg line="${maven.compile.compilerargs}" />
<ant:compilerarg line="${maven.compile.compilerargs}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.encoding') != null}">
<setProperty name="encoding" value="${maven.compile.encoding}" />
<ant:setProperty name="encoding" value="${maven.compile.encoding}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.executable') != null}">
<setProperty name="executable" value="${maven.compile.executable}" />
<ant:setProperty name="executable" value="${maven.compile.executable}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.fork') != null}">
<setProperty name="fork" value="${maven.compile.fork}" />
<ant:setProperty name="fork" value="${maven.compile.fork}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.source') != null}">
<setProperty name="source" value="${maven.compile.source}" />
<ant:setProperty name="source" value="${maven.compile.source}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.target') != null}">
<setProperty name="target" value="${maven.compile.target}" />
<ant:setProperty name="target" value="${maven.compile.target}" />
</j:if>
<j:if test="${context.getVariable('maven.compile.verbose') != null}">
<setProperty name="verbose" value="${maven.compile.verbose}" />
<ant:setProperty name="verbose" value="${maven.compile.verbose}" />
</j:if>
</javac>
</ant:javac>
</j:when>
<j:otherwise>
<echo>No java source files to compile.</echo>
<ant:echo>No java source files to compile.</ant:echo>
</j:otherwise>
</j:choose>
@@ -151,42 +152,42 @@
description="Create the deliverable jar file."
prereqs="test:test">
<available property="maven.jar.manifest.available"
<ant:available property="maven.jar.manifest.available"
file="${maven.jar.manifest}"/>
<jar
<ant:jar
jarfile="${maven.build.dir}/${maven.final.name}.jar"
basedir="${maven.build.dest}"
excludes="${maven.jar.excludes}">
<j:if test="${maven.jar.manifest.available}">
<setProperty name="manifest" value="${maven.jar.manifest}" />
<ant:setProperty name="manifest" value="${maven.jar.manifest}" />
</j:if>
<j:set var="licenseFileName"><license:fileName/></j:set>
<util:file name="${licenseFileName}" var="licenseFile"/>
<metainf dir="${licenseFile.canonicalFile.parent}">
<include name="${licenseFile.canonicalFile.name}"/>
</metainf>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Created-By" value="Apache Jakarta Maven"/>
<attribute name="Package" value="${pom.package}"/>
<attribute name="Build-Jdk" value="${java.version}"/>
<ant:metainf dir="${licenseFile.canonicalFile.parent}">
<ant:include name="${licenseFile.canonicalFile.name}"/>
</ant:metainf>
<ant:manifest>
<ant:attribute name="Built-By" value="${user.name}"/>
<ant:attribute name="Created-By" value="Apache Jakarta Maven"/>
<ant:attribute name="Package" value="${pom.package}"/>
<ant:attribute name="Build-Jdk" value="${java.version}"/>
<!-- added supplementary entries -->
<attribute name="Extension-Name" value="${pom.artifactId}"/>
<attribute name="Specification-Version" value="${pom.specificationVersion}"/>
<attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<attribute name="Specification-Title" value="${pom.shortDescription}"/>
<attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
<attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
<ant:attribute name="Extension-Name" value="${pom.artifactId}"/>
<ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/>
<ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<ant:attribute name="Specification-Title" value="${pom.shortDescription}"/>
<ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
<ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
<j:set var="mainclass" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.jar.mainclass')}"/>
<j:if test="${!empty(mainclass)}">
<attribute name="Main-Class" value="${mainclass}"/>
<ant:attribute name="Main-Class" value="${mainclass}"/>
</j:if>
</manifest>
</jar>
</ant:manifest>
</ant:jar>
</goal>
<!-- ================================================================== -->
@@ -200,7 +201,7 @@
<maven:snapshot project="${pom}"/>
<j:set var="maven.final.name" value="${snapshotSignature}"/>
<echo>Building snapshot JAR: ${maven.final.name}</echo>
<ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
<attainGoal name="java:jar"/>
@@ -216,8 +217,9 @@
<m:user-check user="${maven.username}"/>
<attainGoal name="jar:snapshot"/>
<property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<property name="dir" value="${maven.repo.central.directory}/${pom.artifactDirectory}/jars"/>
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<ant:property name="dir"
value="${maven.repo.central.directory}/${pom.artifactDirectory}/jars"/>
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
@@ -245,7 +247,7 @@
<m:user-check user="${maven.username}"/>
<attainGoal name="java:jar"/>
<property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<j:set var="sl" value="/"/>
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
@@ -271,15 +273,15 @@
<goal name="jar:install" prereqs="java:jar"
description="Install the jar in the local repository">
<echo>
<ant:echo>
id = '${pom.artifactId}'
groupId = '${pom.groupId}'
artifactDirectory = '${pom.artifactDirectory}'
</echo>
</ant:echo>
<property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<mkdir dir="${jardir__}"/>
<copy
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<ant:mkdir dir="${jardir__}"/>
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${jardir__}"
overwrite="true"
@@ -294,14 +296,14 @@
name="jar:install-snapshot" prereqs="jar:snapshot"
description="Install a snapshot jar in the local repository">
<property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<mkdir dir="${jardir__}"/>
<copy
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
<ant:mkdir dir="${jardir__}"/>
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${jardir__}/${pom.artifactId}-SNAPSHOT.jar"
overwrite="true"
/>
<copy
<ant:copy
file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${jardir__}/${maven.final.name}.jar"
/>
@@ -312,8 +314,8 @@
<goal name="clean:clean"
description="Remove all project artifacts">
<delete dir="${maven.build.dir}"/>
<delete file="${basedir}/velocity.log" quiet="true" failonerror="false"/>
<ant:delete dir="${maven.build.dir}"/>
<ant:delete file="${basedir}/velocity.log" quiet="true" failonerror="false"/>
</goal>
</project>