Details
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
- is duplicated by
-
MRELEASE-769 Release:prepare fails on Windows when commonBaseDir of all reactor projects is root drive (e.g. D:\)
- Closed