Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-101

Deploying javadoc or sources file without generating POM causes NPE in VersionExpressionTransformation.transformVersions(VersionExpressionTransformation.java:203)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • deploy:deploy-file
    • 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

          Activity

            People

              rfscholte Robert Scholte
              mburger Martin Burger
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: