dion        2003/09/25 01:06:03

  Modified:    src/plugins-build/deploy plugin.jelly
  Log:
  Fix for MAVEN-458
  
  Revision  Changes    Path
  1.11      +23 -10    maven/src/plugins-build/deploy/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/deploy/plugin.jelly,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- plugin.jelly      24 Sep 2003 06:17:04 -0000      1.10
  +++ plugin.jelly      25 Sep 2003 08:06:02 -0000      1.11
  @@ -142,20 +142,33 @@
         <j:set var="mavenRepoLocal" 
value='${context.getVariable("maven.repo.local")}'/>
         <ant:mkdir dir="${todir}"/>
         <ant:copy todir="${todir}" flatten="true">
  -        <ant:fileset dir="${mavenRepoLocal}">
  -          <!-- FIXME: should use pom.artifacts -->
  -          <j:forEach var="dep" items="${pom.dependencies}">
  -            <ant:include 
name="${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"/>
  -          </j:forEach>
  +        <!-- 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>
  +        
  +        <!-- 
  +         !   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}">
  -              <j:set var="depToExclude" value="${pom.getDependency(exclude)}"/>
  -              <ant:exclude 
name="${depToExclude.artifactDirectory}/${depToExclude.type}s/${depToExclude.artifact}"/>
  +              <!-- 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>
  -        </ant:fileset>
  +          <j:if test="${!excluded}">
  +            <ant:fileset dir="${lib.file.parent}">
  +              <ant:include name="${lib.file.name}"/>
  +            </ant:fileset>
  +          </j:if>
  +        </j:forEach>
         </ant:copy>
       </define:tag>
   
  
  
  

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

Reply via email to