You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by James Carman <ja...@carmanconsulting.com> on 2010/05/01 19:06:20 UTC

SLF4J Dependency...

Can we move the SLF4J dependency from the parent pom.xml file to the
wicket module's pom.xml file?  Since it's in the root, I have to do
excludes for each submodule from wicket (extensions, datetime, etc.)
to tell maven not to use the version of SLF4J that they specify.  If
we put it in wicket's pom.xml file, then each submodule would inherit
the dependency from wicket, because they all depend on wicket.

Re: SLF4J Dependency...

Posted by James Carman <jc...@carmanconsulting.com>.
I think it had something to do with when I tried my project with the
new version of hibernate in the mix.  If I had my webapp module which
depends on my "impl" module which depends on hibernate (which has
slf4j dependencies), then I had to use excludes in my webapp's pom.xml
file to exclude the slf4j versions.  My webapp would declare a certain
version of slf4j, but for some reason, the version that hibernate
specified was showing up, too.  Right now, I had to drop back to the
earlier version of hibernate for other reasons, so I don't have the
example situation anymore.

On Sun, May 2, 2010 at 1:29 AM, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> At first I thought we could possibly use the <scope>provided</scope> for
> this.
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
>
> <http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope>But,
> I guess that would probably be a worse practice - because it forces the user
> to provide it.  James, I just don't see a non-hack way around it.  What
> exactly is your usecase?  You are using a different version?  Newer or older
> than Wicket's?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Sat, May 1, 2010 at 8:56 PM, James Carman
> <jc...@carmanconsulting.com>wrote:
>
>> I guess I see your point (to a point), but it is a pain to have to
>> exclude it wherever I reference a Wicket submodule.  I don't know how
>> it came up, but I had to add an exclusion to each one of them in my
>> application to avoid having duplicate copies of slf4j-api.jar on my
>> classpath.  It was pretty annoying.
>>
>> On Sat, May 1, 2010 at 4:24 PM, Igor Vaynberg <ig...@gmail.com>
>> wrote:
>> > but each submodule does have a direct dependency on slf4j so it should
>> > not depend on the wicket module to provide it transiently - that would
>> > be a hack.
>> >
>> > -igor
>> >
>> > On Sat, May 1, 2010 at 10:06 AM, James Carman
>> > <ja...@carmanconsulting.com> wrote:
>> >> Can we move the SLF4J dependency from the parent pom.xml file to the
>> >> wicket module's pom.xml file?  Since it's in the root, I have to do
>> >> excludes for each submodule from wicket (extensions, datetime, etc.)
>> >> to tell maven not to use the version of SLF4J that they specify.  If
>> >> we put it in wicket's pom.xml file, then each submodule would inherit
>> >> the dependency from wicket, because they all depend on wicket.
>> >>
>> >
>>
>

Re: SLF4J Dependency...

Posted by Martijn Dashorst <ma...@gmail.com>.
With a dependency management section you can fix the SLF4J api version
to the one of your liking. No duplicates then.

Martijn

On Sun, May 2, 2010 at 7:29 AM, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> At first I thought we could possibly use the <scope>provided</scope> for
> this.
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
>
> <http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope>But,
> I guess that would probably be a worse practice - because it forces the user
> to provide it.  James, I just don't see a non-hack way around it.  What
> exactly is your usecase?  You are using a different version?  Newer or older
> than Wicket's?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Sat, May 1, 2010 at 8:56 PM, James Carman
> <jc...@carmanconsulting.com>wrote:
>
>> I guess I see your point (to a point), but it is a pain to have to
>> exclude it wherever I reference a Wicket submodule.  I don't know how
>> it came up, but I had to add an exclusion to each one of them in my
>> application to avoid having duplicate copies of slf4j-api.jar on my
>> classpath.  It was pretty annoying.
>>
>> On Sat, May 1, 2010 at 4:24 PM, Igor Vaynberg <ig...@gmail.com>
>> wrote:
>> > but each submodule does have a direct dependency on slf4j so it should
>> > not depend on the wicket module to provide it transiently - that would
>> > be a hack.
>> >
>> > -igor
>> >
>> > On Sat, May 1, 2010 at 10:06 AM, James Carman
>> > <ja...@carmanconsulting.com> wrote:
>> >> Can we move the SLF4J dependency from the parent pom.xml file to the
>> >> wicket module's pom.xml file?  Since it's in the root, I have to do
>> >> excludes for each submodule from wicket (extensions, datetime, etc.)
>> >> to tell maven not to use the version of SLF4J that they specify.  If
>> >> we put it in wicket's pom.xml file, then each submodule would inherit
>> >> the dependency from wicket, because they all depend on wicket.
>> >>
>> >
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.7

