The Maven SAR plugin is a simple Maven 1.x plugin that can be used to generate a JBoss SAR that you can deploy.
The plugin is available here and you can install is by dropping it into your Maven installations plugins directory using $MAVEN_HOME/plugins. It is also available from Service Mix CVS under tooling/maven-sar-plugin.
Note | ||
---|---|---|
| ||
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=$basedir/src/sar.
You can also mark your dependencies so they are bundled using the sar.bundle property.
Code Block | ||||
---|---|---|---|---|
| ||||
<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.
No Format |
---|
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.