FWIW, Sisu tries to maintain compatibility across different versions where
possible - if you find that you can’t use a newer release in place of an older
one then you can always report this (http://www.eclipse.org/sisu/support/) with
the details and any test projects/logs. Also note that sisu-inject-bean/plexus
artifacts from 2.4.x onwards are thin runtime wrappers around the
org.eclipse.sisu.inject/plexus artifacts, mapping the old org.sonatype.guice
API onto the new org.eclipse.sisu API for any clients that used that API
directly instead of via Plexus/JSR330.
For example, if I take a Maven 3.0.5 distribution remove the
sisu-inject-bean/plexus jars and replace them with the latest
org.eclipse.sisu.inject/plexus jars plus javax.inject-1.jar then it still
works. You might be able to do the same with the test classpath to exclude the
old artifacts in favour of the new ones.
That said I would have assumed the maven-plugin-testing-harness would fully
isolate the runtime being tested from the harness so you wouldn’t need to do
this.
PS. which plugin are you migrating?
On Thursday, 7 January 2016 at 12:40, Tibor Digana wrote:
> I am migrating plugin to 3.0.0 and I have a problem with a test
> because it fails due to maven-plugin-testing-harness:3.0.0 cannot call a
> method:
> setClassPathScanning(Ljava/lang/String;)Lorg/codehaus/plexus/ContainerConfiguration;
>
> In maven-plugin-testing-harness' code the method setClassPathScanning() is
> called with String parameter but boolean is expected.
>
> protected ContainerConfiguration setupContainerConfiguration()
> {
> ClassWorld classWorld = new ClassWorld( "plexus.core",
> Thread.currentThread().getContextClassLoader() );
>
> ContainerConfiguration cc = new DefaultContainerConfiguration()
> .setClassWorld( classWorld )
> .setClassPathScanning( PlexusConstants.SCANNING_INDEX )
> .setAutoWiring( true )
> .setName( "maven" );
>
> return cc;
> }
>
> The versions are chaotic now because
> maven-plugin-testing-harness:3.0.0
> is dependent on
> maven-core:3.1.1
> with sisu-inject-plexus other than 1.4.2.
>
> But maven-core:3.0.0 needs to have sisu-inject-plexus:1.4.2
>
> How should I solve this?
> I tried to upgrade to maven-core:3.1.0 but got another problem.
>
> Should we use Takari IT framework? It will cost me more time to rework all
> tests.
>
> --
> Cheers
> Tibor
>
>