Re: SLF4J Dependency...

Posted by Jeremy Thomerson <je...@wickettraining.com>.
At first I thought we could possibly use the <scope>provided</scope> for
this.
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

<http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope>But,
I guess that would probably be a worse practice - because it forces the user
to provide it.  James, I just don't see a non-hack way around it.  What
exactly is your usecase?  You are using a different version?  Newer or older
than Wicket's?

--
Jeremy Thomerson
http://www.wickettraining.com



On Sat, May 1, 2010 at 8:56 PM, James Carman
<jc...@carmanconsulting.com>wrote:

> I guess I see your point (to a point), but it is a pain to have to
> exclude it wherever I reference a Wicket submodule.  I don't know how
> it came up, but I had to add an exclusion to each one of them in my
> application to avoid having duplicate copies of slf4j-api.jar on my
> classpath.  It was pretty annoying.
>
> On Sat, May 1, 2010 at 4:24 PM, Igor Vaynberg <ig...@gmail.com>
> wrote:
> > but each submodule does have a direct dependency on slf4j so it should
> > not depend on the wicket module to provide it transiently - that would
> > be a hack.
> >
> > -igor
> >
> > On Sat, May 1, 2010 at 10:06 AM, James Carman
> > <ja...@carmanconsulting.com> wrote:
> >> Can we move the SLF4J dependency from the parent pom.xml file to the
> >> wicket module's pom.xml file?  Since it's in the root, I have to do
> >> excludes for each submodule from wicket (extensions, datetime, etc.)
> >> to tell maven not to use the version of SLF4J that they specify.  If
> >> we put it in wicket's pom.xml file, then each submodule would inherit
> >> the dependency from wicket, because they all depend on wicket.
> >>
> >
>

Re: SLF4J Dependency...

Posted by James Carman <jc...@carmanconsulting.com>.
I guess I see your point (to a point), but it is a pain to have to
exclude it wherever I reference a Wicket submodule.  I don't know how
it came up, but I had to add an exclusion to each one of them in my
application to avoid having duplicate copies of slf4j-api.jar on my
classpath.  It was pretty annoying.

On Sat, May 1, 2010 at 4:24 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> but each submodule does have a direct dependency on slf4j so it should
> not depend on the wicket module to provide it transiently - that would
> be a hack.
>
> -igor
>
> On Sat, May 1, 2010 at 10:06 AM, James Carman
> <ja...@carmanconsulting.com> wrote:
>> Can we move the SLF4J dependency from the parent pom.xml file to the
>> wicket module's pom.xml file?  Since it's in the root, I have to do
>> excludes for each submodule from wicket (extensions, datetime, etc.)
>> to tell maven not to use the version of SLF4J that they specify.  If
>> we put it in wicket's pom.xml file, then each submodule would inherit
>> the dependency from wicket, because they all depend on wicket.
>>
>

Re: SLF4J Dependency...

Posted by Igor Vaynberg <ig...@gmail.com>.
but each submodule does have a direct dependency on slf4j so it should
not depend on the wicket module to provide it transiently - that would
be a hack.

-igor

On Sat, May 1, 2010 at 10:06 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Can we move the SLF4J dependency from the parent pom.xml file to the
> wicket module's pom.xml file?  Since it's in the root, I have to do
> excludes for each submodule from wicket (extensions, datetime, etc.)
> to tell maven not to use the version of SLF4J that they specify.  If
> we put it in wicket's pom.xml file, then each submodule would inherit
> the dependency from wicket, because they all depend on wicket.
>

Re: SLF4J Dependency...

Posted by James Carman <jc...@carmanconsulting.com>.
Ok, cool.  I'll try that.

