what is the packaging for your project ?
On 2/8/07, Jo Vandermeeren <[EMAIL PROTECTED]> wrote:
Hi again..
Forgot to include the plugin snippet of the pom.. Maven version is 2.0.4..
Cheers
Jo
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${basedir}/dist/employee.ear</file>
<type>ear</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
On 2/8/07, Jo Vandermeeren <[EMAIL PROTECTED]> wrote:
>
> The result of my ant build is an exploded ear, which is then jarred into
> an ear.
> When i use the buil-help-maven-plugin,to attach this ear to the maven
> module for this component, I get following error:
>
> [INFO] Building jar: /home/jo/projects/ystr/trunk/trax-ear/target/trax-
> ear-3.2-SNAPSHOT.ear
> [INFO] [build-helper:attach-artifact {execution: attach-artifacts}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An invalid artifact was detected.
>
> This artifact might be in your project's POM, or it might have been
> included transitively during the resolution process. Here is the information
> we do have for this artifact:
>
> o GroupID: com.trax
> o ArtifactID: trax-ear
> o Version: 3.2-SNAPSHOT
> o Type: ear
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
>
> The module information above is the module's pom information.
> As you can see, it has EAR packaging.. Is this a problem with the
> build-helper plugin?
>
> What I want to do is to "trick" maven into believing that this ear is the
> ear that maven would build itself, if the project was a full maven project.
> I believe that maven wants to attach the ant-built ear to this module and
> produce a new ear, containing the attached artifact.
> This is ofcourse not what I want.. I want to let maven rename the
> ant-built ear, based on the groupId etc information in this module's pom.
> Then install it in the repository as if it would be a plain old maven
> artifact :)
>
> Another step would be to stop the ant build at the exploded ear phase. So
> maven can package up the directories into an ear of its own.
>
> Has anyone done something similar?
>
> Actually, since the client changed the specs of the produced artifacts, I
> must also include another regular maven-built webapplication into the
> above-mentioned ear.
> This can become quite messy.. Since the entire project is maven-enabled,
> except for this one ear that contains a legacy client/ejb/webapp
> application.
>
> So my other question is.. Is it possible to include the result of the
> above-mentioned ant build (the exploded ear directories) in the
> package-phase of another maven module?
> This to let maven assemble a new ear, containing the contents of the
> ant-build and the result artifact of a maven webapp module.
>
>
> Thanks a bunch
> Jo
>
>
>
>
>
>
> On 1/19/07, Dan Tran <[EMAIL PROTECTED]> wrote:
> >
> > you can attach the final Ant ear artifact to maven project so that it
> > can be
> > installed/deployed
> > as normal maven artifacts using build-helper-maven-plugin.
> >
> > The draw back is the deployed pom has "pom" packaging. I dont know what
> > would be the impact
> >
> > http://mojo.codehaus.org/build-helper-maven-plugin
> >
> >
> > -Dan
> >
> >
> > On 1/19/07, Jo Vandermeeren <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello fellow maven users,
> > >
> > > I'm stuck with a legacy application that is built with ant and uses
> > lots
> > > of
> > > custom ant tasks.
> > > There is no time to create maven plugins for this legacy project
> > instead.
> > >
> > > Anyway.. The project I'm working on consists of two major artifacts.
> > > - one ear with the legacy application (client)
> > > - one ear with our new application (server)
> > >
> > > I would like to build them together with maven, so i created a
> > > POM-packaged
> > > parent and seperate child modules for the new stuff and one child
> > module
> > > for
> > > the legacy application.
> > > I use the antrun plugin to build the legacy ear, which seems to work
> > just
> > > fine..
> > >
> > > The next step is to tell maven to recognize the ear that is produced
> > by
> > > the
> > > ant build as a regular maven artifact and install it in the maven
> > > repository.
> > > Another possibility might be to produce the contents of the ear, but
> > not
> > > yet
> > > package it, so maven can package it and install the ear artifact in
> > the
> > > repo.
> > >
> > > Any ideas? I'm kind of in the dark here..
> > >
> > > PS. Maven 2.0.4
> > >
> > > Thanks!
> > > Jo
> > >
> > >
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]