MPJAR-38: added property maven.jar.final.name

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116150 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
felipeal 2004-10-18 17:19:31 +00:00
parent 6694da9839
commit 05a5ec113e
12 changed files with 178 additions and 6 deletions

View File

@ -66,7 +66,7 @@
<!-- See http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html -->
<!-- See http://java.sun.com/j2se/1.4.1/docs/guide/jar/jar.html -->
<ant:jar
jarfile="${maven.build.dir}/${maven.final.name}.jar"
jarfile="${maven.build.dir}/${maven.jar.final.name}"
basedir="${maven.build.dest}"
index="${maven.jar.index}"
compress="${maven.jar.compress}"
@ -209,7 +209,7 @@
description="Deploy a snapshot jar to the remote repository">
<artifact:deploy-snapshot
artifact="${maven.build.dir}/${maven.final.name}.jar"
artifact="${maven.build.dir}/${maven.jar.final.name}"
type="jar"
project="${pom}"
/>
@ -225,7 +225,7 @@
description="Deploy a jar to the remote repository">
<artifact:deploy
artifact="${maven.build.dir}/${maven.final.name}.jar"
artifact="${maven.build.dir}/${maven.jar.final.name}"
type="jar"
project="${pom}"
/>
@ -239,7 +239,7 @@
description="Install the jar in the local repository">
<artifact:install
artifact="${maven.build.dir}/${maven.final.name}.jar"
artifact="${maven.build.dir}/${maven.jar.final.name}"
type="jar"
project="${pom}"
/>
@ -254,7 +254,7 @@
description="Install a snapshot jar in the local repository">
<artifact:install-snapshot
artifact="${maven.build.dir}/${maven.final.name}.jar"
artifact="${maven.build.dir}/${maven.jar.final.name}"
type="jar"
project="${pom}"
/>

View File

@ -24,3 +24,4 @@ maven.jar.manifest.extensions.add=false
maven.jar.excludes = **/package.html
maven.jar.index=false
maven.jar.compress=true
maven.jar.final.name = ${maven.final.name}.jar

View File

@ -23,7 +23,7 @@
<pomVersion>3</pomVersion>
<id>maven-jar-plugin</id>
<name>Maven Jar Plug-in</name>
<currentVersion>1.6</currentVersion>
<currentVersion>1.7-SNAPSHOT</currentVersion>
<description>Plugin for creating JAR files. Requires Maven 1.0 RC2.</description>
<shortDescription>Create jar files</shortDescription>
<url>http://maven.apache.org/reference/plugins/jar/</url>

View File

@ -0,0 +1,5 @@
gump.xml
*.log
targetdist
dist
target

View File

@ -0,0 +1,22 @@
<!--
/*
* Copyright 2001-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.
*/
-->
<project xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:assert="assert" xmlns:ant="jelly:ant">
<goal name="testPlugin">
<maven:reactor basedir="${basedir}" includes="test*/project.xml" goals="testPlugin" banner="Test" ignoreFailures="false"/>
</goal>
</project>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-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.
*/
-->
<project>
<pomVersion>3</pomVersion>
<id>test-maven-jar-plugin</id>
<name>Test project for Maven Jar Plugin</name>
<groupId>maven</groupId>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
</organization>
<inceptionYear>2001</inceptionYear>
<package>org.apache.maven</package>
<logo>http://maven.apache.org/images/maven.gif</logo>
<description>Test for Maven Jar plugin</description>
<shortDescription>Test for Maven Jar plugin</shortDescription>
<url>http://maven.apache.org/reference/plugins/jar/</url>
<siteDirectory>/www/maven.apache.org/reference/plugins/jar/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/jar/</connection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/jar/</url>
</repository>
</project>

View File

@ -0,0 +1,2 @@
*.log
target

View File

@ -0,0 +1,34 @@
<!--
/*
* Copyright 2001-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.
*/
-->
<project default="testPlugin"
xmlns:ant="jelly:ant"
xmlns:util="jelly:util"
xmlns:j="jelly:core">
<goal name="testPlugin" prereqs="jar:jar">
<j:set var="jarNotFound" value="true"/>
<util:available file="${maven.build.dir}/${maven.jar.final.name}">
<j:set var="jarNotFound" value="false"/>
</util:available>
<j:if test="${jarNotFound}">
<ant:fail>Jar with customized name (${maven.jar.final.name}) not build!</ant:fail>
</j:if>
</goal>
</project>

View File

@ -0,0 +1 @@
maven.jar.final.name=whatever.jar

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-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.
*/
-->
<project>
<pomVersion>3</pomVersion>
<id>test-maven-jar-plugin-MPJAR-38</id>
<name>Maven Jar Plugin 01</name>
<groupId>maven</groupId>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
</organization>
<inceptionYear>2001</inceptionYear>
<package>org.apache.maven</package>
<logo>http://maven.apache.org/images/maven.gif</logo>
<description>Test for Maven Jar plugin, issue MPJAR-38</description>
<shortDescription>MPJAR-38</shortDescription>
<url>http://maven.apache.org/reference/plugins/jar/</url>
<siteDirectory>/www/maven.apache.org/reference/plugins/jar/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/jar/</connection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/jar/</url>
</repository>
<developers>
<developer>
<name>Felipe Leme</name>
<id>felipeal</id>
<email>maven@felipeal.net</email>
<organization>Falcon Informatica</organization>
<timezone>-3</timezone>
</developer>
</developers>
</project>

View File

@ -25,6 +25,9 @@
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<release version="1.7-SNAPSHOT" date="in CVS">
<action dev="felipeal" type="add">Added new property <code>maven.jar.final.name</code>.</action>
</release>
<release version="1.6" date="2004-06-28">
<action dev="brett" type="update">Deprecated jar:snapshot</action>
<action dev="brett" type="update">Use the artifact plugin for installation</action>

View File

@ -28,6 +28,15 @@
<body>
<section name="Jar Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<tr>
<td>maven.jar.final.name</td>
<td>Yes</td>
<td>
Name of the generated JAR file.
Defaults to ${maven.final.name}.jar.
</td>
</tr>
<tr>
<td>maven.has.jar.resource.patterns</td>
<td>Yes</td>