On Tue, May 4, 2010 at 6:16 PM, Rodolfo Hansen <kr...@gmail.com> wrote:
> place it in DependencyManagement
>
> this will force all dependencies to use your version.
>
> On Tue, May 4, 2010 at 11:49 AM, James Carman
> <jc...@carmanconsulting.com>wrote:
>
>> I added my own.
>>
>> On Tue, May 4, 2010 at 11:48 AM, Jeremy Thomerson
>> <je...@wickettraining.com> wrote:
>> > Did you actually add an explicit dependency on a newer version, or is
>> this
>> > just that Wicket and Hibernate both had dependencies, but on different
>> > versions?
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Tue, May 4, 2010 at 7:53 AM, James Carman
>> > <jc...@carmanconsulting.com>wrote:
>> >
>> >> I don't know.  That's the weird thing!  I use Maven regularly and
>> >> usually if it sees that you specify a newer version of a library than
>> >> one of your dependencies declares, it will use that version.  But,
>> >> with that new Hibernate stuff, I saw two different versions showing up
>> >> on my classpath if I didn't do exclusions.  Very weird indeed.  I
>> >> haven't looked at the hibernate poms to see if they're doing something
>> >> different now or not.  Again, I had to back out the hibernate stuff
>> >> for other reasons, so I don't have the environment set up right now to
>> >> investigate further, but perhaps I can try it on one of my "pet"
>> >> projects.
>> >>
>> >> On Tue, May 4, 2010 at 7:17 AM, Max Bowsher <ma...@mxtelecom.com> wrote:
>> >> > On 01/05/10 18:06, James Carman wrote:
>> >> >> Can we move the SLF4J dependency from the parent pom.xml file to the
>> >> >> wicket module's pom.xml file?  Since it's in the root, I have to do
>> >> >> excludes for each submodule from wicket (extensions, datetime, etc.)
>> >> >> to tell maven not to use the version of SLF4J that they specify.
>> >> >
>> >> > Why do you need to use an exclusion, instead of merely telling Maven
>> >> > which version you actually want to use?
>> >> >
>> >> > Max.
>> >> >
>> >>
>> >
>>
>
>
>
> --
> Rodolfo Hansen
> CTO, KindleIT Software Development
> Email: rhansen@kitsd.com
> Mobile: +1 (809) 860-6669
>

Re: SLF4J Dependency...

Posted by Rodolfo Hansen <kr...@gmail.com>.
place it in DependencyManagement

this will force all dependencies to use your version.

On Tue, May 4, 2010 at 11:49 AM, James Carman
<jc...@carmanconsulting.com>wrote:

> I added my own.
>
> On Tue, May 4, 2010 at 11:48 AM, Jeremy Thomerson
> <je...@wickettraining.com> wrote:
> > Did you actually add an explicit dependency on a newer version, or is
> this
> > just that Wicket and Hibernate both had dependencies, but on different
> > versions?
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Tue, May 4, 2010 at 7:53 AM, James Carman
> > <jc...@carmanconsulting.com>wrote:
> >
> >> I don't know.  That's the weird thing!  I use Maven regularly and
> >> usually if it sees that you specify a newer version of a library than
> >> one of your dependencies declares, it will use that version.  But,
> >> with that new Hibernate stuff, I saw two different versions showing up
> >> on my classpath if I didn't do exclusions.  Very weird indeed.  I
> >> haven't looked at the hibernate poms to see if they're doing something
> >> different now or not.  Again, I had to back out the hibernate stuff
> >> for other reasons, so I don't have the environment set up right now to
> >> investigate further, but perhaps I can try it on one of my "pet"
> >> projects.
> >>
> >> On Tue, May 4, 2010 at 7:17 AM, Max Bowsher <ma...@mxtelecom.com> wrote:
> >> > On 01/05/10 18:06, James Carman wrote:
> >> >> Can we move the SLF4J dependency from the parent pom.xml file to the
> >> >> wicket module's pom.xml file?  Since it's in the root, I have to do
> >> >> excludes for each submodule from wicket (extensions, datetime, etc.)
> >> >> to tell maven not to use the version of SLF4J that they specify.
> >> >
> >> > Why do you need to use an exclusion, instead of merely telling Maven
> >> > which version you actually want to use?
> >> >
> >> > Max.
> >> >
> >>
> >
>



-- 
Rodolfo Hansen
CTO, KindleIT Software Development
Email: rhansen@kitsd.com
Mobile: +1 (809) 860-6669

Re: SLF4J Dependency...

Posted by James Carman <jc...@carmanconsulting.com>.
I added my own.

