Split java plugin in clean, jar and java plugin.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5692492db3
commit
2f6054577e
@ -3,13 +3,7 @@
|
|||||||
<project
|
<project
|
||||||
xmlns:j="jelly:core"
|
xmlns:j="jelly:core"
|
||||||
xmlns:ant="jelly:ant"
|
xmlns:ant="jelly:ant"
|
||||||
xmlns:license="license"
|
xmlns:resources="resources">
|
||||||
xmlns:maven="jelly:maven"
|
|
||||||
xmlns:deploy="deploy"
|
|
||||||
xmlns:resources="resources"
|
|
||||||
xmlns:util="jelly:util"
|
|
||||||
xmlns:doc="doc"
|
|
||||||
xmlns:m="maven">
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
@ -125,7 +119,11 @@
|
|||||||
<ant:echo>No java source files to compile.</ant:echo>
|
<ant:echo>No java source files to compile.</ant:echo>
|
||||||
</j:otherwise>
|
</j:otherwise>
|
||||||
</j:choose>
|
</j:choose>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="java:jar"
|
||||||
|
description="Create the deliverable jar file."
|
||||||
|
prereqs="jar:jar">
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
@ -142,180 +140,4 @@
|
|||||||
/>
|
/>
|
||||||
</j:if>
|
</j:if>
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- J A R -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<goal name="jar" prereqs="java:jar"
|
|
||||||
description="Create the deliverable jar file."/>
|
|
||||||
<goal name="java:jar"
|
|
||||||
description="Create the deliverable jar file."
|
|
||||||
prereqs="test:test">
|
|
||||||
|
|
||||||
<ant:available property="maven.jar.manifest.available"
|
|
||||||
file="${maven.jar.manifest}"/>
|
|
||||||
|
|
||||||
<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}">
|
|
||||||
<ant:setProperty name="manifest" value="${maven.jar.manifest}" />
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:set var="licenseFileName"><license:fileName/></j:set>
|
|
||||||
<util:file name="${licenseFileName}" var="licenseFile"/>
|
|
||||||
<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 -->
|
|
||||||
<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)}">
|
|
||||||
<ant:attribute name="Main-Class" value="${mainclass}"/>
|
|
||||||
</j:if>
|
|
||||||
</ant:manifest>
|
|
||||||
</ant:jar>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- S N A P S H O T J A R -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal
|
|
||||||
name="jar:snapshot"
|
|
||||||
description="Create a snapshot jar, ie 'id-YYYYMMDD.hhmmss.jar'">
|
|
||||||
|
|
||||||
<maven:snapshot project="${pom}"/>
|
|
||||||
|
|
||||||
<j:set var="maven.final.name" value="${snapshotSignature}"/>
|
|
||||||
<ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
|
|
||||||
|
|
||||||
<attainGoal name="java:jar"/>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- D E P L O Y S N A P S H O T -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal
|
|
||||||
name="jar:deploy-snapshot"
|
|
||||||
description="Deploy a snapshot jar to the remote repository">
|
|
||||||
|
|
||||||
<m:user-check user="${maven.username}"/>
|
|
||||||
<attainGoal name="jar:snapshot"/>
|
|
||||||
<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}"/>
|
|
||||||
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
|
|
||||||
<j:set var="base" value="${forwardSlashBaseDir}/" />
|
|
||||||
</j:if>
|
|
||||||
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
|
|
||||||
|
|
||||||
<deploy:artifact
|
|
||||||
artifact="${relativePath}"
|
|
||||||
type="jars"
|
|
||||||
assureDirectoryCommand="mkdir -p"
|
|
||||||
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp maven ${maven.jar.to.deploy}; ln -sf ${maven.jar.to.deploy} ${pom.artifactId}-SNAPSHOT.jar; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- D E P L O Y J A R -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal
|
|
||||||
name="jar:deploy"
|
|
||||||
description="Deploy a jar to the remote repository">
|
|
||||||
|
|
||||||
<m:user-check user="${maven.username}"/>
|
|
||||||
<attainGoal name="java: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>
|
|
||||||
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
|
|
||||||
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
|
|
||||||
<j:set var="base" value="${forwardSlashBaseDir}/" />
|
|
||||||
</j:if>
|
|
||||||
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
|
|
||||||
|
|
||||||
<deploy:artifact
|
|
||||||
artifact="${relativePath}"
|
|
||||||
type="jars"
|
|
||||||
assureDirectoryCommand="mkdir -p"
|
|
||||||
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp maven ${maven.jar.to.deploy}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- I N S T A L L J A R -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal name="jar:install" prereqs="java:jar"
|
|
||||||
description="Install the jar in the local repository">
|
|
||||||
|
|
||||||
<ant:echo>
|
|
||||||
id = '${pom.artifactId}'
|
|
||||||
groupId = '${pom.groupId}'
|
|
||||||
artifactDirectory = '${pom.artifactDirectory}'
|
|
||||||
</ant:echo>
|
|
||||||
|
|
||||||
<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"
|
|
||||||
/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- I N S T A L L S N A P S H O T -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal
|
|
||||||
name="jar:install-snapshot" prereqs="jar:snapshot"
|
|
||||||
description="Install a snapshot jar in the local repository">
|
|
||||||
|
|
||||||
<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"
|
|
||||||
/>
|
|
||||||
<ant:copy
|
|
||||||
file="${maven.build.dir}/${maven.final.name}.jar"
|
|
||||||
tofile="${jardir__}/${maven.final.name}.jar"
|
|
||||||
/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="clean" description="Remove all project artifacts"
|
|
||||||
prereqs="clean:clean"/>
|
|
||||||
|
|
||||||
<goal name="clean:clean"
|
|
||||||
description="Remove all project artifacts">
|
|
||||||
<ant:delete dir="${maven.build.dir}"/>
|
|
||||||
<ant:delete file="${basedir}/velocity.log" quiet="true" failonerror="false"/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -9,6 +9,10 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<release version="1.3" date="in cvs">
|
<release version="1.3" date="in cvs">
|
||||||
|
<action dev="evenisse" type="remove">
|
||||||
|
Remove clean goals and jar goals. Clean goals and jar goals move to
|
||||||
|
clean plugin and jar plugin.
|
||||||
|
</action>
|
||||||
<action dev="dion" type="fix">Added chgrp maven to jar:deploy.</action>
|
<action dev="dion" type="fix">Added chgrp maven to jar:deploy.</action>
|
||||||
<action dev="dion" type="add">
|
<action dev="dion" type="add">
|
||||||
Added velocity.log to files deleted on clean
|
Added velocity.log to files deleted on clean
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user