You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rydnr <ma...@acm-sl.org> on 2011/05/19 08:01:27 UTC

Plexus 1.5.5 dependency nightmare

Hi,

While trying to make one of my maven plugins, I'm getting a npe with the 
following stack trace:

ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: 
java.lang.NullPointerException
        at 
org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)                                                                                              
[/home/chous/dev/ventura24/svn/nlp-games/trunk]
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)                                                                                                  
[/home/chous/dev/ventura24/svn/nlp-games/trunk]
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)                                                                                                   
[/home/chous/dev/ventura24/svn/nlp-games/trunk]
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                               
[/home/chous/dev/ventura24/svn/nlp-games/trunk]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.NullPointerException
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:331)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:151)
        at 
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
        at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
        at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)


However, I'm unable to find the correct plexus-container-default source code. 
No luck with sonatype svn repository either. Could anyone point me to the 
correct place to find it? I mean, one in which ComponentValueSetter.java:331 
actually exists.

The problem is that the plugin works fine with maven 2.x, and I'm trying to 
find out which setting is not being found.

Or any idea why it could be failing in maven-3.0.3...

Thank you very much!

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


Re: Plexus 1.5.5 dependency nightmare

Posted by Stuart McCulloch <mc...@gmail.com>.
On 19 May 2011, at 08:38, Anders Hammar wrote:

> And here's the svn repo:
> https://svn.codehaus.org/plexus/plexus-containers/tags/plexus-containers-1.5.5/

FYI, if they're using Maven 3.0.3 then they'll be using the Guice-Plexus facade, so the file in question is:

   https://github.com/sonatype/sisu/blob/sisu-2.1.1/sisu-inject/guice-plexus/guice-plexus-shim/src/main/java/org/codehaus/plexus/component/configurator/converters/ComponentValueSetter.java

HTH

> All info is in the pom...
> 
> /Anders
> 
> On Thu, May 19, 2011 at 09:36, Anders Hammar <an...@hammar.net> wrote:
> 
>> Anything wrong with the sources jar at central?
>> 
>> /Anders
>> 
>> 
>> On Thu, May 19, 2011 at 08:01, rydnr <ma...@acm-sl.org> wrote:
>> 
>>> Hi,
>>> 
>>> While trying to make one of my maven plugins, I'm getting a npe with the
>>> following stack trace:
>>> 
>>> ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
>>> org.apache.maven.InternalErrorException: Internal error:
>>> java.lang.NullPointerException
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>>>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>>>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>>       at
>>> 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at
>>> 
>>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>>       at
>>> 
>>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>>>       at
>>> 
>>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>>       at
>>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>>> Caused by: java.lang.NullPointerException
>>>       at
>>> 
>>> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:331)
>>>       at
>>> 
>>> org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:151)
>>>       at
>>> 
>>> org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
>>>       at
>>> 
>>> org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
>>>       at
>>> 
>>> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
>>>       at
>>> 
>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>>       at
>>> 
>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>>> 
>>> 
>>> However, I'm unable to find the correct plexus-container-default source
>>> code.
>>> No luck with sonatype svn repository either. Could anyone point me to the
>>> correct place to find it? I mean, one in which
>>> ComponentValueSetter.java:331
>>> actually exists.
>>> 
>>> The problem is that the plugin works fine with maven 2.x, and I'm trying
>>> to
>>> find out which setting is not being found.
>>> 
>>> Or any idea why it could be failing in maven-3.0.3...
>>> 
>>> Thank you very much!
>>> 
>>> ---------------------------------------------------------------------
>>> 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


Re: Plexus 1.5.5 dependency nightmare

Posted by Anders Hammar <an...@hammar.net>.
I'm not sure if a property is allowed to be an empty string. But file a bug
report and this possible issue will be on the board.

/Anders

On Thu, May 19, 2011 at 19:24, rydnr <ma...@acm-sl.org> wrote:

> Basically, in my tests, if a Maven plugin runs within Maven 3.0.3, and
> defines
>
> /**
>  * @parameter property="abc"
>  */
> private String somethingDifferentThanAbc;
>
> public void setAbc(String value) {
>  somethingDifferentThanAbc = value;
> }
>
> Works for non-empty values:
> <abc>abc-value</abc>
>
> But throws a NPE in
>
> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter:331
> (fieldTypeConverter is null) with empty values:
>
> <abc></abc>
>
> Should I fill a bug? It works in Maven 2.x. It works if you declare the
> property with no naming conventions:
>
> private String abc;
>
> Kind regards,
> Rydnr
>

Re: Plexus 1.5.5 dependency nightmare

