brett       2004/06/25 11:37:27

  Modified:    artifact plugin.jelly
               artifact/xdocs changes.xml
  Log:
  PR: MPARTIFACT-20
  fix copy-deps when there is nothing to copy
  
  Revision  Changes    Path
  1.9       +31 -25    maven-plugins/artifact/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/plugin.jelly,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plugin.jelly      25 Jun 2004 13:50:05 -0000      1.8
  +++ plugin.jelly      25 Jun 2004 18:37:27 -0000      1.9
  @@ -367,36 +367,42 @@
         </j:if>
       
         <j:set var="mavenRepoLocal" 
value='${context.getVariable("maven.repo.local")}'/>
  -      <ant:mkdir dir="${todir}"/>
  -      <ant:copy todir="${todir}" flatten="true">
  -        <!-- grab list of excludedItems up front -->
  +      <!-- grab list of excludedItems up front -->
  +      <j:if test="${excludes != ''}">
  +        <!-- The excludes are a list of dep ids -->
  +        <util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
  +      </j:if>
  +        
  +      <j:useList var="includedLibs" />
  +      <!-- 
  +       !   for each artifact, see if it is excluded. If not, add a fileset
  +       !   to the copy
  +       !--> 
  +      <j:forEach var="lib" items="${pom.artifacts}">
  +        <j:set var="excluded" value="false"/>
           <j:if test="${excludes != ''}">
  -          <!-- The excludes are a list of dep ids -->
  -          <util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
  +          <!-- The excludes are a list of dep ids, check if this id is in the list 
-->
  +          <j:forEach var="exclude" items="${excludeItems}">
  +            <!-- the exclude could be either the short name (e.g. artifactId), or 
the id -->
  +            <j:if test="${(lib.dependency.id == exclude) or 
(lib.dependency.artifactId == exclude)}">
  +              <j:set var="excluded" value="true"/>
  +            </j:if>
  +          </j:forEach>
           </j:if>
  -        
  -        <!-- 
  -         !   for each artifact, see if it is excluded. If not, add a fileset
  -         !   to the copy
  -         !--> 
  -        <j:forEach var="lib" items="${pom.artifacts}">
  -          <j:set var="excluded" value="false"/>
  -          <j:if test="${excludes != ''}">
  -            <!-- The excludes are a list of dep ids, check if this id is in the 
list -->
  -            <j:forEach var="exclude" items="${excludeItems}">
  -              <!-- the exclude could be either the short name (e.g. artifactId), or 
the id -->
  -              <j:if test="${(lib.dependency.id == exclude) or 
(lib.dependency.artifactId == exclude)}">
  -                <j:set var="excluded" value="true"/>
  -              </j:if>
  -            </j:forEach>
  -          </j:if>
  -          <j:if test="${!excluded}">
  +        <j:if test="${!excluded}">
  +          ${includedLibs.add(lib)}
  +        </j:if>
  +      </j:forEach>
  +      <j:if test="${size(includedLibs) != 0}">
  +        <ant:mkdir dir="${todir}"/>
  +        <ant:copy todir="${todir}" flatten="true">
  +          <j:forEach var="lib" items="${includedLibs}">
               <ant:fileset dir="${lib.file.parent}">
                 <ant:include name="${lib.file.name}"/>
               </ant:fileset>
  -          </j:if>
  -        </j:forEach>
  -      </ant:copy>
  +          </j:forEach>
  +        </ant:copy>
  +      </j:if>
       </define:tag>
   
     </define:taglib>
  
  
  
  1.19      +3 -0      maven-plugins/artifact/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/changes.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- changes.xml       23 Jun 2004 13:04:29 -0000      1.18
  +++ changes.xml       25 Jun 2004 18:37:27 -0000      1.19
  @@ -26,6 +26,9 @@
     </properties>
     <body>
       <release version="1.3" date="In CVS">
  +      <action dev="brett" type="add" issue="MPARTIFACT-20">Fix opy-deps when list 
is empty</action>
  +      <action dev="brett" type="add">Accept empty passphrase to ssh based 
deployers</action>
  +      <action dev="brett" type="add">Default to maven.username if repository 
username not given</action>
         <action dev="brett" type="add">Add typeHandler parameter to tags to specify a 
custom handler</action>
         <action dev="brett" type="add">Switch between modern and legacy mode based on 
properties defined</action>
         <action dev="brett" type="add">Absorb the deploy plugin to give one point of 
migration</action>
  
  
  

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

Reply via email to