Disable Maven SCM
Asked Answered
L

2

6

Could I disable SCM integration option in Maven? I want it to build a local checked-out project without SCM integration ?

is there some settings or some how??

thanx in advance

Lack answered 17/11, 2009 at 21:34 Comment(1)
What do you mean by "without SCM integration"? What problem are you facing?Serena
V
2

SCM integration is only used when you want to release a new version of software or generate changelog. When build a local checked-out project SCM integration is "ignored".

There is also scm-plugin but it isn't binded to none of the default lifecycles.

EDIT
According pom reference if you declare scm section it must be valid otherwise remove scm section.
Please paste your scm section or maybe scm plugin is used in pom.

Valina answered 17/11, 2009 at 21:38 Comment(3)
but it complains with: java.lang.NullPointerException: The scm url cannot be null. at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:181) at org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:722) at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:593) at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:452) ...Lack
Then I would assume that your POM is invalid. Either define a SCM entry (and you could choose to give it a dummy url, if you don't know the real repository) or leave that configuration out.Guidry
i too am facing the same issue..when i remove the scm section from my pom i get the error : "scm url cannot be null" . I am using buildnumber-plugin 1.0.4 betaCasual
F
10

You should check if you're using Buildnumber Maven plugin.

By default and recommended configuration it is set to be invoked on "validate" phase of every build and will fail the build with this message.

If it is the case you have two options:

  1. Disable the use of this plugin (by removing it from POM or moving it into special profile)
  2. Add scm section as described above.

Hope this helps!

Formless answered 15/12, 2009 at 17:20 Comment(0)
V
2

SCM integration is only used when you want to release a new version of software or generate changelog. When build a local checked-out project SCM integration is "ignored".

There is also scm-plugin but it isn't binded to none of the default lifecycles.

EDIT
According pom reference if you declare scm section it must be valid otherwise remove scm section.
Please paste your scm section or maybe scm plugin is used in pom.

Valina answered 17/11, 2009 at 21:38 Comment(3)
but it complains with: java.lang.NullPointerException: The scm url cannot be null. at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:181) at org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:722) at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:593) at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:452) ...Lack
Then I would assume that your POM is invalid. Either define a SCM entry (and you could choose to give it a dummy url, if you don't know the real repository) or leave that configuration out.Guidry
i too am facing the same issue..when i remove the scm section from my pom i get the error : "scm url cannot be null" . I am using buildnumber-plugin 1.0.4 betaCasual

© 2022 - 2024 — McMap. All rights reserved.