You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by mi...@apache.org on 2003/06/11 23:51:38 UTC
cvs commit: maven/src/plugins-build/jar/src/plugin-resources/templates manifest.vm
michal 2003/06/11 14:51:38
Modified: src/plugins-build/jar project.xml plugin.jelly
Added: src/plugins-build/jar/src/plugin-resources/templates
manifest.vm
Log:
Added dynamic tag library for generation of manifest file
Revision Changes Path
1.3 +17 -0 maven/src/plugins-build/jar/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/jar/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.xml 9 Apr 2003 01:06:46 -0000 1.2
+++ project.xml 11 Jun 2003 21:51:37 -0000 1.3
@@ -15,4 +15,21 @@
<url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/jar/</url>
</repository>
<developers/>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-jelly</groupId>
+ <artifactId>commons-jelly-tags-velocity</artifactId>
+ <version>20030303.205659</version>
+ <properties>
+ <classloader>root.maven</classloader>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <id>velocity</id>
+ <version>1.3</version>
+ </dependency>
+
+ </dependencies>
</project>
1.10 +41 -1 maven/src/plugins-build/jar/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/jar/plugin.jelly,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- plugin.jelly 10 Apr 2003 10:21:23 -0000 1.9
+++ plugin.jelly 11 Jun 2003 21:51:37 -0000 1.10
@@ -9,7 +9,47 @@
xmlns:resources="resources"
xmlns:util="jelly:util"
xmlns:doc="doc"
- xmlns:m="maven">
+ xmlns:m="maven"
+ xmlns:define="jelly:define"
+ xmlns:velocity="jelly:velocity"
+ >
+
+
+
+
+ <define:taglib uri="manifest">
+
+ <!--
+ |
+ | @destFile
+ |
+ -->
+ <define:tag name="create-file">
+
+ <j:set
+ var="templatePath"
+ value="${pom.getPluginContext('maven-jar-plugin').getVariable('plugin.dir')}/plugin-resources/templates"/>
+
+ <j:set
+ var="mainclass"
+ value="${$pom.getPluginContext('maven-java-plugin').getVariable('maven.jar.mainclass')}"/>
+
+ <j:set
+ var="addExtension"
+ value="${pom.getPluginContext('maven-jar-plugin').getVariable('${maven.jar.manifest.extensions.add')}"/>
+
+
+
+ <ant:echo>Creating MANIFEST file:${destFile}</ant:echo>
+
+ <velocity:merge
+ name="${destFile}"
+ basedir="${templatePath}"
+ template="manifest.vm"/>
+ </define:tag>
+
+ </define:taglib>
+
<!-- ================================================================== -->
<!-- J A R -->
1.1 maven/src/plugins-build/jar/src/plugin-resources/templates/manifest.vm
Index: manifest.vm
===================================================================
Built-By="${user.name}
Created-By=Apache Jakarta Maven
Package=${pom.package}
Build-Jdk=${java.version}
Extension-Name=${pom.artifactId}
Specification-Version=${pom.specificationVersion}
Specification-Vendor=${pom.organization.name}
Specification-Title=${pom.shortDescription}
Implementation-Version=${pom.currentVersion}
Implementation-Vendor=${pom.organization.name}
Implementation-Vendor-Id=${pom.organization.identifier}
#if(${mainclass})
Main-Class=${mainclass}
#end
#if( ${addExtension})
#foreach($artifact in $project.artifacts)
#set($extensionList = $artifact.artifactId)
#end
Extension-List ${extensionList}
#foreach($artifact in $project.artifacts)
${dep.artifactId}-Extension-Name${dep.artifactId}
${dep.artifactId}-Implementation-Version${dep.version}
${dep.artifactId}-Implementation-URLhttp://www.ibiblio.org/maven${artifact.urlPath}
#end
#end
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org