Just like the maven-release-plugin[1], the buildnumber-maven-plugin uses the 
scm-section of the pom.
Here are some details for this section[2]
And the way a git-url should look like [3]

-Robert
 
[1] 
http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
[2] http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_scm
[3] http://maven.apache.org/scm/git.html
 
 
 


From: [email protected]
Date: Sat, 21 May 2011 14:00:02 -0400
To: [email protected]
Subject: [mojo-user] buildnumber-maven-plugin:1.0:create with git


Hello,
  I would like to use the buildnumber-maven-plugin with a git repository.
Specifically, to embed the git revision in the manifest and/or version number.  
how do I configure the plugin so that it can accomplish this.


I tried both

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.0</version>
      </plugin>
and the full example from the create-mojo.html page
which results in 

    [ERROR] Failed to execute goal 
org.codehaus.mojo:buildnumber-maven-plugin:1.0:create (default-cli) on project 
<>: Execution default-cli of goal 
org.codehaus.mojo:buildnumber-maven-plugin:1.0:create failed: The scm url 
cannot be null. -> [Help 1]


I found on the main pages for the buildnumber plugin  
http://mojo.codehaus.org/buildnumber-maven-plugin/create-mojo.html and 
http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html, but they do not 
explain how to use it with git or why it seams to want an scm url and can't 
find that info itself from the workspace )


Can someone explain to me what options I need to set on this plugin and/or 
point me to an example pom.xml using this plugin with git?


Thanks

--Jeff
                                          

Reply via email to