michal      2003/07/01 07:57:57

  Modified:    src/plugins-build/ear/xdocs goals.xml changes.xml
               src/plugins-build/ear plugin.jelly
  Log:
  Fixes for MAVEN-518.
   Artifact processing in the plugin was slightly changed and now it supports jar 
overriding mechanism
  
  Revision  Changes    Path
  1.3       +14 -3     maven/src/plugins-build/ear/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/ear/xdocs/goals.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- goals.xml 8 May 2003 20:53:55 -0000       1.2
  +++ goals.xml 1 Jul 2003 14:57:56 -0000       1.3
  @@ -26,15 +26,26 @@
           <description>
               Installs the generated ear file into the local repository
           </description>
  +      </goal>    
  +      <goal>
  +        <name>ear:install-snapshot</name>
  +        <description>Install the snapshot version of the ear in the local 
repository</description>
  +      </goal>      
  +      <goal>
  +        <name>ear:deploy</name>
  +        <description>Deploy the ear to the remote repository(ies)</description>
         </goal>
  -    </goals>
  -    
  -    <goal>
  +      <goal>
  +        <name>ear:deploy-snapshot</name>
  +        <description>Deploy the snapshot version of the ear to the remote 
repository(ies)</description>
  +      </goal>    
  +      <goal>
           <name>ear:generate-ear-descriptor</name>
           <description>
               Generates application.xml 
               file based on information from POM
           </description>
         </goal>
  +    </goals>  
    </body>
   </document>
  
  
  
  1.5       +8 -6      maven/src/plugins-build/ear/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/ear/xdocs/changes.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- changes.xml       1 Jul 2003 08:45:14 -0000       1.4
  +++ changes.xml       1 Jul 2003 14:57:56 -0000       1.5
  @@ -6,16 +6,18 @@
     </properties>
     <body>
       <release version="1.2" date="in CVS">
  -      <action dev="vmassol" type="fix">
  -        Removed warning about application.xml being added twice to the
  -        EAR.
  -      </action>
         <action dev="michal" type="fix">
  -        Iterating artifacts not depedencies            
  +        Fixes for MAVEN-518.
  +        Artifact processing in the plugin 
  +        was slightly changed and now it supports jar overriding mechanism           
         </action>
         <action dev="michal" type="add">
  -        Added deploy, deploy-snapshot and install-snapshot goals
  +        Added 'deploy', 'deploy-snapshot' and 'install-snapshot' goals
         </action>
  +      <action dev="vmassol" type="fix">
  +        Removed warning about application.xml being added twice to the
  +        EAR.
  +      </action>      
       </release>
       <release version="1.1" date="2003-05-08">
         <action dev="michal" type="add">
  
  
  
  1.10      +35 -20    maven/src/plugins-build/ear/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/ear/plugin.jelly,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- plugin.jelly      1 Jul 2003 08:45:13 -0000       1.9
  +++ plugin.jelly      1 Jul 2003 14:57:57 -0000       1.10
  @@ -52,25 +52,40 @@
         <j:forEach var="lib" items="${pom.artifacts}">
           <j:set var="dep" value="${lib.dependency}"/>      
           <j:if test="${dep.getProperty('ear.bundle')=='true'}">
  -          <ant:echo>Bundling: ${dep.type}</ant:echo>
  -          <j:choose>
  -            <j:when test="${dep.type == 'jar'}">
  -              <ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
  -               <ant:include name="${dep.artifact}"/>
  -              </ant:fileset>
  -            </j:when>
  -            <j:when test="${dep.type == 'ear' }">
  -              <ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ears/">
  -                <ant:include name="${dep.artifact}"/>
  -              </ant:fileset>
  -            </j:when>
  -            <j:when test="${dep.type == 'ejb' }">
  -              <ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ejbs/">
  -                <ant:include name="${dep.artifact}"/>
  -              </ant:fileset>
  -            </j:when>
  -          </j:choose>
  -        </j:if> 
  +          
  +          <!-- 
  +          
  +           We know that this dep "wants" to be bundled.
  +           We should bundle only jars, wars and ejbs 
  +            
  +          -->
  +                    
  +          <!-- I want to have
  +          <j:if test="${dep.type == 'jar' or dep.type == 'war' or dep.type == 
'ejb'} ">   
  +           but jexl sucks so I have to write extra 10 lines...
  +          -->
  +          
  +          <j:set var="bundle" value="false"/>
  +          <j:if test="${dep.type == 'jar'}">   
  +            <j:set var="bundle" value="true"/>
  +          </j:if>
  +                    
  +          <j:if test="${dep.type == 'war'}">   
  +            <j:set var="bundle" value="true"/>
  +          </j:if>
  +          
  +          <j:if test="${dep.type == 'ejb'}">   
  +            <j:set var="bundle" value="true"/>
  +          </j:if>          
  +          
  +          <j:if test="${bundle}">
  +            <ant:echo>Bundling: ${dep.type} - ${dep.id}</ant:echo>                  
                           
  +             <ant:fileset dir="${lib.file.parent}">
  +               <ant:include name="${lib.file.name}"/>
  +            </ant:fileset>
  +            
  +          </j:if> 
  +        </j:if>  
         </j:forEach>
   
         <!-- include license -->
  @@ -125,7 +140,7 @@
              <j:set var="dep" value="${lib.dependency}"/>
             <j:if test="${dep.getProperty('ear.bundle')=='true'}">
               <j:choose>
  -              <j:when test="${dep.type=='ear'}">
  +              <j:when test="${dep.type=='war'}">
                   <x:element name="module">
                     <x:element name="web">
                       <x:element name="web-uri">${dep.getArtifact()}</x:element>
  
  
  

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

Reply via email to