On Tue, May 4, 2010 at 11:48 AM, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> Did you actually add an explicit dependency on a newer version, or is this
> just that Wicket and Hibernate both had dependencies, but on different
> versions?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Tue, May 4, 2010 at 7:53 AM, James Carman
> <jc...@carmanconsulting.com>wrote:
>
>> I don't know.  That's the weird thing!  I use Maven regularly and
>> usually if it sees that you specify a newer version of a library than
>> one of your dependencies declares, it will use that version.  But,
>> with that new Hibernate stuff, I saw two different versions showing up
>> on my classpath if I didn't do exclusions.  Very weird indeed.  I
>> haven't looked at the hibernate poms to see if they're doing something
>> different now or not.  Again, I had to back out the hibernate stuff
>> for other reasons, so I don't have the environment set up right now to
>> investigate further, but perhaps I can try it on one of my "pet"
>> projects.
>>
>> On Tue, May 4, 2010 at 7:17 AM, Max Bowsher <ma...@mxtelecom.com> wrote:
>> > On 01/05/10 18:06, James Carman wrote:
>> >> Can we move the SLF4J dependency from the parent pom.xml file to the
>> >> wicket module's pom.xml file?  Since it's in the root, I have to do
>> >> excludes for each submodule from wicket (extensions, datetime, etc.)
>> >> to tell maven not to use the version of SLF4J that they specify.
>> >
>> > Why do you need to use an exclusion, instead of merely telling Maven
>> > which version you actually want to use?
>> >
>> > Max.
>> >
>>
>

Re: SLF4J Dependency...

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Did you actually add an explicit dependency on a newer version, or is this
just that Wicket and Hibernate both had dependencies, but on different
versions?

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 7:53 AM, James Carman
<jc...@carmanconsulting.com>wrote:

> I don't know.  That's the weird thing!  I use Maven regularly and
> usually if it sees that you specify a newer version of a library than
> one of your dependencies declares, it will use that version.  But,
> with that new Hibernate stuff, I saw two different versions showing up
> on my classpath if I didn't do exclusions.  Very weird indeed.  I
> haven't looked at the hibernate poms to see if they're doing something
> different now or not.  Again, I had to back out the hibernate stuff
> for other reasons, so I don't have the environment set up right now to
> investigate further, but perhaps I can try it on one of my "pet"
> projects.
>
> On Tue, May 4, 2010 at 7:17 AM, Max Bowsher <ma...@mxtelecom.com> wrote:
> > On 01/05/10 18:06, James Carman wrote:
> >> Can we move the SLF4J dependency from the parent pom.xml file to the
> >> wicket module's pom.xml file?  Since it's in the root, I have to do
> >> excludes for each submodule from wicket (extensions, datetime, etc.)
> >> to tell maven not to use the version of SLF4J that they specify.
> >
> > Why do you need to use an exclusion, instead of merely telling Maven
> > which version you actually want to use?
> >
> > Max.
> >
>

Re: SLF4J Dependency...

Posted by James Carman <jc...@carmanconsulting.com>.
I don't know.  That's the weird thing!  I use Maven regularly and
usually if it sees that you specify a newer version of a library than
one of your dependencies declares, it will use that version.  But,
with that new Hibernate stuff, I saw two different versions showing up
on my classpath if I didn't do exclusions.  Very weird indeed.  I
haven't looked at the hibernate poms to see if they're doing something
different now or not.  Again, I had to back out the hibernate stuff
for other reasons, so I don't have the environment set up right now to
investigate further, but perhaps I can try it on one of my "pet"
projects.

On Tue, May 4, 2010 at 7:17 AM, Max Bowsher <ma...@mxtelecom.com> wrote:
> On 01/05/10 18:06, James Carman wrote:
>> Can we move the SLF4J dependency from the parent pom.xml file to the
>> wicket module's pom.xml file?  Since it's in the root, I have to do
>> excludes for each submodule from wicket (extensions, datetime, etc.)
>> to tell maven not to use the version of SLF4J that they specify.
>
> Why do you need to use an exclusion, instead of merely telling Maven
> which version you actually want to use?
>
> Max.
>

Re: SLF4J Dependency...

Posted by Max Bowsher <ma...@mxtelecom.com>.
On 01/05/10 18:06, James Carman wrote:
> Can we move the SLF4J dependency from the parent pom.xml file to the
> wicket module's pom.xml file?  Since it's in the root, I have to do
> excludes for each submodule from wicket (extensions, datetime, etc.)
> to tell maven not to use the version of SLF4J that they specify.

Why do you need to use an exclusion, instead of merely telling Maven
which version you actually want to use?

Max.