Re: [m2] Controlling Bloat
The point of optional deps is that tey are not required... I for one would much rather be specific about what deps I was including that had the world get deployed into my app. The problem I'm having now is that deps that should be marked optional are not (which seems to be the opposit of the problem your having). - Brill Pappin On 10/21/05, Mark Kuzmycz <[EMAIL PROTECTED]> wrote: > > I noticed that comoons-logging-1.0.4 was using instead of > true. As a result optional dependencies were being > loaded. > > I see the use of optional and the excludes list being helpful; however, > it is a very time consuming process to track down optional dependencies > if needed (hence the purpose of transitive dependencies). Is there any > plan (in the future) so that maven could work out which optional > dependencies are required. > > A thought: > > What I have noticed is that there are many modules that have optional > dependencies. They are optional because they have functionality or > features (within the module) that need them. I was wondering if the POM > could list all of the features that the project has and dependencies > associated with them. > > E.g. > > > feature-a > > ... > > ... > > > If a dependenciy is not associated with a feature then it is considered > required for the entire module irrespective of the feature. > > From a project's perspective it would list the dependencies and > stipulate which feature(s) it used. > > E.g. > > > x > > feature-a > feature-b > ... > > > ... > > > If no feature was specified then it is assumed that all features are > used and that all dependencies are required and should be included. Any > thoughts? > > I suspect the management of this might be a little challenging ;) . > > Regards, > Mark. > > -Original Message- > From: Stephen Duncan [mailto:[EMAIL PROTECTED] > Sent: Friday, October 21, 2005 8:27 AM > To: Maven Users List > Subject: Re: [m2] Controlling Bloat > > Yes. First, you can specify exclusions to exclude certain transitive > dependencies from being used. For instance, I depend on > spring-hibernate, but I only use the net.sf.hibernate (hibernate 2) > features, so I don't need Hibernate 3 stuff: > > > springframework > spring-hibernate > 1.2.5 > compile > > > org.hibernate > hibernate-annotations > > > org.hibernate > artifactId>hibernate > > > > > Secondly, the project you depend on could make some of their > dependencies optional so that you don't have to manually exclude them. > As time goes by, more of the pom's in the central repository will get > true set on the correct dependencies. > > -Stephen > > > On 10/21/05, Mark Kuzmycz <[EMAIL PROTECTED]> wrote: > > Transitive dependencies are very useful as it enable you to specify > > the direct dependencies for the project and maven handles the > > dependencies of the dependencies and so on. However, if the product of > > > a project is a war or ear then this can lead to an increased artifact > > size due to the transient dependencies. > > > > For example, if you include jelly or dom4j as a dependency the both of > > > these have a number of dependencies that are optional. That is, they > > are only required if you are using certain functionality (or in the > > case of jelly tags). This can lead to the inclusion of dependencies > > that are not needed by the project. > > > > My question is, how do I control the transient dependencies so that > > the dependencies that are not required the project are not added to > > the war or ear file? Is there a better way than specifying all of the > > dependencies and marking their scope as test? > > > > Regards, > > Mark. > > > > > > ___ > > Siebel > > IT'S ALL ABOUT THE CUSTOMER > > Visit www.siebel.com <http://www.siebel.com> > > > > This e-mail message is for the sole use of the intended recipient(s) > and contains confidential and/or privileged information belonging to > Siebel Systems, Inc. or its customers or partners. Any unauthorized > review, use, copying, disclosure or distribution of this message is > strictly prohibited. If you are not an intended recipient of this > message, please contact the sender by reply e-mail and destroy all soft > and hard copies of the message and any attachments. Thank you for your > cooperation. > > > > > > > -- > Stephen Duncan Jr > www.stephenduncanjr.com <http://www.stephenduncanjr.com> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: [m2] Controlling Bloat
I noticed that comoons-logging-1.0.4 was using instead of true. As a result optional dependencies were being loaded. I see the use of optional and the excludes list being helpful; however, it is a very time consuming process to track down optional dependencies if needed (hence the purpose of transitive dependencies). Is there any plan (in the future) so that maven could work out which optional dependencies are required. A thought: What I have noticed is that there are many modules that have optional dependencies. They are optional because they have functionality or features (within the module) that need them. I was wondering if the POM could list all of the features that the project has and dependencies associated with them. E.g. feature-a ... If a dependenciy is not associated with a feature then it is considered required for the entire module irrespective of the feature. >From a project's perspective it would list the dependencies and stipulate which feature(s) it used. E.g. x feature-a feature-b ... ... If no feature was specified then it is assumed that all features are used and that all dependencies are required and should be included. Any thoughts? I suspect the management of this might be a little challenging ;) . Regards, Mark. -Original Message- From: Stephen Duncan [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 8:27 AM To: Maven Users List Subject: Re: [m2] Controlling Bloat Yes. First, you can specify exclusions to exclude certain transitive dependencies from being used. For instance, I depend on spring-hibernate, but I only use the net.sf.hibernate (hibernate 2) features, so I don't need Hibernate 3 stuff: springframework spring-hibernate 1.2.5 compile org.hibernate hibernate-annotations org.hibernate artifactId>hibernate Secondly, the project you depend on could make some of their dependencies optional so that you don't have to manually exclude them. As time goes by, more of the pom's in the central repository will get true set on the correct dependencies. -Stephen On 10/21/05, Mark Kuzmycz <[EMAIL PROTECTED]> wrote: > Transitive dependencies are very useful as it enable you to specify > the direct dependencies for the project and maven handles the > dependencies of the dependencies and so on. However, if the product of > a project is a war or ear then this can lead to an increased artifact > size due to the transient dependencies. > > For example, if you include jelly or dom4j as a dependency the both of > these have a number of dependencies that are optional. That is, they > are only required if you are using certain functionality (or in the > case of jelly tags). This can lead to the inclusion of dependencies > that are not needed by the project. > > My question is, how do I control the transient dependencies so that > the dependencies that are not required the project are not added to > the war or ear file? Is there a better way than specifying all of the > dependencies and marking their scope as test? > > Regards, > Mark. > > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. > > -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Controlling Bloat
Yes. First, you can specify exclusions to exclude certain transitive dependencies from being used. For instance, I depend on spring-hibernate, but I only use the net.sf.hibernate (hibernate 2) features, so I don't need Hibernate 3 stuff: springframework spring-hibernate 1.2.5 compile org.hibernate hibernate-annotations org.hibernate artifactId>hibernate Secondly, the project you depend on could make some of their dependencies optional so that you don't have to manually exclude them. As time goes by, more of the pom's in the central repository will get true set on the correct dependencies. -Stephen On 10/21/05, Mark Kuzmycz <[EMAIL PROTECTED]> wrote: > Transitive dependencies are very useful as it enable you to specify the > direct dependencies for the project and maven handles the dependencies > of the dependencies and so on. However, if the product of a project is a > war or ear then this can lead to an increased artifact size due to the > transient dependencies. > > For example, if you include jelly or dom4j as a dependency the both of > these have a number of dependencies that are optional. That is, they are > only required if you are using certain functionality (or in the case of > jelly tags). This can lead to the inclusion of dependencies that are not > needed by the project. > > My question is, how do I control the transient dependencies so that the > dependencies that are not required the project are not added to the war > or ear file? Is there a better way than specifying all of the > dependencies and marking their scope as test? > > Regards, > Mark. > > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and > contains confidential and/or privileged information belonging to Siebel > Systems, Inc. or its customers or partners. Any unauthorized review, use, > copying, disclosure or distribution of this message is strictly prohibited. > If you are not an intended recipient of this message, please contact the > sender by reply e-mail and destroy all soft and hard copies of the message > and any attachments. Thank you for your cooperation. > > -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]