You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Zmicer Kashlach <dz...@gmail.com> on 2015/02/10 10:59:32 UTC

Assembly plugin: excluding dependencies

 Hi all,

I have a pom.xml with assembly descriptor.

My problem that assembly is fetching dependencies, which are not defined in
pom.xml
As a result - huge *.zip file with distribution.

I've tried the following example:

<excludes>
      <exclude>*spring*:jar:*</exclude>
</excludes>

but it does not help - *.jar files remain in *.zip archive.
What should I check to find a solution?

Thanks in advance!




--
View this message in context: http://maven.40175.n5.nabble.com/Assembly-plugin-excluding-dependencies-tp5826295.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly plugin: excluding dependencies

Posted by Adrien Rivard <ad...@gmail.com>.
There is also a  <useTransitiveDependencies/> tag in assembly descriptor
format.
And a  <useTransitiveFiltering> with default value to false  which I'm not
totally sure what it does but could explain why your syntax does'nt work.

see http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html


On Tue, Feb 10, 2015 at 11:06 AM, Anders Hammar <an...@hammar.net> wrote:

> Well, you're probably getting transitive dependencies. Typically they are
> required as well. Are they not?
>
> You could try excluding them in standard Maven way
> (dependencies/dependency/exclusions).
>
> /Anders
>
> On Tue, Feb 10, 2015 at 10:59 AM, Zmicer Kashlach <
> dzmitrykashlach@gmail.com
> > wrote:
>
> >  Hi all,
> >
> > I have a pom.xml with assembly descriptor.
> >
> > My problem that assembly is fetching dependencies, which are not defined
> in
> > pom.xml
> > As a result - huge *.zip file with distribution.
> >
> > I've tried the following example:
> >
> > <excludes>
> >       <exclude>*spring*:jar:*</exclude>
> > </excludes>
> >
> > but it does not help - *.jar files remain in *.zip archive.
> > What should I check to find a solution?
> >
> > Thanks in advance!
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://maven.40175.n5.nabble.com/Assembly-plugin-excluding-dependencies-tp5826295.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



-- 
Adrien Rivard

Re: Assembly plugin: excluding dependencies

Posted by Anders Hammar <an...@hammar.net>.
Well, you're probably getting transitive dependencies. Typically they are
required as well. Are they not?

You could try excluding them in standard Maven way
(dependencies/dependency/exclusions).

/Anders

On Tue, Feb 10, 2015 at 10:59 AM, Zmicer Kashlach <dzmitrykashlach@gmail.com
> wrote:

>  Hi all,
>
> I have a pom.xml with assembly descriptor.
>
> My problem that assembly is fetching dependencies, which are not defined in
> pom.xml
> As a result - huge *.zip file with distribution.
>
> I've tried the following example:
>
> <excludes>
>       <exclude>*spring*:jar:*</exclude>
> </excludes>
>
> but it does not help - *.jar files remain in *.zip archive.
> What should I check to find a solution?
>
> Thanks in advance!
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Assembly-plugin-excluding-dependencies-tp5826295.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Assembly plugin: excluding dependencies

Posted by Zmicer Kashlach <dz...@gmail.com>.
Thank you!

You're right, it was problem with transitive dependencies.
Setting <scope>provided</scope> solved the issue.



--
View this message in context: http://maven.40175.n5.nabble.com/Assembly-plugin-excluding-dependencies-tp5826295p5826308.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org