o Give the ability to set a Main-Class attribute in the manifest

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113192 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
bwalding
2003-03-26 10:27:17 +00:00
parent 0a5d89bd45
commit bd50b92f40
3 changed files with 15 additions and 2 deletions

View File

@@ -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>

View File

@@ -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
maven.jar.manifest = ${maven.conf.dir}/Manifest.mf
maven.jar.mainclass =

View File

@@ -219,6 +219,14 @@
property will override Maven's defaults.
</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>