You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stevo Slavić <ss...@gmail.com> on 2009/05/19 15:46:31 UTC

Exploding dependencies in a war

Hello Maven users,

In a multimodule project, a module has war packaging and depends on some of
the modules with jar packaging from the same project. Is there a way to
configure war (or some other plugin like dependency or assembly) plugin so
that war ends up with classes of other depenedant modules from the same
project exploded in WEB-INF/classes instead of having their jar's in
WEB-INF/lib?

Regards,
Stevo.

Re: Exploding dependencies in a war

Posted by Stephen Connolly <st...@gmail.com>.
In general people seem to be moving towards not having any exploded jars in
a war file... and indeed that would be the "best practice" that Maven seems
to encourage.

-Stephen

2009/5/26 Stevo Slavić <ss...@gmail.com>

> Thanks Brian, unpack-dependencies does the trick, at least partially. Not
> sure if it's currently best solution, to have jar's of these unpacked
> dependencies excluded from the war I use maven assembly plugin.
>
> Wish war plugin or even dependency declaration itself would support such a
> scenario, so one could configure whether dependency should be included in
> the (jar, war, ...) archive in expanded form or not. Does this usage
> scenario make sense to others?
>
> Regards,
> Stevo.
>
> 2009/5/26 Brian Fox <br...@infinity.nu>
>
> > dependency:unpack or dependency:unpack-dependencies will do this.
> >
> > 2009/5/19 Stevo Slavić <ss...@gmail.com>
> >
> > > Hello Maven users,
> > >
> > > In a multimodule project, a module has war packaging and depends on
> some
> > of
> > > the modules with jar packaging from the same project. Is there a way to
> > > configure war (or some other plugin like dependency or assembly) plugin
> > so
> > > that war ends up with classes of other depenedant modules from the same
> > > project exploded in WEB-INF/classes instead of having their jar's in
> > > WEB-INF/lib?
> > >
> > > Regards,
> > > Stevo.
> > >
> >
>

Re: Exploding dependencies in a war

Posted by Stevo Slavić <ss...@gmail.com>.
Thanks Brian, unpack-dependencies does the trick, at least partially. Not
sure if it's currently best solution, to have jar's of these unpacked
dependencies excluded from the war I use maven assembly plugin.

Wish war plugin or even dependency declaration itself would support such a
scenario, so one could configure whether dependency should be included in
the (jar, war, ...) archive in expanded form or not. Does this usage
scenario make sense to others?

Regards,
Stevo.

2009/5/26 Brian Fox <br...@infinity.nu>

> dependency:unpack or dependency:unpack-dependencies will do this.
>
> 2009/5/19 Stevo Slavić <ss...@gmail.com>
>
> > Hello Maven users,
> >
> > In a multimodule project, a module has war packaging and depends on some
> of
> > the modules with jar packaging from the same project. Is there a way to
> > configure war (or some other plugin like dependency or assembly) plugin
> so
> > that war ends up with classes of other depenedant modules from the same
> > project exploded in WEB-INF/classes instead of having their jar's in
> > WEB-INF/lib?
> >
> > Regards,
> > Stevo.
> >
>

Re: Exploding dependencies in a war

Posted by Brian Fox <br...@infinity.nu>.
dependency:unpack or dependency:unpack-dependencies will do this.

2009/5/19 Stevo Slavić <ss...@gmail.com>

> Hello Maven users,
>
> In a multimodule project, a module has war packaging and depends on some of
> the modules with jar packaging from the same project. Is there a way to
> configure war (or some other plugin like dependency or assembly) plugin so
> that war ends up with classes of other depenedant modules from the same
> project exploded in WEB-INF/classes instead of having their jar's in
> WEB-INF/lib?
>
> Regards,
> Stevo.
>