You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Alvarado, Juan" <ja...@trendium.com> on 2005/10/12 18:46:56 UTC

Disabling Transitive Dependencies

Is there any way that when a dependency is configured, just that dependency
is downloaded and nothing else. It seems that with just a few dependencies
on a project, my lib folder in my war is growing way too big with jars that
I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
dependency stuff on the m2 site, but I really don't follow it too well. My
project consists of mainly struts, spring and hibernate. 

I tried the following:

<exclusions>
    	<exclusion>
    		<groupId>servlet</groupId>
    			<artifactId>servlet-api</artifactId>
    	</exclusion>
    </exclusions>

But it still copied the jar into the lib folder of the war. I am more
comfortable using maven 1, but I wanted to move over to m2, but I seem to be
spending way too much time trying to figure out this whole transitive
dependency stuff and less time configuring my project. 

I am open to any suggestions.

Thanks

Juan A.


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


Re: Disabling Transitive Dependencies

Posted by Arik Kfir <ar...@gmail.com>.
I think you add an "<exclusions>" tag to a dependency. See the "POM
reference" in the maven 2 site at "
http://maven.apache.org/maven2/maven-model/maven.html"

enjoy..

On 10/12/05, Alvarado, Juan <ja...@trendium.com> wrote:
>
> Is there any way that when a dependency is configured, just that
> dependency
> is downloaded and nothing else. It seems that with just a few dependencies
> on a project, my lib folder in my war is growing way too big with jars
> that
> I don't even need i.e. servlet-api-2.4.jar. I read the transitive
> dependency stuff on the m2 site, but I really don't follow it too well. My
> project consists of mainly struts, spring and hibernate.
>
> I tried the following:
>
> <exclusions>
> <exclusion>
> <groupId>servlet</groupId>
> <artifactId>servlet-api</artifactId>
> </exclusion>
> </exclusions>
>
> But it still copied the jar into the lib folder of the war. I am more
> comfortable using maven 1, but I wanted to move over to m2, but I seem to
> be
> spending way too much time trying to figure out this whole transitive
> dependency stuff and less time configuring my project.
>
> I am open to any suggestions.
>
> Thanks
>
> Juan A.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Disabling Transitive Dependencies

Posted by Arik Kfir <ar...@gmail.com>.
Oh sure - I meant in general... does maven declare that poms defined
in internal repos override ibiblio?

On 10/12/05, Stephen Duncan <st...@gmail.com> wrote:
> You need to figure out the right groupId for the exclusion.  Depending
> on where you're getting the dependency from it's either
> <groupId>servletapi</groupId> or <groupId>javax.servlet</groupId>
>
> -Stephen
>
> On 10/12/05, Alvarado, Juan <ja...@trendium.com> wrote:
> > Is there any way that when a dependency is configured, just that dependency
> > is downloaded and nothing else. It seems that with just a few dependencies
> > on a project, my lib folder in my war is growing way too big with jars that
> > I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> > dependency stuff on the m2 site, but I really don't follow it too well. My
> > project consists of mainly struts, spring and hibernate.
> >
> > I tried the following:
> >
> > <exclusions>
> >         <exclusion>
> >                 <groupId>servlet</groupId>
> >                         <artifactId>servlet-api</artifactId>
> >         </exclusion>
> >     </exclusions>
> >
> > But it still copied the jar into the lib folder of the war. I am more
> > comfortable using maven 1, but I wanted to move over to m2, but I seem to be
> > spending way too much time trying to figure out this whole transitive
> > dependency stuff and less time configuring my project.
> >
> > I am open to any suggestions.
> >
> > Thanks
> >
> > Juan A.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Stephen Duncan Jr
> www.stephenduncanjr.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Disabling Transitive Dependencies

Posted by Stephen Duncan <st...@gmail.com>.
You need to figure out the right groupId for the exclusion.  Depending
on where you're getting the dependency from it's either
<groupId>servletapi</groupId> or <groupId>javax.servlet</groupId>

-Stephen

On 10/12/05, Alvarado, Juan <ja...@trendium.com> wrote:
> Is there any way that when a dependency is configured, just that dependency
> is downloaded and nothing else. It seems that with just a few dependencies
> on a project, my lib folder in my war is growing way too big with jars that
> I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> dependency stuff on the m2 site, but I really don't follow it too well. My
> project consists of mainly struts, spring and hibernate.
>
> I tried the following:
>
> <exclusions>
>         <exclusion>
>                 <groupId>servlet</groupId>
>                         <artifactId>servlet-api</artifactId>
>         </exclusion>
>     </exclusions>
>
> But it still copied the jar into the lib folder of the war. I am more
> comfortable using maven 1, but I wanted to move over to m2, but I seem to be
> spending way too much time trying to figure out this whole transitive
> dependency stuff and less time configuring my project.
>
> I am open to any suggestions.
>
> Thanks
>
> Juan A.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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


Re: Disabling Transitive Dependencies

Posted by Arik Kfir <ar...@gmail.com>.
Do repositories defined in settings.xml or poms always override the
ones in ibiblio?

