Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when <scm> section exists but has neither <connection> nor <developerConnection> #74

Closed
jacobharris919 opened this issue May 24, 2017 · 0 comments

Comments

@jacobharris919
Copy link
Contributor

jacobharris919 commented May 24, 2017

The Spring Boot parent pom apparently adds an <scm> section to the POM. Effective POM contains:
<scm> <url>https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/${project.name}</url> </scm>

Attempting to run 'mvn clean' with the gitflow-helper plugin activated yields the following error:

[ERROR] Internal error: java.lang.NullPointerException: The scm url cannot be null. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException: The scm url cannot be null.
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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:498)
        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: java.lang.NullPointerException: The scm url cannot be null.
        at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:195)
        at com.e_gineering.maven.gitflowhelper.ScmUtils.resolveBranchOrExpression(ScmUtils.java:60)
        at com.e_gineering.maven.gitflowhelper.MasterPromoteExtension.afterProjectsRead(MasterPromoteExtension.java:129)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        ... 11 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant