RE: [picocontainer-dev] build weirdness...

Jörg Schaible <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Konstantin Priblouda wrote:
> --- Jörg Schaible <[email protected]>
> wrote:
> 
>> Hehehe ... :)
>> 
>> But that's not really the point. We don't access
>> normally SNAPSHOT repos here and therefore there's
>> no access to the central SNAPSHOT repo (mirrored in
>> settings.xml). The question is: How could Pico ever
>> be released with anything requiring a SNAPSHOT? This
>> makes the complete release unreproducable.
> 
> It could be some plugin weirdness - that's why I'm
> asking
> for debug output ;)
> regards,

OK, coming closer. Problem ist that the resources plugin is downloaded from the configured apache snapshot repo, since it has not been entgered with a fixed version in the pluginManagement section. Same apply for the install plugin. Added to master POM now.

BTW: Did I already mention that Maven folks highly discourage to add repositories to your POM? ;-)

Nonetheless, still no cigar. Now the paranamer plugin fails after all tests already did succeed:

[INFO] [paranamer:generate {execution: generate}]
[DEBUG] Generating parameter names from src/test to target/test-classes
[DEBUG] org.picocontainer:picocontainer:jar:2.1-SNAPSHOT (selected for null)
[DEBUG]   com.thoughtworks.paranamer:paranamer:jar:1.1:compile (selected for compile)
[DEBUG]   com.thoughtworks.xstream:xstream:jar:1.2.2:test (selected for test)
[DEBUG]     xpp3:xpp3_min:jar:1.1.3.4.O:test (selected for test)
[DEBUG]   org.jmock:jmock-junit4:jar:2.4.0:test (selected for test)
[DEBUG]     org.jmock:jmock:jar:2.4.0:test (selected for test)
[DEBUG]       org.hamcrest:hamcrest-core:jar:1.1:test (selected for test)
[DEBUG]       org.hamcrest:hamcrest-library:jar:1.1:test (selected for test)
[DEBUG]     junit:junit-dep:jar:4.4:test (selected for test)
[DEBUG]   xpp3:xpp3_min:jar:1.1.3.4.O:test (selected for test)
[DEBUG] org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.2:runtime (selected for runtime)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.1:runtime (selected for runtime)
-----------------------------------------------------
this realm = app0.child-container[org.apache.maven.plugins:maven-jar-plugin]
urls[0] = file:/d:/repository/m2/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar
urls[1] = file:/d:/repository/m2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of imports: 6
import: org.codehaus.classworlds.Entry@4891bb28
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@c51bc9e7
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/c:/Programme/Apache Software Foundation/Maven 2.0.8/lib/maven-core-2.0.8-SNAPSHOT-uber.jar
Number of imports: 6
import: org.codehaus.classworlds.Entry@4891bb28
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@c51bc9e7
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar': Unable to find the mojo 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin'
org/apache/maven/archiver/MavenArchiveConfiguration
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar': Unable to find the mojo 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin'
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:543)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginManagerException: Unable to find the mojo 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin'
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:575)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:425)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-jar-plugin:2.2:jar', it could not be created
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:566)
        ... 18 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component: role: 'null', implementation: 'org.apache.maven.plugin.jar.JarMojo'
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
        at org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:48)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 20 more
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/archiver/MavenArchiveConfiguration
        at org.apache.maven.plugin.jar.AbstractJarMojo.<init>(AbstractJarMojo.java:102)
        at org.apache.maven.plugin.jar.JarMojo.<init>(JarMojo.java:34)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
        ... 24 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22 seconds
[INFO] Finished at: Mon Jan 28 13:09:33 CET 2008
[INFO] Final Memory: 8M/15M
[INFO] ------------------------------------------------------------------------


Tried with M208 and M207. M205 fails because some plugins are already incompatible (e.g. jar plugin).


...


I noticed, that the POM for the jar-plugin could not be downloaded. I commented out then all of those repository and pluginRepository declarations ... et voilá. The build succeeds. So, the recommendation of the Maven folks should be considered serioulsy...

I've checked in now a POM with the necessary mofigications, that allowed me to build Pico again. Mauro, take  look.

BTW: IMHO the dep to paranamer in pico core is wrong. It should be declared as provided, since the shade-plugin will hide all the classes afterwards and it is no longer directly available to users of pico.

- Jörg


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.