Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-663

Null error when project is too close to root

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.2
    • prepare
    • None
    • Maven 2.2.1, Windows XP SP3

    Description

      Co-worker ran into issues where if he had checked out his project directly in his root dir C: (top pom ending up in C:\project\pom.xml) and ran the release:prepare goal he would rather quickly recieve this error:

      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException
              at org.apache.maven.shared.release.util.ReleaseUtil.getBaseWorkingDirect
      oryParentCount(ReleaseUtil.java:233)
              at org.apache.maven.shared.release.phase.RewritePomsForReleasePhase.tran
      slateScm(RewritePomsForReleasePhase.java:109)
              at org.apache.maven.shared.release.phase.RewritePomsForReleasePhase.tran
      sformScm(RewritePomsForReleasePhase.java:62)
              at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transf
      ormDocument(AbstractRewritePomsPhase.java:303)
              at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transf
      ormProject(AbstractRewritePomsPhase.java:208)
              at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transf
      orm(AbstractRewritePomsPhase.java:114)
              at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execut
      e(AbstractRewritePomsPhase.java:97)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
      ReleaseManager.java:203)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
      ReleaseManager.java:140)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
      ReleaseManager.java:103)
              at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(Pr
      epareReleaseMojo.java:211)
              at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRe
      leaseMojo.java:181)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:490)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:694)
      

      I looked into it and eventually had him add a "buffer directory" so his top pom was resting in C:\workspace\project\pom.xml and following this move it built properly. Not sure if there is a real requirement to have this buffer directory, but a better error message would be helpful.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              statuswoe Brent Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: