evenisse    2003/07/07 06:29:04

  Modified:    src/plugins-build/jnlp plugin.jelly
               src/plugins-build/jnlp/xdocs changes.xml
  Log:
  Fixed for MAVEN-518 (artifacts are used for path, not dependencies).
  
  Revision  Changes    Path
  1.12      +33 -31    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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- plugin.jelly      4 Jul 2003 06:36:24 -0000       1.11
  +++ plugin.jelly      7 Jul 2003 13:29:04 -0000       1.12
  @@ -84,20 +84,21 @@
                              maximum-heap-size="${maven.jnlp.j2se.heapsize.max}"/>
                       <j:set var="mainExists" value="false"/>
   
  -                    <j:forEach var="lib" items="${pom.dependencies}">
  -                        <j:if test="${lib.getProperty('jnlp.jar')=='true'}">
  +                    <j:forEach var="lib" items="${pom.artifacts}">
  +                        <j:set var="dep" value="${lib.dependency}"/>
  +                        <j:if test="${dep.getProperty('jnlp.jar')=='true'}">
                               <j:choose>
  -                              <j:when 
test="${lib.getProperty('jnlp.main.jar')=='true'}">
  +                              <j:when 
test="${dep.getProperty('jnlp.main.jar')=='true'}">
                                    <j:set var="mainExists" value="true"/>
  -                                  <jar href="${lib.artifact}" main="true"/>
  +                                  <jar href="${lib.file.name}" main="true"/>
                                 </j:when>
                                 <j:otherwise>
  -                                  <jar href="${lib.artifact}"/>
  +                                  <jar href="${lib.file.name}"/>
                                 </j:otherwise>
                               </j:choose>
                           </j:if>
  -                        <j:if test="${lib.getProperty('jnlp.native.jar')=='true'}">
  -                            <nativelib href="${lib.artifact}"/>
  +                        <j:if test="${dep.getProperty('jnlp.native.jar')=='true'}">
  +                            <nativelib href="${lib.file.name}"/>
                           </j:if>
                       </j:forEach>
                       <j:choose>
  @@ -161,19 +162,18 @@
                   outputDir="${maven.jnlp.tmpdir}"
               />
               
  -            <j:forEach var="dep" items="${pom.dependencies}">
  +            <j:forEach var="lib" items="${pom.artifacts}">
  +              <j:set var="dep" value="${lib.dependency}"/>
                 <j:if test="${dep.getProperty('jnlp.jar')=='true'}">
  -                <!-- FIXME: Should use artifacts and artifact.path -->
                   <jarfile:updateManifest
  -                    
inputJar="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.artifact}"
  +                    inputJar="${lib.file.parent}/${lib.file.name}"
                       manifest="${plugin.resources}/jnlp.manifest"
                       outputDir="${maven.jnlp.tmpdir}"
                   />
                 </j:if>
                 <j:if test="${dep.getProperty('jnlp.native.jar')=='true'}">
  -                <!-- FIXME: Should use artifacts and artifact.path -->
                   <jarfile:updateManifest
  -                    
inputJar="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.artifact}"
  +                    inputJar="${lib.file.parent}/${lib.file.name}"
                       manifest="${plugin.resources}/jnlp.manifest"
                       outputDir="${maven.jnlp.tmpdir}"
                   />
  @@ -193,19 +193,20 @@
                   storepass="${maven.jnlp.signjar.storepass}"
                   keystore="${maven.jnlp.signjar.store}"/>
   
  -            <j:forEach var="lib" items="${pom.dependencies}">
  -              <j:if test="${lib.getProperty('jnlp.jar')=='true'}">
  +            <j:forEach var="lib" items="${pom.artifacts}">
  +              <j:set var="dep" value="${lib.dependency}"/>
  +              <j:if test="${dep.getProperty('jnlp.jar')=='true'}">
                   <ant:signjar
  -                  jar="${maven.jnlp.tmpdir}/${lib.artifact}"
  -                  signedjar="${maven.jnlp.dir}/${lib.artifact}"
  +                  jar="${maven.jnlp.tmpdir}/${lib.file.name}"
  +                  signedjar="${maven.jnlp.dir}/${lib.file.name}"
                     alias="${maven.jnlp.signjar.alias}"
                     storepass="${maven.jnlp.signjar.storepass}"
                     keystore="${maven.jnlp.signjar.store}"/>
                 </j:if>
  -              <j:if test="${lib.getProperty('jnlp.native.jar')=='true'}">
  +              <j:if test="${dep.getProperty('jnlp.native.jar')=='true'}">
                   <ant:signjar
  -                  jar="${maven.jnlp.tmpdir}/${lib.artifact}"
  -                  signedjar="${maven.jnlp.dir}/${lib.artifact}"
  +                  jar="${maven.jnlp.tmpdir}/${lib.file.name}"
  +                  signedjar="${maven.jnlp.dir}/${lib.file.name}"
                     alias="${maven.jnlp.signjar.alias}"
                     storepass="${maven.jnlp.signjar.storepass}"
                     keystore="${maven.jnlp.signjar.store}"/>
  @@ -214,18 +215,19 @@
             </j:when>
             <j:otherwise>
               <ant:copy todir="${maven.jnlp.dir}" flatten="true">
  -              <ant:fileset dir="${maven.repo.local}">
  -                <j:forEach var="dep" items="${pom.dependencies}">
  -                  <j:if test="${dep.getProperty('jnlp.jar')=='true'}">
  -                    <!-- FIXME: Should use artifacts and artifact.path -->
  -                    <ant:include 
name="${dep.artifactDirectory}/jars/${dep.artifact}"/>
  -                  </j:if>
  -                  <j:if test="${dep.getProperty('jnlp.native.jar')=='true'}">
  -                    <!-- FIXME: Should use artifacts and artifact.path -->
  -                    <ant:include 
name="${dep.artifactDirectory}/jars/${dep.artifact}"/>
  -                  </j:if>
  -                </j:forEach>
  -              </ant:fileset>
  +              <j:forEach var="lib" items="${pom.artifacts}">
  +                <j:set var="dep" value="${lib.dependency}"/>
  +                <j:if test="${dep.getProperty('jnlp.jar')=='true'}">
  +                  <ant:fileset dir="${lib.file.parent}">
  +                    <ant:include name="${lib.file.name}"/>
  +                  </ant:fileset>
  +                </j:if>
  +                <j:if test="${dep.getProperty('jnlp.native.jar')=='true'}">
  +                  <ant:fileset dir="${lib.file.parent}">
  +                    <ant:include name="${lib.file.name}"/>
  +                  </ant:fileset>
  +                </j:if>
  +              </j:forEach>
                 <ant:fileset dir="${maven.build.dir}">
                   <ant:include name="${maven.final.name}.jar"/>
                 </ant:fileset>
  
  
  
  1.4       +5 -0      maven/src/plugins-build/jnlp/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/jnlp/xdocs/changes.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- changes.xml       2 Jul 2003 08:39:18 -0000       1.3
  +++ changes.xml       7 Jul 2003 13:29:04 -0000       1.4
  @@ -8,6 +8,11 @@
   
     <body>
       <release version="1.2" date="in CVS">
  +      <action dev="evenisse" type="fix">
  +        Fixes for MAVEN-518.
  +        Artifact processing in the plugin 
  +        was slightly changed and now it supports jar overriding mechanism           
  +      </action>
         <action dev="evenisse" type="fix" due-to="James Macgill">
           Fix Maven-343. Support large jar files.
         </action>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to