maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lester Ward <lw...@tagaudit.com>
Subject RE: .sar-goal?
Date Tue, 02 Dec 2003 21:03:52 GMT
> For the time being, is there a way within maven.xml to 
> capture the dependency property information for a sar.bundle element?

Whenever you need to figure out how to do stuff with Jelly, the quickest way
is to look through existing plugin code. (If you look back at the archives,
you'll see a torrent of questions from me about how to do stuff with Jelly
that abruptly ends, because I started looking at plugin code.) For example,
it's pretty clear you want something to work similar to the way .war files
do. So, check the maven-war-plugin/plugin.jelly file. You'll find this:

    <j:forEach var="lib" items="${pom.artifacts}">
      <j:set var="dep" value="${lib.dependency}"/>     
      <j:if test="${dep.getProperty('war.bundle')=='true'}">
          
         <j:if test="${dep.type =='jar'}"> 
           <ant:copy todir="${webapp.build.lib}" file="${lib.path}"/>  
         </j:if> 
         
         <j:if test="${dep.type =='tld'}"> 
           <ant:copy todir="${webapp.build.tlds}" file="${lib.path}"/>  
         </j:if> 
          
      </j:if>  
    </j:forEach>            

> I'm not a jelly guru, but something to loop through the 
> dependencies and add in those marked for sar bundling.

Thus:

    <j:forEach var="lib" items="${pom.artifacts}">
      <j:set var="dep" value="${lib.dependency}"/>     
      <j:if test="${dep.getProperty('sar.bundle')=='true'}">
         <!-- whatever -->
      </j:if>  
    </j:forEach>            

Enjoy,
Wordman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message