From: <jo...@us...> - 2004-11-18 15:33:57
|
joehni 04/11/18 07:33:49 Modified: javaapp LICENSE.txt maven.xml plugin.jelly plugin.properties project.properties javaapp/xdocs changes.xml properties.xml Log: Fix manifest entries. Cumulate licenses in META-INF. Upgrade license to ASF 2.0. Update docs. Revision Changes Path 1.2 +200 -55 maven-plugins/javaapp/LICENSE.txt Index: LICENSE.txt =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/LICENSE.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LICENSE.txt 11 Dec 2002 14:46:26 -0000 1.1 +++ LICENSE.txt 18 Nov 2004 15:33:47 -0000 1.2 @@ -1,57 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Wiki Maven Plugin" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact ap...@ap.... - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Interactive Maven Plugin", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - * ==================================================================== - */ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. 1.4 +1 -0 maven-plugins/javaapp/maven.xml Index: maven.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/maven.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- maven.xml 18 Nov 2004 09:28:32 -0000 1.3 +++ maven.xml 18 Nov 2004 15:33:47 -0000 1.4 @@ -1 +1,2 @@ <project default="plugin:install" /> +<!-- Use goals of plugin plugin now --> 1.9 +99 -47 maven-plugins/javaapp/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/plugin.jelly,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- plugin.jelly 18 Nov 2004 09:29:27 -0000 1.8 +++ plugin.jelly 18 Nov 2004 15:33:47 -0000 1.9 @@ -1,4 +1,21 @@ <?xml version="1.0"?> +<!-- +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> <project xmlns:j="jelly:core" xmlns:artifact="artifact" @@ -62,19 +79,19 @@ 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> - <echo>maven.javaapp.jar.keep.extention = ${maven.javaapp.jar.keep.extension}</echo> - <echo>maven.javaapp.mainclass = ${maven.javaapp.mainclass}</echo> - <echo>maven.javaapp.jvmargs = ${maven.javaapp.jvmargs}</echo> - <echo>maven.javaapp.sysproperties = ${maven.javaapp.sysproperties}</echo> - <echo>maven.javaapp.cmdline = ${maven.javaapp.cmdline}</echo> - <echo>maven.javaapp.final.name = ${maven.javaapp.final.name}</echo> - <echo>maven.javaapp.manifest.extensions.add = ${maven.javaapp.manifest.extensions.add}</echo> + <ant:echo>maven.build.dir = ${maven.build.dir}</ant:echo> + <ant:echo>maven.build.dest = ${maven.build.dest}</ant:echo> + <ant:echo>maven.javaapp.type = ${maven.javaapp.type}</ant:echo> + <ant:echo>maven.javaapp.app.dir = ${maven.javaapp.app.dir}</ant:echo> + <ant:echo>maven.javaapp.jar.name = ${maven.javaapp.jar.name}</ant:echo> + <ant:echo>maven.javaapp.jar.exclude = ${maven.javaapp.jar.exclude}</ant:echo> + <ant:echo>maven.javaapp.jar.keep.extention = ${maven.javaapp.jar.keep.extension}</ant:echo> + <ant:echo>maven.javaapp.mainclass = ${maven.javaapp.mainclass}</ant:echo> + <ant:echo>maven.javaapp.jvmargs = ${maven.javaapp.jvmargs}</ant:echo> + <ant:echo>maven.javaapp.sysproperties = ${maven.javaapp.sysproperties}</ant:echo> + <ant:echo>maven.javaapp.cmdline = ${maven.javaapp.cmdline}</ant:echo> + <ant:echo>maven.javaapp.final.name = ${maven.javaapp.final.name}</ant:echo> + <ant:echo>maven.javaapp.manifest.extensions.add = ${maven.javaapp.manifest.extensions.add}</ant:echo> </goal> @@ -86,6 +103,14 @@ description="Packs all dependent JARs into an executable JAR" prereqs="test:test,javaapp:copy-deps,javaapp:jar-resources"> + <!-- fail fast --> + + <j:choose> + <j:when test="${pom.currentVersion == null}"> + <ant:fail>You must define currentVersion in your POM.</ant:fail> + </j:when> + </j:choose> + <!-- unzip all JARS --> <ant:fileScanner var="jarFileList"> @@ -98,6 +123,11 @@ <j:forEach var="jarFile" items="${jarFileList.iterator()}"> <ant:unzip src="${jarFile.toString()}" dest="${maven.javaapp.app.dir}"/> + <u:available file="${maven.javaapp.app.dir}/META-INF/LICENSE.txt"> + <ant:move + file="${maven.javaapp.app.dir}/META-INF/LICENSE.txt" + toFile="${maven.javaapp.app.dir}/META-INF/${jarFile.getName()}-LICENSE.txt" /> + </u:available> </j:forEach> <!-- delete artifacts of signed JARS in the META-INF directory --> @@ -114,14 +144,14 @@ <!-- delete other artifacts in our way --> <ant:delete> - <ant:fileset dir="${maven.javaapp.app.dir}/META-INF" includes="LICENSE.txt"/> + <!-- ant:fileset dir="${maven.javaapp.app.dir}/META-INF" includes="LICENSE.txt"/ --> <ant:fileset dir="${maven.javaapp.app.dir}/META-INF" includes="INDEX.LIST"/> <ant:fileset dir="${maven.javaapp.app.dir}/META-INF" includes="MANIFEST.MF"/> </ant:delete> <!-- Copy class files from java:compile into working directory --> - <echo>Copying class files to ${maven.javaapp.app.dir}/classes</echo> + <ant:echo>Copying class files to ${maven.javaapp.app.dir}/classes</ant:echo> <ant:copy todir="${maven.javaapp.app.dir}"> <ant:fileset dir="${maven.build.dest}"/> @@ -132,43 +162,65 @@ <ant:delete dir="${maven.javaapp.app.dir}/lib"/> <!-- Build the JAR file --> - + <ant:jar jarfile="${maven.javaapp.final.name}" basedir="${maven.javaapp.app.dir}" - index="true" + index="${maven.javaapp.jar.index}" + compress="${maven.javaapp.jar.compress}" excludes="${maven.javaapp.jar.exclude}"> <ant:manifest> <ant:attribute name="Built-By" value="${user.name}"/> - <ant:attribute name="Created-By" value="Apache Jakarta Maven"/> - <ant:attribute name="Package" value="${pom.package}"/> - <ant:attribute name="Build-Jdk" value="${java.version}"/> - <!-- added supplementary entries --> - <ant:attribute name="Extension-Name" value="${pom.artifactId}"/> - <ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/> - <ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/> - <ant:attribute name="Specification-Title" value="${pom.shortDescription}"/> - <ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/> - <ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/> - <ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/> - <ant:attribute name="Main-Class" value="${maven.javaapp.mainclass}"/> - - <j:if test="${maven.javaapp.manifest.extensions.add} == 'true'"> - <j:set var="extensionList" value=""/> - <j:forEach var="artifact" items="${pom.artifacts}"> - <j:set var="dep" value="${artifact.dependency}"/> - <j:set var="extensionList" value="${extensionList} ${dep.artifactId}"/> + + <!-- getStatic tag does not work in Maven 1.0 & 1.0.1 --> + <j:getStatic var="mavenVersion" className="org.apache.maven.MavenSession" field="APP_VERSION"/> + <j:if test="${mavenVersion == null}"> + <j:set var="mavenVersion" value="1.0"/> + </j:if> + <ant:attribute name="Maven-Version" value="${mavenVersion}"/> + <j:if test="${context.getVariable('maven.jar.manifest.attributes.list') != null}"> + <u:tokenize var="attributeList" delim="," trim="true">${maven.jar.manifest.attributes.list}</u:tokenize> + <j:forEach var="attribute" items="${attributeList}"> + <j:set var="name" value="maven.jar.manifest.attribute.${attribute}"/> + <j:set var="value" value="${context.findVariable(name)}"/> + <ant:attribute name="${attribute}" value="${value}"/> + </j:forEach> + </j:if> + <!-- do not need class path --> + <!-- do not need extension list --> + + <j:set var="specificationVersion" value="${maven.javaapp.manifest.specificationVersion}" /> + <j:if test="${empty(specificationVersion)}"> + <j:set var="versionIdx" value="${pom.version.indexOf('.')}" /> + <j:set var="versionIdx" value="${pom.version.indexOf('.', versionIdx+1)}" /> + <j:set var="specificationVersion" value="${pom.version.substring(0,versionIdx)}" /> + </j:if> + <u:replace var="packagePath" oldChar="." newChar="/" value="${pom.package}"/> + <ant:section name="${packagePath}/"> + <ant:attribute name="Specification-Title" value="${maven.javaapp.manifest.specificationTile}"/> + <ant:attribute name="Specification-Vendor" value="${maven.javaapp.manifest.specificationVendor}"/> + <ant:attribute name="Specification-Version" value="${specificationVersion}"/> + <ant:attribute name="Package-Title" value="${pom.package}"/> + <ant:attribute name="Package-Vendor" value="${pom.organization.name}"/> + <ant:attribute name="Package-Version" value="${pom.currentVersion}"/> + </ant:section> + + <j:if test="${context.getVariable('maven.jar.manifest.groups.list') != null}"> + <u:tokenize var="groupList" delim="," trim="true">${maven.jar.manifest.groups.list}</u:tokenize> + <j:forEach var="group" items="${groupList}"> + <j:set var="nameVar" value="maven.jar.manifest.${group}.name"/> + <j:set var="groupName" value="${context.findVariable(nameVar)}"/> + <j:set var="attributeListVar" value="maven.jar.manifest.${group}.attributes.list"/> + <j:set var="groupAttributes" value="${context.findVariable(attributeListVar)}"/> + <u:tokenize var="attributeList" delim="," trim="true">${groupAttributes}</u:tokenize> + <ant:section name="${groupName}"> + <j:forEach var="attribute" items="${attributeList}"> + <j:set var="name" value="maven.jar.manifest.${group}.attribute.${attribute}"/> + <j:set var="value" value="${context.findVariable(name)}"/> + <ant:attribute name="${attribute}" value="${value}"/> + </j:forEach> + </ant:section> </j:forEach> - <j:if test="${extensionList.length() != 0}"> - <j:set var="extensionList" value="${extensionList.substring(1)}"/> - <ant:attribute name="Extension-List" value="${extensionList}"/> - </j:if> - <j:forEach var="artifact" items="${pom.artifacts}"> - <j:set var="dep" value="${artifact.dependency}"/> - <ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/> - <ant:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/> - <ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/> - </j:forEach> </j:if> </ant:manifest> </ant:jar> @@ -183,7 +235,7 @@ description="Copy all dependent JARs" prereqs="javaapp:prepare-filesystem,javaapp:support-uberjar-bundle"> - <echo>Copy dependent JARs into ${maven.javaapp.app.dir}/lib</echo> + <ant:echo>Copy dependent JARs into ${maven.javaapp.app.dir}/lib</ant:echo> <u:tokenize var="excludes" delim=",">${maven.javaapp.jar.exclude}</u:tokenize> <j:forEach var="lib" items="${pom.artifacts}"> @@ -202,7 +254,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> + <ant:echo>Running ${maven.javaapp.final.name} with "${maven.javaapp.cmdline}"</ant:echo> <ant:java jar="${maven.javaapp.final.name}" fork="yes"> <u:tokenize var="listOfProperties" delim=" ">${maven.javaapp.sysproperties}</u:tokenize> <!-- Don't know how to split the thing to use <sysproperty> instead --> 1.6 +41 -7 maven-plugins/javaapp/plugin.properties Index: plugin.properties =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/plugin.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin.properties 16 Nov 2004 18:22:17 -0000 1.5 +++ plugin.properties 18 Nov 2004 15:33:47 -0000 1.6 @@ -3,12 +3,6 @@ # ------------------------------------------------------------------- # -# What does this do exactly?! -# - -maven.javaapp.manifest.extensions.add = false - -# # The type of artifact created by the plugin # @@ -40,15 +34,53 @@ # Comma seperated list of JARS to be excluded, e.g. "mail, servlet-api" # + maven.javaapp.jar.exclude = # +# Compress the jar. +# + +maven.javaapp.jar.compress = true + + +# +# Create an index file in the manifest. +# + +maven.javaapp.jar.index = ${maven.jar.index} + + +# # Flag to keep the type as extension in the repository. # maven.javaapp.jar.keep.extension = false + +# +# Set the title of the specification. +# + +maven.javaapp.manifest.specificationTitle = ${pom.id} + + +# +# Set the version of the specification. POM v3 does not define this yet. +# If empty it will use the major.minor of the artifact's version. +# + +maven.javaapp.manifest.specificationVersion = ${pom.specificationVersion} + + +# +# Set the vendor of the specification. +# + +maven.javaapp.manifest.specificationVendor = ${pom.organization.name} + + # # List of system properties to pass to the java application, # e.g. "-DFOO=XXX -DBAR=YYY" @@ -56,6 +88,7 @@ maven.javaapp.sysproperties = + # # List of JVM args # @@ -64,7 +97,7 @@ # -# Command line to be used to start the applciation +# Command line to be used to start the application # maven.javaapp.cmdline = @@ -75,3 +108,4 @@ # maven.javaapp.mainclass = + 1.4 +1 -1 maven-plugins/javaapp/project.properties Index: project.properties =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.properties 22 Aug 2003 08:27:30 -0000 1.3 +++ project.properties 18 Nov 2004 15:33:47 -0000 1.4 @@ -3,7 +3,7 @@ # ------------------------------------------------------------------- #maven.jarResources.basedir = src -maven.license.licenseFile=${basedir}/../LICENSE.txt +maven.license.licenseFile=${basedir}/LICENSE.txt # WebSite definition maven.xdoc.version=${pom.currentVersion} 1.5 +12 -1 maven-plugins/javaapp/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/xdocs/changes.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- changes.xml 16 Nov 2004 18:22:17 -0000 1.4 +++ changes.xml 18 Nov 2004 15:33:48 -0000 1.5 @@ -14,6 +14,17 @@ <body> <release version="1.3-SNAPSHOT" date="in CVS"> + <action dev="joehni" type="update"> + Cumulate licenses in META-INF. + </action> + <action dev="joehni" type="fix"> + Fix manifest entries. + </action> + <action dev="joehni" type="remove"> + Removed property <code>maven.javaapp.manifest.extensions.add</code>, + since it added manifest entries, that were only used for applets + loading dependent jars (they are already included using javaapp). + </action> <action dev="joehni" type="add"> Added support for multiproject goals: <ul> @@ -33,7 +44,7 @@ Use artifact plugin for install and deploy. </action> <action dev="joehni" type="fix"> - Fix usage internal goal of deprecated deploy plugin. + Fix usage of deprecated deploy and resource plugins. </action> </release> 1.6 +92 -36 maven-plugins/javaapp/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/javaapp/xdocs/properties.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- properties.xml 16 Nov 2004 18:22:17 -0000 1.5 +++ properties.xml 18 Nov 2004 15:33:48 -0000 1.6 @@ -9,23 +9,74 @@ <body> <section name="Property Settings"> + <p> + All Properties of the plugin in alphabetical order. + </p> <table> <tr><th>Property</th><th>Optional?</th><th>Description</th></tr> + + <tr> + <td>maven.javaapp.app.dir</td> + <td>Yes</td> + <td> + The build directory of the plugin. Defaults to + <code>${maven.build.dir}/javaapp</code> + </td> + </tr> <tr> - <td>maven.javaapp.manifest.extensions.add</td> + <td>maven.javaapp.cmdline</td> <td>Yes</td> <td> - No idea what it exactly does but taken from maven-jar-plugin + Command line paramters for starting the executable JAR + through the plugin using javaapp:run </td> </tr> <tr> - <td>maven.javaapp.type</td> + <td>maven.javaapp.final.name</td> <td>Yes</td> <td> - The type of artifact created by the plugin + The qualified file name of the created artifact + </td> + </tr> + + <tr> + <td>maven.javaapp.jar.compress</td> + <td>Yes</td> + <td> + Create a compressed JAR. Defaults to <code>true</code> + </td> + </tr> + + <tr> + <td>maven.javaapp.jar.exclude</td> + <td>Yes</td> + <td> + 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> + + <tr> + <td>maven.javaapp.jar.index</td> + <td>Yes</td> + <td> + Create an index of the classes in the manifest. Defaults to + <code>${maven.jar.index}</code> + </td> + </tr> + + <tr> + <td>maven.javaapp.jar.name</td> + <td>Yes</td> + <td> + The name of the generated executable JAR. Defaults to + <code>${maven.final.name}-${maven.javaapp.type}.jar</code> </td> </tr> @@ -38,41 +89,44 @@ <code>false</code> </td> </tr> - + <tr> - <td>maven.javaapp.jar.name</td> - <td>Yes</td> + <td>maven.javaapp.mainclass</td> + <td>No</td> <td> - The name of the generated executable JAR. Defaults to - <code>${maven.final.name}-${maven.javaapp.type}.jar</code> + The name of the class to start the application. This + property is copied into MANIFEST.MF </td> </tr> <tr> - <td>maven.javaapp.final.name</td> + <td>maven.javaapp.manifest.specificationTitle</td> <td>Yes</td> <td> - The qualified file name of the created artifact + The <code>specificationTitle</code> in the manifest. Defaults to + <code>${pom.artifactId}:${pom.groupId}</code> </td> </tr> - + <tr> - <td>maven.javaapp.app.dir</td> + <td>maven.javaapp.manifest.specificationVendor</td> <td>Yes</td> <td> - The build directory of the plugin + The <code>specificationVendor</code> in the manifest. Defaults to + <code>${pom.organization.name}</code> </td> - </tr> - + </tr> + <tr> - <td>maven.javaapp.jar.exclude</td> + <td>maven.javaapp.manifest.specificationVersion</td> <td>Yes</td> <td> - 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>. + The <code>specificationVersion</code> in the manifest. According + to <a href="http://java.sun.com/j2se/1.4.2/docs/guide/versioning/spec/versioning2.html"> + Sun's specification</a> this must be a number to compare. Defaults + to <code>${pom.specificationVersion}</code>. Since this value is + not part of POM v3, the plugin generates a version if the variable + is empty by using major.minor of the pom.version. </td> </tr> @@ -86,32 +140,34 @@ </tr> <tr> - <td>maven.javaapp.jvmargs</td> + <td>maven.javaapp.type</td> <td>Yes</td> <td> - List of JVM arguments passed to 'javaapp:run', + The type of artifact created by the plugin </td> </tr> <tr> - <td>maven.javaapp.cmdline</td> + <td>maven.javaapp.jvmargs</td> <td>Yes</td> <td> - Command line paramters for starting the executable JAR - through the plugin using javaapp:run - </td> - </tr> - - <tr> - <td>maven.javaapp.mainclass</td> - <td>No</td> - <td> - The name of the class to start the application. This - property is copied into MANIFEST.MF + List of JVM arguments passed to 'javaapp:run', </td> </tr> </table> + + <p> + Additionally to the described properties, the javaapp plugin also + supports following properties of the + <a href="http://maven.apache.org/reference/plugins/jar/properties.html"> + jar plugin</a>: + <ul> + <li>maven.jar.manifest.attributes.list</li> + <li>maven.jar.manifest.groups.list</li> + </ul> + </p> + </section> </body> </document> |