You are right about the the connector module being for RAR modules only. I read 
up on it and it seems SARs are not deployed from application.xml, but 
jboss-app.xml instead. My bad.

I currently build my SAR module as a jar since sar is not working for me as a 
packaging type. I noticed sarModule is expecting groupId:artifactId:sar:version 
in the repository. I rename the .jar to .sar in my local repository, so Maven 
can find it. The SAR module is now correctly included in the EAR. 

I noticed the needed jboss-app.xml is not generated for the sar. So I wrote 
wrote my own and configured the earSourceDirectory:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-ear-plugin</artifactId>
  <version>2.1</version>
  <configuration>
    <generateApplicationXml>true</generateApplicationXml>
    <earSourceDirectory>${basedir}/include</earSourceDirectory> <!-- place 
jboss-app.xml in this directory -->
    <modules>
      <sarModule>
        <groupId>myGroup</groupId>
        <artifactId>myArtifact</artifactId>
      </sarModule>
...

After some fiddling I got it working but it's not clean yet. I still need to 
manually rename the .jar to .sar in the repository for each build.

How do I create an artifact of the type sar? Within my SAR project I tried 
setting the packaging type to sar in the POM but it gives me this exception:
  org.apache.maven.lifecycle.LifecycleExecutionException: Cannot find lifecycle 
mapping for packaging: 'sar'. 

This seems odd as the maven-ear-module seems to "know" the sar package type 
just fine. Am I missing something here?



-----Oorspronkelijk bericht-----
Van: Stephane Nicoll [mailto:[EMAIL PROTECTED] 
Verzonden: donderdag 19 januari 2006 20:22
Aan: Maven Users List
Onderwerp: Re: [M2] Is generating an application.xml with connector module 
possible?

On 1/19/06, Peschier J. (Jeroen) <[EMAIL PROTECTED]> wrote:
>
> My use-case:
> - Using the maven-ear-plugin to generate the application.xml deployment
> descriptor.
> - Want to include a SAR module in the deployment descriptor.
> - Found out about ejbModule, warModule and javaModule but could not find
> any info on how to generate a connector module. So I tried the obvious:

A connector is a rar file as per spec. JBoss has its own sar format
which is supported in the EAR plugin. If you have a dependency of type
'sar' it should work out of the box.

You don't need to configure it in the <modules> section (regarding
includeInApplicationXml which is javaModule specific)


> I read the plugin
> configuration doc and found that "modules" is of type "EarModule". Where
> can I find info on the definition of "EarModule"?

FYI, the supported implementations of EarModule are:

* jar
* ejb
* ejb-client
* ejb3
* par
* rar
* war
* sar

This is a good idea, I will update the doc for the next plugin's release.

Cheers,
Stéphane



--
.::You're welcome ::.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to