bwalding 2003/03/26 02:27:18
Modified: src/plugins-build/java/xdocs properties.xml
src/plugins-build/java plugin.jelly plugin.properties
Log:
o Give the ability to set a Main-Class attribute in the manifest
Revision Changes Path
1.5 +8 -0 maven/src/plugins-build/java/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/java/xdocs/properties.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- properties.xml 19 Mar 2003 06:11:24 -0000 1.4
+++ properties.xml 26 Mar 2003 10:27:17 -0000 1.5
@@ -220,6 +220,14 @@
</td>
</tr>
<tr>
+ <td>maven.jar.mainclass</td>
+ <td>Yes</td>
+ <td>
+ Specifies the Main-Class attribute for your manifest. If not set,
+ no MainClass attribute will be added to the manifest.
+ </td>
+ </tr>
+ <tr>
<td>maven.jarResources.basedir</td>
<td>Yes</td>
<td>
1.11 +5 -1 maven/src/plugins-build/java/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/java/plugin.jelly,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- plugin.jelly 4 Mar 2003 15:05:25 -0000 1.10
+++ plugin.jelly 26 Mar 2003 10:27:17 -0000 1.11
@@ -173,7 +173,7 @@
<attribute name="Created-By" value="Apache Jakarta Maven"/>
<attribute name="Package" value="${pom.package}"/>
<attribute name="Build-Jdk" value="${java.version}"/>
- <!-- added supplimentary entries -->
+ <!-- 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}"/>
@@ -181,6 +181,10 @@
<attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
<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}"/>
+ </j:if>
</manifest>
</jar>
</goal>
1.2 +2 -1 maven/src/plugins-build/java/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/java/plugin.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin.properties 24 Jan 2003 03:44:30 -0000 1.1
+++ plugin.properties 26 Mar 2003 10:27:17 -0000 1.2
@@ -2,4 +2,5 @@
# P L U G I N P R O P E R T I E S
# -------------------------------------------------------------------
-maven.jar.manifest = ${maven.conf.dir}/Manifest.mf
\ No newline at end of file
+maven.jar.manifest = ${maven.conf.dir}/Manifest.mf
+maven.jar.mainclass =
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]