4

when building a maven project. i am getting the following error.

[ERROR]Runtime Exception thrown during execution
[ERROR]The scm url cannot be null.

Please hint me on how to resolve it.

Thanks

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
TrustyCoder
  • 4,749
  • 10
  • 66
  • 119

3 Answers3

8

It is not clear what goal you are executing but the error looks self explaining: you need to add a SCM element:

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  ...
  <scm>
    <connection>scm:svn:http://127.0.0.1/svn/my-project</connection>
    <developerConnection>scm:svn:https://127.0.0.1/svn/my-project</developerConnection>
    <tag>HEAD</tag>
    <url>http://127.0.0.1/websvn/my-project</url>
  </scm>
  ...
</project>
Bhesh Gurung
  • 50,430
  • 22
  • 93
  • 142
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
0

Take a look at: Disable Maven SCM

What's in your pom.xml file ?

Community
  • 1
  • 1
snowflake
  • 1,750
  • 2
  • 17
  • 40
0

The problem could be due to a missing developerConnection in the SCM section of your POM. This can lead to the (misleading) error message you are reporting: http://jira.codehaus.org/browse/MOJO-1014

It would help if you could post a copy of your POM and the goal you are trying to execute.

Sam
  • 939
  • 8
  • 6