Robert Scholte <rfscholte <at> codehaus.org> writes:

> 
> 
> 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: jwadamson <at> gmail.comDate: Sat, 21 May 2011 14:00:02 -0400To: user
<at> mojo.codehaus.orgSubject: [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
> 

I found that all you need to do is set your scm connection value correctly.  The
important part seems to be "scm:git:".  

example: 
  <scm>
   
<connection>
    scm:git:[email protected]:phillip_green_idmworks/oim-wrapper.git
</connection>
    <url>https://github.com/clojure/clojure</url>
  </scm

I have not looked at the code to verify this 100%.  But when I have "scm:git: at
the beginning, I get the correct hash. 



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to