Posted by rydnr <ma...@acm-sl.org>.
Basically, in my tests, if a Maven plugin runs within Maven 3.0.3, and defines

/**
 * @parameter property="abc"
 */
private String somethingDifferentThanAbc;

public void setAbc(String value) {
  somethingDifferentThanAbc = value;
}

Works for non-empty values:
<abc>abc-value</abc>

But throws a NPE in 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter:331 
(fieldTypeConverter is null) with empty values:

<abc></abc>

Should I fill a bug? It works in Maven 2.x. It works if you declare the 
property with no naming conventions:

private String abc;

Kind regards,
Rydnr

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


Re: Plexus 1.5.5 dependency nightmare

Posted by rydnr <ma...@acm-sl.org>.
Thank you Anders.

Unfortunately, it's not using it. It's using the plexus-container classes 
bundled within $MAVEN_HOME/lib/sisu-inject-plexus-2.1.1.jar.

I couldn't find sisu-inject-plexus-2.1.1-sources.jar anywhere, but the 
repository itself is fortunately available at

https://github.com/sonatype/sisu.git

And then within

/sisu-inject/containers/guice-plexus/guice-plexus-shim/src/main/java/

Regarding my concrete bug, the npe is thrown because it cannot set a mojo 
property declared as

/**
 * @parameter property="catalog"
 */
private String _catalog;

[..]

public void setCatalog(String) {...}

I've followed the guidelines described in the plugin development guide [1], 
and it's working fine for other properties. Am I missing something?

Kind regards,
Rydnr

[1] http://maven.apache.org/guides/plugin/guide-java-plugin-development.html	

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


Re: Plexus 1.5.5 dependency nightmare

Posted by Anders Hammar <an...@hammar.net>.
And here's the svn repo:
https://svn.codehaus.org/plexus/plexus-containers/tags/plexus-containers-1.5.5/

All info is in the pom...

/Anders

On Thu, May 19, 2011 at 09:36, Anders Hammar <an...@hammar.net> wrote:

> Anything wrong with the sources jar at central?
>
> /Anders
>
>
> On Thu, May 19, 2011 at 08:01, rydnr <ma...@acm-sl.org> wrote:
>
>> Hi,
>>
>> While trying to make one of my maven plugins, I'm getting a npe with the
>> following stack trace:
>>
>> ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
>> org.apache.maven.InternalErrorException: Internal error:
>> java.lang.NullPointerException
>>        at
>>
>> org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
>>        at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
>>        at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>>        at
>>
>> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>>        at
>>
>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>        at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>>        at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>        at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: java.lang.NullPointerException
>>        at
>>
>> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:331)
>>        at
>>
>> org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:151)
>>        at
>>
>> org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
>>        at
>>
>> org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
>>        at
>>
>> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
>>        at
>>
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
>>        at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>>        at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>        at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>        at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>>
>>
>> However, I'm unable to find the correct plexus-container-default source
>> code.
>> No luck with sonatype svn repository either. Could anyone point me to the
>> correct place to find it? I mean, one in which
>> ComponentValueSetter.java:331
>> actually exists.
>>
>> The problem is that the plugin works fine with maven 2.x, and I'm trying
>> to
>> find out which setting is not being found.
>>
>> Or any idea why it could be failing in maven-3.0.3...
>>
>> Thank you very much!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: Plexus 1.5.5 dependency nightmare

Posted by Anders Hammar <an...@hammar.net>.
Anything wrong with the sources jar at central?

/Anders

On Thu, May 19, 2011 at 08:01, rydnr <ma...@acm-sl.org> wrote:

> Hi,
>
> While trying to make one of my maven plugins, I'm getting a npe with the
> following stack trace:
>
> ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
> org.apache.maven.InternalErrorException: Internal error:
> java.lang.NullPointerException
>        at
>
> org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
>        at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
>        at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>        at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>        at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [/home/chous/dev/ventura24/svn/nlp-games/trunk]
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>        at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>        at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.NullPointerException
>        at
>
> org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:331)
>        at
>
> org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:151)
>        at
>
> org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
>        at
>
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
>        at
>
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
>        at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
>        at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>        at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>        at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>        at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>
>
> However, I'm unable to find the correct plexus-container-default source
> code.
> No luck with sonatype svn repository either. Could anyone point me to the
> correct place to find it? I mean, one in which
> ComponentValueSetter.java:331
> actually exists.
>
> The problem is that the plugin works fine with maven 2.x, and I'm trying to
> find out which setting is not being found.
>
> Or any idea why it could be failing in maven-3.0.3...
>
> Thank you very much!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>