You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ev...@apache.org on 2003/04/24 15:06:22 UTC

cvs commit: maven/src/plugins-build/jnlp/xdocs changes.xml properties.xml

evenisse    2003/04/24 06:06:22

  Modified:    src/plugins-build/jnlp plugin.jelly project.xml
               src/plugins-build/jnlp/xdocs properties.xml
  Added:       src/plugins-build/jnlp/xdocs changes.xml
  Log:
  Add the possibility to choose the main jar. Thanks to Dominique Collette.
  
  Revision  Changes    Path
  1.8       +18 -2     maven/src/plugins-build/jnlp/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/jnlp/plugin.jelly,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- plugin.jelly	22 Apr 2003 11:48:49 -0000	1.7
  +++ plugin.jelly	24 Apr 2003 13:06:22 -0000	1.8
  @@ -82,16 +82,32 @@
                       <j2se version="${maven.jnlp.j2se.version}"
                              initial-heap-size="${maven.jnlp.j2se.heapsize.initial}"
                              maximum-heap-size="${maven.jnlp.j2se.heapsize.max}"/>
  -                    <jar href="${maven.final.name}.jar" main="true"/>
  +                    <j:set var="mainExists" value="false"/>
   
                       <j:forEach var="lib" items="${pom.dependencies}">
                           <j:if test="${lib.getProperty('jnlp.jar')=='true'}">
  -                            <jar href="${lib.artifact}"/>
  +                            <j:choose>
  +                              <j:when test="${lib.getProperty('jnlp.main.jar')=='true'}">
  +                                 <j:set var="mainExists" value="true"/>
  +                                  <jar href="${lib.artifact}" main="true"/>
  +                              </j:when>
  +                              <j:otherwise>
  +                                  <jar href="${lib.artifact}"/>
  +                              </j:otherwise>
  +                            </j:choose>
                           </j:if>
                           <j:if test="${lib.getProperty('jnlp.native.jar')=='true'}">
                               <nativelib href="${lib.artifact}"/>
                           </j:if>
                       </j:forEach>
  +                    <j:choose>
  +                        <j:when test="${mainExists=='false'}">
  +                            <jar href="${maven.final.name}.jar" main="true"/>
  +                        </j:when>
  +                        <j:otherwise">
  +                            <jar href="${maven.final.name}.jar"/>
  +                        </j:otherwise>
  +                    </j:choose>
                       <!--  This is close to what it WILL look like, but for now it is the ugly ass thing below  it-->
   
                       <u:tokenize var="listOfProperties" delim=" ">${maven.jnlp.properties}</u:tokenize>
  
  
  
  1.9       +1 -1      maven/src/plugins-build/jnlp/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/jnlp/project.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- project.xml	9 Apr 2003 01:06:47 -0000	1.8
  +++ project.xml	24 Apr 2003 13:06:22 -0000	1.9
  @@ -5,7 +5,7 @@
     <pomVersion>3</pomVersion>
     <id>maven-jnlp-plugin</id>
     <name>Maven JNLP Plug-in</name>
  -  <currentVersion>1.0</currentVersion>
  +  <currentVersion>1.1</currentVersion>
     <shortDescription>JNLP Plugin for Maven</shortDescription>
     <url>http://maven.apache.org/reference/plugins/jnlp/</url>
     <siteDirectory>/www/maven.apache.org/reference/plugins/jnlp/</siteDirectory>
  
  
  
  1.4       +23 -1     maven/src/plugins-build/jnlp/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/jnlp/xdocs/properties.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- properties.xml	9 Mar 2003 08:35:13 -0000	1.3
  +++ properties.xml	24 Apr 2003 13:06:22 -0000	1.4
  @@ -361,6 +361,28 @@
         </properties>
       </dependency>
     ]]></source>
  -      </section>
  +    </section>
  +    <section name="How to define the main jar?">
  +      <p>
  +        When you define the main class of your application, you must define the jar
  +        that contains the main class. This is achieved by specifying meta-information
  +        in the pom, using the following syntax for jar files :
  +      </p>
  +
  +  <source><![CDATA[
  +    <dependency>
  +      <id>jarid</id>
  +      <version>jarversion</version>
  +      <properties>
  +        <jnlp.jar>true</jnlp.jar>
  +        <jnlp.main.jar>true</jnlp.main.jar>
  +      </properties>
  +    </dependency>
  +  ]]></source>
  +
  +      <p>
  +        If no jars contains this tag (jnlp.main.jar), it's the project jar which will be used.
  +      </p>
  +    </section>
     </body>
   </document>
  
  
  
  1.1                  maven/src/plugins-build/jnlp/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
    <properties>
      <title>Changes</title>
      <author email="dion@multitask.com.au">dIon Gillard</author>
    </properties>
  
    <body>
      <release version="1.1" date="in CVS">
        <action dev="evenisse" type="add" due-to="Dominique Collette">
          Add the possibility to choose the main jar.
        </action>
      </release>
    </body>
  </document>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org