maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: Could not initialize class org.sonatype.guice.bean.reflect.Logs
Date Wed, 29 May 2013 13:33:45 GMT
Hi Stuart! :)

thanks a lot for jumping in the discussion, very appreciated! :)

>
> Maven3 never exposed those packages from the core and the individual guice-bean/plexus-*
jars were never used in Maven3, only the final sisu-inject-bean/plexus aggregate jars.
>
> If you've added your own dependencies to guice-bean/plexus-* jars then this is likely
the cause of the conflict because they'll be implementing the same API as the aggregate jars.
>

Nope I didn't add any guice-bean* dependency manually, they are all
inherited by maven-core as transitive dependencies. The only plexus-*
dependency I added is org.codehaus.plexus:plexus-utils:3.0.1

> Do you have a link to your test project? If you remove all guice-bean/plexus-* dependencies
then you'll probably find it works.
>

Nope, unfortunately, it is not an OSS project :( I hope that the
POM[1] only can help you to understand where the mistake is...

> In Eclipse/Sisu I've collapsed these interim jars because while they could technically
be re-used individually it was actually simpler (and smaller) to keep them in the same bundle.
>

I am maybe off-topic here, but what do you think about the approach we
adopted in Onami, where we distribute small modules AND the collapsed
jar?

Many thanks for your help and have a nice day!
All the best,
-Simo

[1] https://gist.github.com/simonetripodi/5670183

http://people.apache.org/~simonetripodi/
http://twitter.com/simonetripodi


On Wed, May 29, 2013 at 12:05 PM, Stuart McCulloch <mcculls@gmail.com> wrote:
> On 29 May 2013, at 10:49, Simone Tripodi wrote:
>
>> Hi all mates,
>>
>> I am updating a set of old Maven plugins using Mvn3+Aether APIs, but
>> unfortunately I am no longer able to run Mvn tests due to
>> org.sonatype.guice.bean.reflect.Logs class cannot be found in the
>> classpath, follows below the (almost) complete stacktrace (what is
>> missing is just the test class - it is not an OSS project).
>>
>> All guice-bean* dependencies are included in the project, included the
>> guice-bean-reflect-2.3.0 that contains the missing class.
>>
>> Do you know why I get that error?
>
> Maven3 never exposed those packages from the core and the individual guice-bean/plexus-*
jars were never used in Maven3, only the final sisu-inject-bean/plexus aggregate jars.
>
> If you've added your own dependencies to guice-bean/plexus-* jars then this is likely
the cause of the conflict because they'll be implementing the same API as the aggregate jars.
>
> Do you have a link to your test project? If you remove all guice-bean/plexus-* dependencies
then you'll probably find it works.
>
> In Eclipse/Sisu I've collapsed these interim jars because while they could technically
be re-used individually it was actually simpler (and smaller) to keep them in the same bundle.
>
>> Any hint would be much more than appreciated!
>> Many thanks in advance, all the best!
>> -Simo
>>
>> java.lang.NoClassDefFoundError: Could not initialize class
>> org.sonatype.guice.bean.reflect.Logs
>>       at org.sonatype.guice.plexus.scanners.PlexusTypeRegistry.loadRole(PlexusTypeRegistry.java:194)
>>       at org.sonatype.guice.plexus.scanners.PlexusTypeRegistry.addComponent(PlexusTypeRegistry.java:110)
>>       at org.sonatype.guice.plexus.scanners.PlexusXmlScanner.parseComponent(PlexusXmlScanner.java:329)
>>       at org.sonatype.guice.plexus.scanners.PlexusXmlScanner.parseComponentsXml(PlexusXmlScanner.java:198)
>>       at org.sonatype.guice.plexus.scanners.PlexusXmlScanner.scan(PlexusXmlScanner.java:94)
>>       at org.sonatype.guice.plexus.binders.PlexusXmlBeanModule.configure(PlexusXmlBeanModule.java:89)
>>       at org.sonatype.guice.plexus.binders.PlexusBindingModule.configure(PlexusBindingModule.java:62)
>>       at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
>>       at com.google.inject.spi.Elements.getElements(Elements.java:103)
>>       at com.google.inject.spi.Elements.getElements(Elements.java:80)
>>       at org.sonatype.guice.bean.binders.MergedModule.configure(MergedModule.java:54)
>>       at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
>>       at com.google.inject.spi.Elements.getElements(Elements.java:103)
>>       at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
>>       at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
>>       at com.google.inject.Guice.createInjector(Guice.java:94)
>>       at com.google.inject.Guice.createInjector(Guice.java:71)
>>       at com.google.inject.Guice.createInjector(Guice.java:61)
>>       at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)
>>       at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:196)
>>       at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:160)
>>       at org.apache.maven.plugin.testing.AbstractMojoTestCase.setupContainer(AbstractMojoTestCase.java:159)
>>       at org.apache.maven.plugin.testing.AbstractMojoTestCase.getContainer(AbstractMojoTestCase.java:179)
>>       at org.apache.maven.plugin.testing.AbstractMojoTestCase.setUp(AbstractMojoTestCase.java:107)
>>
>> http://people.apache.org/~simonetripodi/
>> http://twitter.com/simonetripodi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message