You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ka...@apache.org on 2002/12/16 06:29:34 UTC
cvs commit: jakarta-turbine-maven/src/plugins-build/uberjar/xdocs properties.xml changes.xml index.xml navigation.xml tasks.xml
kaz 2002/12/15 21:29:34
Modified: src/plugins-build/uberjar plugin.jelly
src/plugins-build/uberjar/xdocs changes.xml index.xml
navigation.xml tasks.xml
Added: src/plugins-build/uberjar/xdocs properties.xml
Log:
Changed the name of the property to match the one's that I had
documented. Added a little more verbose documentation about
UberJar as well as a properties document. Thanks to Bob for getting
those properties working the way I wanted (corresponding item removed
from the task list).
Revision Changes Path
1.4 +1 -1 jakarta-turbine-maven/src/plugins-build/uberjar/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/uberjar/plugin.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin.jelly 16 Dec 2002 04:55:03 -0000 1.3
+++ plugin.jelly 16 Dec 2002 05:29:33 -0000 1.4
@@ -30,7 +30,7 @@
prereqs="java:jar, uberjar:init"
description="Build an uberjar">
- <j:set var="uberconf" value="${maven.uberjar.conf}"/>
+ <j:set var="uberconf" value="${maven.uberjar.classworlds.conf}"/>
<!-- Create the classworlds conf if user hasn't specified one -->
<j:choose>
1.2 +6 -0 jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/changes.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- changes.xml 14 Dec 2002 23:43:13 -0000 1.1
+++ changes.xml 16 Dec 2002 05:29:33 -0000 1.2
@@ -7,6 +7,12 @@
<body>
<release version="0.8" date="in CVS">
+ <action dev="werken" type="add">
+ The two properties, maven.uberjar.main and
+ maven.uberjar.classworlds.conf, can now be specified via a
+ project's properties file. Previously, these were specified via
+ the command line.
+ </action>
<action dev="kaz" type="add">
Created uberjar plugin based on the cool bootstrapping code that
Jason and Bob worked out!
1.2 +27 -12 jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 14 Dec 2002 23:43:13 -0000 1.1
+++ index.xml 16 Dec 2002 05:29:33 -0000 1.2
@@ -9,30 +9,45 @@
<body>
<section name="Maven UberJar Plug-in">
<p>
- Uberjar packages your project as well as its dependencies into a
+ UberJar packages your project as well as its dependencies into a
single JAR file. In addition, bootstrap code is added to the
archive that enables a main class to be invoked by simply
- typing: <code>java -jar uber.jar</code>.
+ typing: <code>java -jar uber.jar</code>. This enables you to
+ easily package up a command line utility into a single JAR
+ without worrying about the distribution of your dependencies or
+ shell scripts to invoke your main class. UberJar takes care of
+ this for you.
</p>
<p>
- To create the uberjar, specify the main class via a property,
- for example:
+ UberJar utilizes the <a href="http://classworlds.werken.com">
+ Classworlds </a> package for the bootstrap code that loads your
+ dependencies and executes your <tt>main</tt> method. It also
+ enables your dependent JARs to be inserted into the classpath,
+ and best of all, the JARs are located with the UberJar. JARs
+ withing JARs are supported by the Classworlds class loaders.
+ However, you do not need to know anything about Classworlds to
+ build your UberJar.
</p>
- <source>
- maven -Dubermain=com.example.App uberjar
- </source>
<p>
- Alternatively, if you already have a <a
+ To create the UberJar, be sure to define the
+ <tt>maven.uberjar.main</tt> property in your project's
+ properties file. Alternatively, if you already have a custom <a
href="http://classworlds.werken.com">Classworlds</a>
- configuration file:
+ configuration file, specify the
+ <tt>maven.uberjar.classworlds.conf</tt> property instead. To
+ create the UberJar, type:
</p>
<source>
- maven -Duberconf=classworlds.conf uberjar
+ maven uberjar
</source>
<p>
- Upon success, the JAR will be located in your target directory
- with a "-uber" appended for identification.
+ Upon success, the UberJar will be located in your target directory
+ with a <tt>-uber</tt> appended for identification. To invoke
+ your application, type:
</p>
+ <source>
+ java -jar your_uber_jar_here.jar
+ </source>
</section>
</body>
</document>
1.2 +4 -3 jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/navigation.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- navigation.xml 14 Dec 2002 23:43:13 -0000 1.1
+++ navigation.xml 16 Dec 2002 05:29:33 -0000 1.2
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="Maven Application Generation Plugin">
+<project name="Maven UberJar Plugin">
- <title>Maven Application Generation Plugin</title>
+ <title>Maven UberJar Plugin</title>
<body>
<links>
<item name="Maven" href="http://jakarta.apache.org/turbine/maven/"/>
</links>
<menu name="Overview">
- <item name="Goals" href="/goals.html" />
+ <item name="Goals" href="/goals.html" />
+ <item name="Properties" href="/properties.html" />
</menu>
</body>
</project>
1.2 +0 -7 jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/tasks.xml
Index: tasks.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/tasks.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tasks.xml 14 Dec 2002 23:59:13 -0000 1.1
+++ tasks.xml 16 Dec 2002 05:29:33 -0000 1.2
@@ -9,13 +9,6 @@
<body>
<section name="Tasks">
<ul>
- <li>
- Use properties that can be specified via a project's
- project.properties file. Currently, the properties have to be
- specified via the command line ala '-D'. The properties
- should also be called: maven.uberjar.main and
- maven.uberjar.classworlds.conf.
- </li>
</ul>
</section>
</body>
1.1 jakarta-turbine-maven/src/plugins-build/uberjar/xdocs/properties.xml
Index: properties.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Properties</title>
<author email="pete-apache-dev@kazmier.com">Pete Kazmier</author>
</properties>
<body>
<section name="UberJar Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th><th>Default</th></tr>
<tr>
<td>maven.uberjar.main</td>
<td>No</td>
<td>
UberJar will automatically create a Classworlds
configuration file for your application; however, you must
specify which class contains the <tt>main</tt> method for
your application. This is the class that will be invoked
when a user types: <tt>java -jar uber.jar</tt>.
</td>
</tr>
<tr>
<td>maven.uberjar.classworlds.conf</td>
<td>Yes</td>
<td>
Specifies that the plugin should not automatically create a
Classworlds configuration file because your application
already has its own. This property should be set to your
appropriate configuration. If this property is specified,
<tt>maven.uberjar.main</tt> is ignored.
</td>
</tr>
</table>
</section>
</body>
</document>