Bug 1197895

Summary: NPE in org.fedoraproject.xmvn.connector.aether.XMvnModelValidator
Product: [Fedora] Fedora Reporter: Mat Booth <mat.booth>
Component: xmvnAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mat.booth, mizdebsk, msimacek, msrb
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.3.2-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-12 16:57:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mat Booth 2015-03-02 22:04:26 UTC
When I try to use the "install-file" goal of the maven-install-plugin with xmvn, I get an NPE.

Installed:
xmvn-2.3.1-2.fc23.noarch



This command works normally:

mvn install:install-file -Dfile=/usr/share/java/xerces-j2.jar -DgroupId=cake -DartifactId=beans -Dversion=2 -Dpackaging=jar


This command fails with NPE:

xmvn -o install:install-file -Dfile=/usr/share/java/xerces-j2.jar -DgroupId=cake -DartifactId=beans -Dversion=2 -Dpackaging=jar



[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        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:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.NullPointerException
        at org.fedoraproject.xmvn.connector.aether.XMvnModelValidator.customizeModel(XMvnModelValidator.java:79)
        at org.fedoraproject.xmvn.connector.aether.XMvnModelValidator.validateEffectiveModel(XMvnModelValidator.java:70)
        at org.apache.maven.project.validation.DefaultModelValidator.validate(DefaultModelValidator.java:52)
        at org.apache.maven.plugin.install.InstallFileMojo.validateArtifactInformation(InstallFileMojo.java:485)
        at org.apache.maven.plugin.install.InstallFileMojo.execute(InstallFileMojo.java:270)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more

Comment 1 Mikolaj Izdebski 2015-03-09 09:06:49 UTC
Fixed upstream: https://github.com/mizdebsk/xmvn/commit/8f8731f

Comment 2 Mikolaj Izdebski 2015-03-12 13:29:45 UTC
Fixed in xmvn-2.3.2-1

Comment 3 Mikolaj Izdebski 2015-03-12 16:57:07 UTC
I believe that this bug is fixed in xmvn-2.3.2-1,
which is available in Fedora Rawhide, so I am closing this bug now.

The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=619719