[logback-dev] Expanding version99 repository

Robert Elliot rob at lidalia.org.uk
Fri Aug 3 14:26:55 CEST 2012


I just found this github thread:
https://github.com/KentBeck/junit/issues/332
and this merged pull request:
https://github.com/KentBeck/junit/pull/421

so it looks like the JUnit guys have fixed this for 4.11 anyway, which will hopefully be released soon.  So ignore this idea!  Sorry for not googling hard enough before.

Rob

----- Original Message -----
> From: "Robert Elliot" <rob at lidalia.org.uk>
> To: "logback developers list" <logback-dev at qos.ch>
> Sent: Friday, 3 August, 2012 1:20:59 PM
> Subject: Re: [logback-dev] Expanding version99 repository
> > > For
> > > example, if you want to use hamcrest 1.3 with junit 4.10 you can
> > > do
> > > so
> > > by bringing in junit:junit-dep:4.10 and
> > > org.hamcrest:hamcrest-core:1.3; however, it only requires one
> > > transitive dependency to bring in junit:junit:4.7 (which combines
> > > the
> > > classes from junit:junit-dep:4.7 and
> > > org.hamcrest:hamcrest-core:1.2)
> > > and it's going to be random whether you get the 4.10 or the 4.7
> > > versions of the junit classes and the 1.2 or 1.3 versions of the
> > > hamcrest classes.
> >
> > While I understand what you are trying to explain I don't see how it
> > matches what is effectively found in junit jar files. For example,
> > both junit:junit:4.7 and 4.10 contain classes from the org.hamcrest
> > package. What am I missing?
> >
> 
> There are three artifacts in Maven, and as far as Maven is concerned
> they are unconnected, so they can coexist on the same classpath:
> org.hamcrest:hamcrest-core // Contains just the Hamcrest core classes
> junit:junit-dep // Contains just the JUnit classes with no Hamcrest
> ones
> junit:junit // Contains both the JUnit and the Hamcrest core classes
> 
> If, thanks to transitive dependencies, you end up with both
> junit:junit:4.7 and junit:junit-dep:4.10 on the classpath, with
> different versions, there will be different versions of the same
> org.junit classes on the classpath, with no guaranteed as to which
> will be loaded.
> 
> The same holds true if you have org.hamcrest:hamcrest-core:1.3 and
> junit:junit:4.10 on the classpath - different versions of the same
> org.hamcrest classes on the same classpath, with no guaranteed as to
> which will be loaded.
> _______________________________________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-dev


More information about the logback-dev mailing list