Hi, all,  
 
Due to a particular need of my project, i have to copy some dependencies to
another directory.  The dependencies include a war file. I have written this
code fragment in a maven.xml 
 
    <j:forEach var="lib" items="${pom.artifacts}">
            <ant:echo> ${lib.name}</ant:echo>
      <j:set var="dep" value="${lib.dependency}"/>
      <j:set var="group" value="${dep.artifactDirectory}"/>
      <j:if test="${group=='myprojectA' or group=='myprojectB'}">
            <j:set var="artifact" value="${dep.artifact}"/>
            <j:set var="type" value="${dep.type}"/>
            <ant:echo>Copy ${artifact} to ${maven.ear.src}</ant:echo>
            <ant:copy toDir="${maven.ear.src}"
                  file="${maven.repo.local}/${group}/${type}s/${artifact}"
/>
      </j:if>
    </j:forEach>
 
and in my project.xml,
 
...
    <dependency>
      <groupId>myprojectA</groupId>
      <artifactId>myapp</artifactId>
      <version>3.1.4</version>
      <type>war</type>
      <properties>
        <ear.bundle>true</ear.bundle>
      </properties>
    </dependency>
...
 
The war file never show up in the above <j:forEach/> loop. Why is that? Is
war file not included by default?
 
Cheers,
AK
 
 
 

Reply via email to