Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
If I deploy a "sources" or "javadoc" file (with proper classifier set) without generating a POM (generatePom=false), Maven throws a NullPointerException:
$ mvn deploy:deploy-file \ > -Dfile=javassist-sources.jar \ > -Dclassifier=sources \ > -DgroupId=javassist \ > -DartifactId=javassist \ > -Dversion=3.10.0.GA \ > -Dpackaging=jar \ > -DgeneratePom=false \ > -DrepositoryId=thirdparty \ > -Durl=dav:https://***/nexus/content/repositories/thirdparty [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'deploy'. [INFO] ------------------------------------------------------------------------ [INFO] Building Javassist [INFO] task-segment: [deploy:deploy-file] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [deploy:deploy-file] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NullPointerException at org.apache.maven.project.artifact.VersionExpressionTransformation.transformVersions(VersionExpressionTransformation.java:203) at org.apache.maven.project.artifact.VersionExpressionTransformation.transformForDeployment(VersionExpressionTransformation.java:94) at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForDeployment(DefaultArtifactTransformationManager.java:78) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:86) at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:240) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) 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:597) 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)
If I set generatePom to true, it will work.
Attachments
Issue Links
- duplicates
-
MDEPLOY-84 NPE when deploy-file with generatePom=false
- Closed