You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Jerome Lacoste (JIRA)" <ji...@codehaus.org> on 2005/10/18 13:51:11 UTC
[jira] Commented: (MNG-1232) Incorrect field case triggers NPE when configurator unable to configure object
[ http://jira.codehaus.org/browse/MNG-1232?page=comments#action_48778 ]
Jerome Lacoste commented on MNG-1232:
-------------------------------------
Forgot to mention: affects 2.0-RC.
> Incorrect field case triggers NPE when configurator unable to configure object
> ------------------------------------------------------------------------------
>
> Key: MNG-1232
> URL: http://jira.codehaus.org/browse/MNG-1232
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Reporter: Jerome Lacoste
> Priority: Critical
>
>
> Triggered working on a new plugin. The configuration error is mine, but the error message is very cryptic. I spent 15 min trying to finx the reason for the issue...
> NPE should at least be avoided. Better should the configuration error reported.
> pom.xml extract:
> <configuration>
> <!--outputDirectory></outputDirectory--> <!-- not required?? -->
> <!-- "GLOBAL" -->
> <!-- dependencies to sign and distribute (runtime-sub-dependencies get signed too). -->
> <!-- does that imply transitivity? -->
> <dependencies>
> <dependency>commons-logging:commons:logging</dependency>
> <dependency>commons-cli:commons:cli</dependency>
> </dependencies>
> <jnlp>
> ...
> <sign>
> ....
> <dnameC>US</dnameC>
> and my Mojo:
> public class JnlpMojo
> extends AbstractMojo
> {
> /**
> * @parameter
> */
> private SignConfig sign;
> ...
> }
> public class SignConfig {
> private String dnamec; // note the case issue
> ...
> }
> Gives the following failure:
>
> [DEBUG] adding entry META-INF/maven/org.apache.maven.plugins/jar-mng-1130-0/pom.properties
> [DEBUG] org.codehaus.mojo:webstart-maven-plugin:maven-plugin:0.1-SNAPSHOT (selected for runtime)
> [DEBUG] commons-lang:commons-lang:jar:2.1 (selected for runtime)
> [DEBUG] Configuring mojo 'org.codehaus.mojo:webstart-maven-plugin:0.1-SNAPSHOT:jnlp' -->
> [DEBUG] (f) gzip = false
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> ---------------------------------------------------
> constituent[0]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-core-2.0.jar
> constituent[1]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-model-2.0.jar
> constituent[2]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-plugin-parameter-documenter-2.0.jar
> constituent[3]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-profile-2.0.jar
> constituent[4]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-error-diagnostics-2.0.jar
> constituent[5]: file:/home/jerome/local/lib/maven-2.0-RC/lib/plexus-interactivity-api-1.0-alpha-4.jar
> constituent[6]: file:/home/jerome/local/lib/maven-2.0-RC/lib/wagon-http-lightweight-1.0-alpha-5.jar
> constituent[7]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-plugin-descriptor-2.0.jar
> constituent[8]: file:/home/jerome/local/lib/maven-2.0-RC/lib/commons-cli-1.0.jar
> constituent[9]: file:/home/jerome/local/lib/maven-2.0-RC/lib/wagon-ssh-1.0-alpha-5.jar
> constituent[10]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-monitor-2.0.jar
> constituent[11]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-repository-metadata-2.0.jar
> constituent[12]: file:/home/jerome/local/lib/maven-2.0-RC/lib/jsch-0.1.23.jar
> constituent[13]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-settings-2.0.jar
> constituent[14]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-artifact-manager-2.0.jar
> constituent[15]: file:/home/jerome/local/lib/maven-2.0-RC/lib/wagon-file-1.0-alpha-5.jar
> constituent[16]: file:/home/jerome/local/lib/maven-2.0-RC/lib/wagon-provider-api-1.0-alpha-5.jar
> constituent[17]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-project-2.0.jar
> constituent[18]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-reporting-api-2.0.jar
> constituent[19]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-plugin-api-2.0.jar
> constituent[20]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-artifact-2.0.jar
> constituent[21]: file:/home/jerome/local/lib/maven-2.0-RC/lib/maven-plugin-registry-2.0.jar
> constituent[22]: file:/home/jerome/local/lib/maven-2.0-RC/lib/doxia-sink-api-1.0-alpha-4.jar
> ---------------------------------------------------
> java.lang.NullPointerException
> at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
> at java.util.regex.Matcher.reset(Matcher.java:284)
> at java.util.regex.Matcher.<init>(Matcher.java:205)
> at java.util.regex.Pattern.matcher(Pattern.java:879)
> at org.apache.maven.plugin.PluginConfigurationException.addParameterUsageInfo(PluginConfigurationException.java:85)
> at org.apache.maven.plugin.PluginConfigurationException.buildConfigurationDiagnosticMessage(PluginConfigurationException.java:272)
> at org.apache.maven.usability.PluginConfigurationDiagnoser.diagnose(PluginConfigurationDiagnoser.java:49)
> at org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(ErrorDiagnostics.java:81)
> at org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:693)
> at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:640)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:119)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> 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)
> Renaming the field from dnamec to dnameC fixes the issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org