There's a difference between the packaging type (car) and the file extension (jar) so there's nothing to do actually.
That being said, there's already a 'car' type out there in Geronimo [1]. Are you aware of this? If you want to add an official support in the ear plugin, your packaging type should be backed by the community. Is this the case? Thanks, Stéphane [1] http://geronimo.apache.org/maven/server/maven-plugins/car-maven-plugin On Mon, Mar 7, 2011 at 12:41 PM, Pablo <[email protected]> wrote: > Cool, > > I added that to my META-INF/plexus/components.xml > > <component> > <role>org.apache.maven.artifact.handler.ArtifactHandler</role> > <role-hint>car</role-hint> > > <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation> > <configuration> > <type>car</type> > <extension>jar</extension> > <language>java</language> > <addedToClasspath>true</addedToClasspath> > </configuration> > </component> > > Looks good, gets installed in the repo as .jar (50% done) > > The problem is that the maven-ear-plugin resolves it to .car again > > Copying artifact[ejb:com.mycompany:MavenEar-ejb:1.0-SNAPSHOT] > to[MavenEar-ejb-1.0-SNAPSHOT.jar] > Copying artifact[jar:com.mycompany:maven-app-client-attempt:1.0-SNAPSHOT] > to[maven-app-client-attempt-1.0-SNAPSHOT.car] > > And that's how it gets written to application.xml too > > <module> > <java>maven-app-client-attempt-1.0-SNAPSHOT.car</java> > </module> > > Now i just need the maven-ear-plugin to handle it as .jar. Know how to do > this? > > > > > > > On 03/07/2011 07:28 PM, Benjamin Bentmann wrote: > > Pablo wrote: > > The behaviour i want is the same as the maven-ejb-plugin: Defines an ejb > packaging type but the artifact gets installed in the repo as a .jar and > gets bundled in the ear as .jar too. > > > The relevant magic is called an artifact handler. See [0] and look for the > EJB case. > > > Benjamin > > > [0] > http://svn.apache.org/repos/asf/maven/maven-3/trunk/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > -- > Pablo Rodriguez Pina > Director > Anahata Technologies PTY LTD > Phone 04 1091 5078 > E-mail [email protected] > Web anahata-it.com <http://www.anahata-it.com> >