On 10/12/05, Dave Brondsema <da...@brondsema.net> wrote:
> Many projects in the m2 repository don't specify <scope> and <optional>
> properly for all their dependencies, so you can get a lot of extra jars.
>
> What I've done to solve this is create our own remote repository which
> has pom files to override ones like that in ibiblio.
>
> Alvarado, Juan wrote:
> > Is there any way that when a dependency is configured, just that dependency
> > is downloaded and nothing else. It seems that with just a few dependencies
> > on a project, my lib folder in my war is growing way too big with jars that
> > I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> > dependency stuff on the m2 site, but I really don't follow it too well. My
> > project consists of mainly struts, spring and hibernate.
> >
> > I tried the following:
> >
> > <exclusions>
> >       <exclusion>
> >               <groupId>servlet</groupId>
> >                       <artifactId>servlet-api</artifactId>
> >       </exclusion>
> >     </exclusions>
> >
> > But it still copied the jar into the lib folder of the war. I am more
> > comfortable using maven 1, but I wanted to move over to m2, but I seem to be
> > spending way too much time trying to figure out this whole transitive
> > dependency stuff and less time configuring my project.
> >
> > I am open to any suggestions.
> >
> > Thanks
> >
> > Juan A.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> --
> Dave Brondsema
> Software Developer
> Cornerstone University
>
>
>

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


Re: Disabling Transitive Dependencies

Posted by David Sag <ds...@epo.org>.
I humbly suggest you (Dave Brondsema, Juan Alvarado)  create an issue in 
JIRA listing the plug-ins with malformed meta-data so that the developers 
have something more concrete  to work off.

Kind regards,
Dave Sag 




 

Brett Porter <br...@gmail.com> wrote on 13/10/2005 03:41:52 AM:

> Please submit these fixes back to the project if you can. It won't
> take long for us to get all the metadata cleaned up in this way.
> 
> - Brett
> 
> On 10/13/05, Dave Brondsema <da...@brondsema.net> wrote:
> > Many projects in the m2 repository don't specify <scope> and 
<optional>
> > properly for all their dependencies, so you can get a lot of extra 
jars.
> >
> > What I've done to solve this is create our own remote repository which
> > has pom files to override ones like that in ibiblio.
> >
> > Alvarado, Juan wrote:
> > > Is there any way that when a dependency is configured, just 
thatdependency
> > > is downloaded and nothing else. It seems that with just a few 
dependencies
> > > on a project, my lib folder in my war is growing way too big 
> with jars that
> > > I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> > > dependency stuff on the m2 site, but I really don't follow it too 
well. My
> > > project consists of mainly struts, spring and hibernate.
> > >
> > > I tried the following:
> > >
> > > <exclusions>
> > >       <exclusion>
> > >               <groupId>servlet</groupId>
> > >                       <artifactId>servlet-api</artifactId>
> > >       </exclusion>
> > >     </exclusions>
> > >
> > > But it still copied the jar into the lib folder of the war. I am 
more
> > > comfortable using maven 1, but I wanted to move over to m2, but 
> I seem to be
> > > spending way too much time trying to figure out this whole 
transitive
> > > dependency stuff and less time configuring my project.
> > >
> > > I am open to any suggestions.
> > >
> > > Thanks
> > >
> > > Juan A.
> > >
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> >
> > --
> > Dave Brondsema
> > Software Developer
> > Cornerstone University
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Re: Disabling Transitive Dependencies

Posted by Brett Porter <br...@gmail.com>.
Please submit these fixes back to the project if you can. It won't
take long for us to get all the metadata cleaned up in this way.

- Brett

On 10/13/05, Dave Brondsema <da...@brondsema.net> wrote:
> Many projects in the m2 repository don't specify <scope> and <optional>
> properly for all their dependencies, so you can get a lot of extra jars.
>
> What I've done to solve this is create our own remote repository which
> has pom files to override ones like that in ibiblio.
>
> Alvarado, Juan wrote:
> > Is there any way that when a dependency is configured, just that dependency
> > is downloaded and nothing else. It seems that with just a few dependencies
> > on a project, my lib folder in my war is growing way too big with jars that
> > I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> > dependency stuff on the m2 site, but I really don't follow it too well. My
> > project consists of mainly struts, spring and hibernate.
> >
> > I tried the following:
> >
> > <exclusions>
> >       <exclusion>
> >               <groupId>servlet</groupId>
> >                       <artifactId>servlet-api</artifactId>
> >       </exclusion>
> >     </exclusions>
> >
> > But it still copied the jar into the lib folder of the war. I am more
> > comfortable using maven 1, but I wanted to move over to m2, but I seem to be
> > spending way too much time trying to figure out this whole transitive
> > dependency stuff and less time configuring my project.
> >
> > I am open to any suggestions.
> >
> > Thanks
> >
> > Juan A.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> --
> Dave Brondsema
> Software Developer
> Cornerstone University
>
>
>

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


Re: Disabling Transitive Dependencies

Posted by Dave Brondsema <da...@brondsema.net>.
Many projects in the m2 repository don't specify <scope> and <optional>
properly for all their dependencies, so you can get a lot of extra jars.

What I've done to solve this is create our own remote repository which
has pom files to override ones like that in ibiblio.

Alvarado, Juan wrote:
> Is there any way that when a dependency is configured, just that dependency
> is downloaded and nothing else. It seems that with just a few dependencies
> on a project, my lib folder in my war is growing way too big with jars that
> I don't even need i.e. servlet-api-2.4.jar.  I read the transitive
> dependency stuff on the m2 site, but I really don't follow it too well. My
> project consists of mainly struts, spring and hibernate. 
> 
> I tried the following:
> 
> <exclusions>
>     	<exclusion>
>     		<groupId>servlet</groupId>
>     			<artifactId>servlet-api</artifactId>
>     	</exclusion>
>     </exclusions>
> 
> But it still copied the jar into the lib folder of the war. I am more
> comfortable using maven 1, but I wanted to move over to m2, but I seem to be
> spending way too much time trying to figure out this whole transitive
> dependency stuff and less time configuring my project. 
> 
> I am open to any suggestions.
> 
> Thanks
> 
> Juan A.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


-- 
Dave Brondsema
Software Developer
Cornerstone University