You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nicolas de loof <ni...@gmail.com> on 2007/07/31 14:41:31 UTC

assembly issue with an ear

My project has multiple modules, one of them packages my webapp as ear.
My parent project has an assembly descriptor to build a tar from artifacts +
some script files

If I run "mvn assembly:assembly" I get a strange error about my ear having
no file attached :

[INFO] Failed to create assembly: Artifact:
com.capgemini.vpc:vpc-application:ear:2.17.00 (included by module) does not
have an artifact with a file. Please ensure the package phase is run before
the assembly is generated.

if I run "mvn package assembly:assembly" the assembly is build as expected,
but packaging occurs twice as assembly:assembly allready force one...

What's wrong ?
Nico.

Re: assembly issue with an ear

Posted by Eric Redmond <er...@gmail.com>.
That's unfortunate... looks like you'll have to wait until 2.1 for a better
solution :(

-- 
Eric Redmond
http://blog.propellors.net

On 7/31/07, nicolas de loof <ni...@gmail.com> wrote:
>
> Doesn't work in any way (assembly:*) when the assembly plugin is
> configured
> to run during package phase. The only way to make it work is to run "mvn
> package assembly:*"
>
> 2007/7/31, Eric Redmond <er...@gmail.com>:
> >
> > Have you tried binding assembly:attached to the packaging phase? I don't
> > know which would execute first (std package or assembly), but it might
> be
> > worth a short. In 2.1 the pre-package phase will be added, so things
> like
> > this should be easier to deal with in a consistent way.
> >
> > --
> > Eric Redmond
> > http://blog.propellors.net
> >
> > On 7/31/07, nicolas de loof <ni...@gmail.com> wrote:
> > >
> > > Found the answer myself :
> > >
> > >
> > >
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
> > > "*NOTE:* Because of a quirk in Maven 2.0's execution model relating to
> > > aggregator mojos and the inheritance hierarchy, we need to explicitly
> > > execute the package phase ahead of the assembly invocation, to ensure
> > all
> > > modules have been built."
> > >
> > >
> > >
> > > 2007/7/31, nicolas de loof <ni...@gmail.com>:
> > > >
> > > > My project has multiple modules, one of them packages my webapp as
> > ear.
> > > > My parent project has an assembly descriptor to build a tar from
> > > artifacts
> > > > + some script files
> > > >
> > > > If I run "mvn assembly:assembly" I get a strange error about my ear
> > > having
> > > > no file attached :
> > > >
> > > > [INFO] Failed to create assembly: Artifact:
> > > > com.capgemini.vpc:vpc-application:ear:2.17.00 (included by module)
> > does
> > > > not
> > > > have an artifact with a file. Please ensure the package phase is run
> > > > before the assembly is generated.
> > > >
> > > > if I run "mvn package assembly:assembly" the assembly is build as
> > > > expected, but packaging occurs twice as assembly:assembly allready
> > force
> > > > one...
> > > >
> > > > What's wrong ?
> > > > Nico.
> > > >
> > >
> >
>

Re: assembly issue with an ear

Posted by nicolas de loof <ni...@gmail.com>.
Doesn't work in any way (assembly:*) when the assembly plugin is configured
to run during package phase. The only way to make it work is to run "mvn
package assembly:*"

2007/7/31, Eric Redmond <er...@gmail.com>:
>
> Have you tried binding assembly:attached to the packaging phase? I don't
> know which would execute first (std package or assembly), but it might be
> worth a short. In 2.1 the pre-package phase will be added, so things like
> this should be easier to deal with in a consistent way.
>
> --
> Eric Redmond
> http://blog.propellors.net
>
> On 7/31/07, nicolas de loof <ni...@gmail.com> wrote:
> >
> > Found the answer myself :
> >
> >
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
> > "*NOTE:* Because of a quirk in Maven 2.0's execution model relating to
> > aggregator mojos and the inheritance hierarchy, we need to explicitly
> > execute the package phase ahead of the assembly invocation, to ensure
> all
> > modules have been built."
> >
> >
> >
> > 2007/7/31, nicolas de loof <ni...@gmail.com>:
> > >
> > > My project has multiple modules, one of them packages my webapp as
> ear.
> > > My parent project has an assembly descriptor to build a tar from
> > artifacts
> > > + some script files
> > >
> > > If I run "mvn assembly:assembly" I get a strange error about my ear
> > having
> > > no file attached :
> > >
> > > [INFO] Failed to create assembly: Artifact:
> > > com.capgemini.vpc:vpc-application:ear:2.17.00 (included by module)
> does
> > > not
> > > have an artifact with a file. Please ensure the package phase is run
> > > before the assembly is generated.
> > >
> > > if I run "mvn package assembly:assembly" the assembly is build as
> > > expected, but packaging occurs twice as assembly:assembly allready
> force
> > > one...
> > >
> > > What's wrong ?
> > > Nico.
> > >
> >
>

Re: assembly issue with an ear

Posted by Eric Redmond <er...@gmail.com>.
Have you tried binding assembly:attached to the packaging phase? I don't
know which would execute first (std package or assembly), but it might be
worth a short. In 2.1 the pre-package phase will be added, so things like
this should be easier to deal with in a consistent way.

-- 
Eric Redmond
http://blog.propellors.net

On 7/31/07, nicolas de loof <ni...@gmail.com> wrote:
>
> Found the answer myself :
>
>
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
> "*NOTE:* Because of a quirk in Maven 2.0's execution model relating to
> aggregator mojos and the inheritance hierarchy, we need to explicitly
> execute the package phase ahead of the assembly invocation, to ensure all
> modules have been built."
>
>
>
> 2007/7/31, nicolas de loof <ni...@gmail.com>:
> >
> > My project has multiple modules, one of them packages my webapp as ear.
> > My parent project has an assembly descriptor to build a tar from
> artifacts
> > + some script files
> >
> > If I run "mvn assembly:assembly" I get a strange error about my ear
> having
> > no file attached :
> >
> > [INFO] Failed to create assembly: Artifact:
> > com.capgemini.vpc:vpc-application:ear:2.17.00 (included by module) does
> > not
> > have an artifact with a file. Please ensure the package phase is run
> > before the assembly is generated.
> >
> > if I run "mvn package assembly:assembly" the assembly is build as
> > expected, but packaging occurs twice as assembly:assembly allready force
> > one...
> >
> > What's wrong ?
> > Nico.
> >
>

Re: assembly issue with an ear

Posted by nicolas de loof <ni...@gmail.com>.
Found the answer myself :

http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
"*NOTE:* Because of a quirk in Maven 2.0's execution model relating to
aggregator mojos and the inheritance hierarchy, we need to explicitly
execute the package phase ahead of the assembly invocation, to ensure all
modules have been built."



2007/7/31, nicolas de loof <ni...@gmail.com>:
>
> My project has multiple modules, one of them packages my webapp as ear.
> My parent project has an assembly descriptor to build a tar from artifacts
> + some script files
>
> If I run "mvn assembly:assembly" I get a strange error about my ear having
> no file attached :
>
> [INFO] Failed to create assembly: Artifact:
> com.capgemini.vpc:vpc-application:ear:2.17.00 (included by module) does
> not
> have an artifact with a file. Please ensure the package phase is run
> before the assembly is generated.
>
> if I run "mvn package assembly:assembly" the assembly is build as
> expected, but packaging occurs twice as assembly:assembly allready force
> one...
>
> What's wrong ?
> Nico.
>