You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The Maven SAR plugin is a simple Maven 1.x plugin that can be used to generate a JBoss SAR that you can deploy.

"Short term solution"

Note that this plugin was knocked up to work around a missing peice of functionality in the Maven JBoss plugin see http://jira.codehaus.org/browse/MPJBOSS-13

The plugin is purely for the packaging of the SAR, if you wish to generate your jboss-service.xml you should look at the XDoclet document. It requires a directory containing the META-INF/jboss-service.xml within your project, by default this is $basedir/src/sar, however it can be overridden with the property *maven.sar.src=$

Unknown macro: {basedir}

/src/sar*.

You can also mark your dependencies so they are bundled using the sar.bundle property.


<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.3</version>
<url>http://jakarta.apache.org/commons/logging/</url>
<properties>
<sar.bundle>true</sar.bundle>
</properties>
</dependency>


Once you have set this up, you can run the sar:install goal.

maven sar:install

If you project is usually myproject-1.0.jar you should now find a myproject-1.0.sar in your target directory which will hopefully deploy without a problem on JBoss.

  • No labels