You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Casey <jd...@commonjava.org> on 2004/02/18 20:05:03 UTC

question about jboss SAR files

Is there a plugin which will assemble JBoss .sar files (I assume these
aren't unique to JBoss, but I'm not sure they're the same as Avalon
SAR's). What I'm really after is the ability to bundle other jars within
the SAR, like the war and ear plugins. It could also be a variation of
the jar plugin, with bundling of properly marked dependencies...

Anyway, if this doesn't exist, I will probably write it. I just want to
check first.

-john

-- 
John Casey
jdcasey@commonjava.org
CommonJava Open Components Project
http://www.commonjava.org


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


Re: question about jboss SAR files

Posted by Kevin Hagel <kh...@mminternet.com>.
John Casey wrote:

>Is there a plugin which will assemble JBoss .sar files (I assume these
>aren't unique to JBoss, but I'm not sure they're the same as Avalon
>SAR's). What I'm really after is the ability to bundle other jars within
>the SAR, like the war and ear plugins. It could also be a variation of
>the jar plugin, with bundling of properly marked dependencies...
>
>Anyway, if this doesn't exist, I will probably write it. I just want to
>check first.
>
>-john
>
>  
>
The most simple operation for me was to use the jar goal and rename the 
result. 
In your particular location in your mavenrepository create a 
subdirectory called sars.  The artifact:install goal seems smart enough 
to look for it if you use the type="sar" option.

  <goal name="sar:sar"
        description="Create the deliverable SAR file.">
    <attainGoal name="jar"/>
    <!-- Rename the .jar to .sar -->
    <j:set var="maven.sar.final.name"
              value="${maven.build.dir}/${maven.final.name}.sar"/>
    <move file="${maven.build.dir}/${maven.final.name}.jar"
        tofile="${maven.build.dir}/${maven.final.name}.sar"
        overwrite="true"
        verbose="true"
    />
  </goal>

  <goal name="sar:install" prereqs="sar:sar"
    description="Install the SAR in the local repository">
    <j:set var="maven.sar.final.name" 
value="${maven.build.dir}/${maven.final.name}.sar"/>
    <artifact:install
       artifact="${maven.sar.final.name}"
       type="sar"
       project="${pom}"
    />
  </goal>

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