[ https://issues.apache.org/jira/browse/SCM-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963042#comment-17963042 ]
ASF GitHub Bot commented on SCM-242: ------------------------------------ jira-importer opened a new issue, #996: URL: https://github.com/apache/maven-scm/issues/996 **[Julien HENRY](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=henryju)** opened **[SCM-242](https://issues.apache.org/jira/browse/SCM-242?redirect=false)** and commented I get a NPE when using Scm plugin with the provider I wrote (Synergy) and the URL is incorrect. I think it's because I use the ScmRepositoryException( String msg ) constructor instead of ScmRepositoryException( String msg, List validationMessages ), and the result is e.getValidationMessages().isEmpty() raise a NPE. Here is stack trace : java.lang.NullPointerException at org.apache.maven.scm.plugin.AbstractScmMojo.getScmRepository(AbstractScmMojo.java:258) at org.apache.maven.scm.plugin.CheckoutMojo.checkout(CheckoutMojo.java:94) at org.apache.maven.scm.plugin.BootstrapMojo.execute(BootstrapMojo.java:58) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) ... --- **Attachments:** - [NPE.patch](https://issues.apache.org/jira/secure/attachment/12718475/NPE.patch) (_542 bytes_) > NPE on ScmRepositoryException > ----------------------------- > > Key: SCM-242 > URL: https://issues.apache.org/jira/browse/SCM-242 > Project: Maven SCM (Moved to GitHub Issues) > Issue Type: Bug > Components: maven-plugin > Reporter: Julien HENRY > Assignee: kenneyw > Priority: Major > Attachments: NPE.patch > > > I get a NPE when using Scm plugin with the provider I wrote (Synergy) and the > URL is incorrect. > I think it's because I use the ScmRepositoryException( String msg ) > constructor instead of ScmRepositoryException( String msg, List > validationMessages ), and the result is > e.getValidationMessages().isEmpty() > raise a NPE. > Here is stack trace : > java.lang.NullPointerException > at > org.apache.maven.scm.plugin.AbstractScmMojo.getScmRepository(AbstractScmMojo.java:258) > at > org.apache.maven.scm.plugin.CheckoutMojo.checkout(CheckoutMojo.java:94) > at > org.apache.maven.scm.plugin.BootstrapMojo.execute(BootstrapMojo.java:58) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) > ... -- This message was sent by Atlassian Jira (v8.20.10#820010)