Good tip! Thanks for that.

2009/10/16 Nick Stolwijk <nick.stolw...@gmail.com>

> And if you stop using the spring uberjar, you can also use the enforcer
> plugin to keep it away.
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-enforcer-plugin</artifactId>
>                <executions>
>                    <execution>
>                        <id>enforce rules</id>
>                        <goals>
>                            <goal>enforce</goal>
>                        </goals>
>                        <configuration>
>                            <rules>
>                                <bannedDependencies>
>
> <searchTransitive>true</searchTransitive>
>                                    <excludes>
>
> <exclude>org.springframework:spring</exclude>
>                                    </excludes>
>                                </bannedDependencies>
>                            </rules>
>                            <fail>true</fail>
>                        </configuration>
>                    </execution>
>                </executions>
>            </plugin>
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
>
>
> On Tue, Oct 13, 2009 at 7:35 PM, Jamie Whitehouse <
> basil.whiteho...@genesyslab.com> wrote:
>
> > I don't, but Wim Deblauwe does who originally asked the question.  My
> > suggestion was aside from what he required in their own builds, to also
> > define dependencies for each of the Spring components at the same version
> > that they need to reduce the different Spring versions.
> >
> > There's a Maven feature request to allow setting of versions at a groupid
> > level which would be useful in this case.
> >
> > -----Original Message-----
> > From: Quintin Beukes [mailto:quin...@skywalk.co.za]
> > Sent: Tuesday, October 13, 2009 1:08 PM
> > To: Maven Users List
> > Subject: Re: How to avoid multiple spring versions?
> >
> > I see. That's not good at all. There is no way to "provide"
> > dependencies which have a different artifact id.
> >
> > Any reason why you depend on this one?
> >
> > Quintin Beukes
> >
> >
> >
> > On Tue, Oct 13, 2009 at 6:58 PM, Jamie Whitehouse <
> > basil.whiteho...@genesyslab.com> wrote:
> > > The Spring project produces a complete spring artifact and component
> > artifacts.  For projects that use most or all of the components it's
> > sometimes easier to use the former artifact.
> > >
> > > -----Original Message-----
> > > From: Quintin Beukes [mailto:quin...@skywalk.co.za]
> > > Sent: Tuesday, October 13, 2009 10:33 AM
> > > To: Maven Users List
> > > Subject: Re: How to avoid multiple spring versions?
> > >
> > > How did you create the following artifact?
> > >>> >            <dependency>
> > >>> >                <groupId>org.springframework</groupId>
> > >>> >                <artifactId>spring</artifactId>
> > >>> >                <version>2.5.6</version>
> > >>> >            </dependency>
> > >
> > > If it's from your own pom, how about changing the POM and make it again
> > reference the actual spring dependencies from "
> > http://repo1.maven.org/maven2"; instead of including your OWN jars?
> > >      <dependency>
> > >          <groupId>org.springframework</groupId>
> > >          <artifactId>spring-core</artifactId>
> > >          <version>2.5.6</version>
> > >          <type>jar</type>
> > >      </dependency>
> > >      <dependency>
> > >          <groupId>org.springframework</groupId>
> > >          <artifactId>spring-beans</artifactId>
> > >          <version>2.5.6</version>
> > >          <type>jar</type>
> > >      </dependency>
> > >      <dependency>
> > >          <groupId>org.springframework</groupId>
> > >          <artifactId>spring-context</artifactId>
> > >          <version>2.5.6</version>
> > >          <type>jar</type>
> > >      </dependency>
> > >
> > > Then other people using these dependencies will match up with yours,
> and
> > you will not have to change all your projects to reference these (since
> you
> > just keep referencing the POM which references these).
> > >
> > > Quintin Beukes
> > >
> > >
> > >
> > > On Tue, Oct 13, 2009 at 4:17 PM, Jamie Whitehouse <
> > basil.whiteho...@genesyslab.com> wrote:
> > >> So you need to define a dependency for each one of these individual
> > >> spring artifacts in your build in order to override the version.
> > >>
> > >> -----Original Message-----
> > >> From: Wim Deblauwe [mailto:wim.debla...@gmail.com]
> > >> Sent: Monday, October 12, 2009 5:11 AM
> > >> To: Maven Users List; jeffma...@jeffmaury.com
> > >> Subject: Re: How to avoid multiple spring versions?
> > >>
> > >> I know, but in this case, the artifactId is not exactly the same. We
> > >> use 'spring' which includes everything and others might use
> > >> 'spring-core' or 'spring-beans' or things like that.
> > >>
> > >> regards,
> > >>
> > >> Wim
> > >>
> > >> 2009/10/12 Jeff MAURY <jeffma...@gmail.com>
> > >>
> > >>> This is normally handled by Maven.
> > >>> If you pom has a dependency on spring 2.5.6 and another dependency
> > >>> that has a dependency on Spring 2.5.5, the Maven will use Spring
> > >>> 2.5.6
> > >>
> > >>> when building your pom.
> > >>>
> > >>> Jeff MAURY
> > >>>
> > >>> On Mon, Oct 12, 2009 at 10:35 AM, Wim Deblauwe
> > >>> <wim.debla...@gmail.com
> > >>> >wrote:
> > >>>
> > >>> > Hi,
> > >>> >
> > >>> > we are using the spring framework ourselves and use the following
> > >>> > dependency:
> > >>> >
> > >>> >            <dependency>
> > >>> >                <groupId>org.springframework</groupId>
> > >>> >                <artifactId>spring</artifactId>
> > >>> >                <version>2.5.6</version>
> > >>> >            </dependency>
> > >>> >
> > >>> > Some of our dependencies also depend on the spring framework, but
> > >>> > not the same version:
> > >>> >
> > >>> > [INFO] +- org.apache.activemq:activemq-pool:jar:5.2.0:compile
> > >>> > [INFO] |  +-
> > >>> > org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compi
> > >>> > l e [INFO] |  +- commons-pool:commons-pool:jar:1.4:compile
> > >>> > [INFO] |  \- org.springframework:spring-beans:jar:2.5.5:compile
> > >>> > [INFO] |     \- org.springframework:spring-core:jar:2.5.5:compile
> > >>> >
> > >>> > Probably maven does not know it should not include
> > >>> > spring-beans:2.5.5 and
> > >>> > spring-core:2.5.5 because I already have the 2.5.6 of the spring
> > >>> framework.
> > >>> > Is there a way to avoid this? Excludes on activemq or is there a
> > >>> > better way?
> > >>> >
> > >>> > regards,
> > >>> >
> > >>> > Wim
> > >>> >
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> http://www.jeffmaury.com
> > >>> http://riadiscuss.jeffmaury.com
> > >>> http://www.lastfm.fr/listen/user/jeffmaury/personal
> > >>>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> -
> > >> ---------------------------------------------
> > >> CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
> > confidential and proprietary information of Alcatel-Lucent and/or its
> > affiliated entities. Access by the intended recipient only is authorized.
> > Any liability arising from any party acting, or refraining from acting,
> on
> > any information contained in this e-mail is hereby excluded. If you are
> not
> > the intended recipient, please notify the sender immediately, destroy the
> > original transmission and its attachments and do not disclose the
> contents
> > to any other person, use it for any purpose, or store or copy the
> > information in any medium. Copyright in this e-mail and any attachments
> > belongs to Alcatel-Lucent and/or its affiliated entities.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > >> For additional commands, e-mail: users-h...@maven.apache.org
> > >>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > > For additional commands, e-mail: users-h...@maven.apache.org
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > ---------------------------------------------
> > > CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
> > confidential and proprietary information of Alcatel-Lucent and/or its
> > affiliated entities. Access by the intended recipient only is authorized.
> > Any liability arising from any party acting, or refraining from acting,
> on
> > any information contained in this e-mail is hereby excluded. If you are
> not
> > the intended recipient, please notify the sender immediately, destroy the
> > original transmission and its attachments and do not disclose the
> contents
> > to any other person, use it for any purpose, or store or copy the
> > information in any medium. Copyright in this e-mail and any attachments
> > belongs to Alcatel-Lucent and/or its affiliated entities.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > > For additional commands, e-mail: users-h...@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
> >
> >
> >
> -------------------------------------------------------------------------------------------------------------------
> > CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
> > confidential and proprietary information of Alcatel-Lucent and/or its
> > affiliated entities. Access by the intended recipient only is authorized.
> > Any liability arising from any party acting, or refraining from acting,
> on
> > any information contained in this e-mail is hereby excluded. If you are
> not
> > the intended recipient, please notify the sender immediately, destroy the
> > original transmission and its attachments and do not disclose the
> contents
> > to any other person, use it for any purpose, or store or copy the
> > information in any medium. Copyright in this e-mail and any attachments
> > belongs to Alcatel-Lucent and/or its affiliated entities.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>

Reply via email to