From: <jo...@us...> - 2004-11-16 12:20:24
|
joehni 04/11/16 04:20:17 Modified: javaapp plugin.jelly project.xml javaapp/xdocs changes.xml index.xml properties.xml Log: Support property 'uberjar.bundle'. Revision Changes Path 1.6 +30 -7 maven-plugins/javaapp/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/plugin.jelly,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin.jelly 21 Oct 2003 16:20:58 -0000 1.5 +++ plugin.jelly 16 Nov 2004 12:20:16 -0000 1.6 @@ -26,14 +26,37 @@ </goal> <!-- ================================================================== --> + <!-- javaapp:support-uberjar-bundle --> + <!-- ================================================================== --> + + <goal name="javaapp:support-uberjar-bundle" + description="Support the uberjar.bundle property"> + <j:set var="excludes" value="${maven.javaapp.jar.exclude}"/> + <j:forEach var="lib" items="${pom.artifacts}"> + <j:set var="dep" value="${lib.dependency}"/> + <j:if test="${dep.getProperty('uberjar.bundle')=='false' || dep.type !='jar'}"> + <j:if test="${!empty(excludes)}"> + <j:set var="excludes" value="${excludes},${dep.artifactId}"/> + </j:if> + <j:if test="${empty(excludes)}"> + <j:set var="excludes" value="${dep.artifactId}"/> + </j:if> + </j:if> + </j:forEach> + <j:set var="maven.javaapp.jar.exclude" value="${excludes}"/> + </goal> + + <!-- ================================================================== --> <!-- javaapp:info --> <!-- ================================================================== --> <goal name="javaapp:info" - description="Prints diagnostic messages"> + description="Prints diagnostic messages" + prereqs="javaapp:support-uberjar-bundle"> <echo>maven.build.dir = ${maven.build.dir}</echo> <echo>maven.build.dest = ${maven.build.dest}</echo> + <echo>maven.javaapp.type = ${maven.javaapp.type}</echo> <echo>maven.javaapp.app.dir = ${maven.javaapp.app.dir}</echo> <echo>maven.javaapp.jar.name = ${maven.javaapp.jar.name}</echo> <echo>maven.javaapp.jar.exclude = ${maven.javaapp.jar.exclude}</echo> @@ -45,7 +68,7 @@ <echo>maven.javaapp.manifest.extensions.add = ${maven.javaapp.manifest.extensions.add}</echo> </goal> - + <!-- ================================================================== --> <!-- javaapp:jar --> <!-- ================================================================== --> @@ -149,11 +172,11 @@ <goal name="javaapp:copy-deps" description="Copy all dependent JARs" - prereqs="javaapp:prepare-filesystem"> + prereqs="javaapp:prepare-filesystem,javaapp:support-uberjar-bundle"> - <echo>Copy dependent JARs into ${maven.javaapp.app.dir}/lib</echo> + <echo>Copy dependent JARs into ${maven.javaapp.app.dir}/lib</echo> <deploy:copy-deps todir="${maven.javaapp.app.dir}/lib" excludes="${maven.javaapp.jar.exclude}"/> - + </goal> <!-- ================================================================== --> @@ -162,7 +185,7 @@ <goal name="javaapp:run" description="Runs the executable JAR with the given command line"> - + <echo>Running ${maven.javaapp.final.name} with "${maven.javaapp.cmdline}"</echo> <java jar="${maven.javaapp.final.name}" fork="yes"> <u:tokenize var="listOfProperties" delim=" ">${maven.javaapp.sysproperties}</u:tokenize> @@ -176,7 +199,7 @@ </j:forEach> <arg line="${maven.javaapp.cmdline}"/> </java> - + </goal> <!-- ================================================================== --> 1.10 +10 -0 maven-plugins/javaapp/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/project.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- project.xml 16 Nov 2004 11:13:36 -0000 1.9 +++ project.xml 16 Nov 2004 12:20:16 -0000 1.10 @@ -42,6 +42,16 @@ <role>Java Developer</role> </roles> </developer> + <developer> + <name>Jörg Schaible</name> + <id>wdsgoe</id> + <email>joe...@gm...</email> + <organization>Elsag-Solutions AG</organization> + <roles> + <role>Java Developer</role> + </roles> + <timezone>+1</timezone> + </developer> </developers> <dependencies> 1.3 +12 -0 maven-plugins/javaapp/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/xdocs/changes.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- changes.xml 21 Oct 2003 16:20:57 -0000 1.2 +++ changes.xml 16 Nov 2004 12:20:17 -0000 1.3 @@ -1,12 +1,24 @@ +<?xml version="1.0"?> +<!DOCTYPE project [ + <!ENTITY ouml "ö"> +]> + <document> <properties> <title>Changes</title> <author email="sie...@it...">Siegfried Goeschl</author> + <author email="joe...@gm...">Jörg Schaible</author> </properties> <body> + <release version="1.3-SNAPSHOT" date="in CVS"> + <action dev="joehni" type="add"> + Added support for uberjar.bundle property. + </action> + </release> + <release version="1.2" date="2003-10-22"> <action dev="wdsgoe" type="add"> Added support for JVM args and system properties to javaapp:run 1.4 +6 -1 maven-plugins/javaapp/xdocs/index.xml Index: index.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/xdocs/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.xml 20 Oct 2003 14:25:19 -0000 1.3 +++ index.xml 16 Nov 2004 12:20:17 -0000 1.4 @@ -1,16 +1,21 @@ <?xml version="1.0"?> +<!DOCTYPE project [ + <!ENTITY ouml "ö"> +]> + <document> <properties> <title>Maven Java Application Plug-in</title> <author email="sie...@it...">Siegfried Goeschl</author> + <author email="joe...@gm...">Jörg Schaible</author> </properties> <body> <section name="Maven Java Application Plug-in"> <p> This plug-in provides support for creating, installing and running - an executable JAR for Maven 1.0 Beta 10. + an executable JAR for Maven 1.0. </p> <p> The plug-in is used on Windows 2000 and SUSE Linux 8.1 therefore 1.4 +6 -4 maven-plugins/javaapp/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/xdocs/properties.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- properties.xml 21 Oct 2003 16:20:57 -0000 1.3 +++ properties.xml 16 Nov 2004 12:20:17 -0000 1.4 @@ -56,9 +56,11 @@ <td>maven.javaapp.jar.exclude</td> <td>Yes</td> <td> - A comma seperated list of JAR ids to be excluded from the result, - e.g. "mail,servlet-api". The JAR ids must be therefore referenced - in the POM. + A comma seperated list of arifactIds to be excluded from the + result, e.g. "mail,servlet-api". The artifactIds must be therefore + referenced in the POM. The value is automatically set to a list + with the artifactId of all dependencies not of type jar and all + with a property <em>uberjar.bundle</em> set to <code>false</code>. </td> </tr> @@ -100,4 +102,4 @@ </table> </section> </body> -</document> \ No newline at end of file +</document> |