Message-ID: <870492372.835.1414083152643.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_834_1010609785.1414083152643" ------=_Part_834_1010609785.1414083152643 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
SAR is an acronym for "Service ARchive". SAR files are plain=
old Java JAR files that contain a JBoss service definition file (=
META-INF/jboss-service.xml) and (optionally) other resources n=
eeded by the service. By convention SAR files are named with a '
Out of the box, Maven 2.x (at least as of version 2.0.7) does not includ= e support creating SAR files, but there are a number of readily available p= lugins that provide this capability. Those that I am aware of include:= =20
jboss-packaging-maven-plugin', and has since been = superseded by it.
This section details how to create a SAR artifact using the '
-packaging-maven-plugin'. There are two examples: the first example =
shows the case of creating a SAR in a simple (non-multi-project) maven-2.x =
project. The second example shows how to create a SAR artifact in a subproj=
ect of a larger multi-project, and then include the SAR in an EAR file crea=
ted in a different subproject.
FIXME: document simple case=20
The steps below below pertain only to use of the '
maven-plugin' plugin, currently available in the codehaus.org snapshots repository:
To configure use of the plugin, I added the following snippets to my top=
In the '
pom.xml' of the subproject that produces the SAR fi=
le, I declared the packaging type as '
Note that the '
dependencyManagement' entry for the SAR subp=
roject in the top-level '
pom.xml' file indicates type '
ar', but the packaging type declared by the SAR subproject itself is=
jboss-sar'. During the 'install' build phase, the SAR subpro=
ject will install the artifact with a '
.sar' extension in the =
local maven repository.
In the '
pom.xml' file of the subproject that produces the E=
AR file, I have the following relevant snippets:
The things to note about this snippet are that the dependency type of th=
e SAR module is '
sar' (not '
and the '
<SarModule>' element of the '
lugin' configuration does not include a classifier.