Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure build on Maven release plugin

Tags:

java

git

maven

I'm new to Maven and I'm assigned in a multi module project working with parent pom file. I wanted to change the snapshot project to a release. Even if I added scm tag and the Maven release plugin, the release:prepare goal keeps on failing.

This is what I added on the parent pom.xml file:

 <project>
        ...
        <scm>
            <developerConnection>scm:git:http://localhost:8181/gitblit
             /r/server/myCompany.git</developerConnection>
        </scm>
        ...


        //And the plugin:
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
        </plugin>
        ...
        <project>

Here is the error:

The error is this:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-            
          plugin:2.5.3:prepare (default-cli) on 
          project myParentProject: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-add command failed.
[ERROR] Command output:
[ERROR] 'git' is not recognized as an internal or external command,
[ERROR] operable program or batch file..

Thanks in advance!

like image 978
Dera Avatar asked Nov 09 '22 22:11

Dera


1 Answers

You should install git, obviously!

If your OS is UNIX-like, use some sort of package manager, apt-get install git for debian derivatives and ubuntu.

If your OS is Windows, also make sure that git.exe is on %PATH.

like image 82
alamar Avatar answered Nov 14 '22 23:11

alamar