简体   繁体   English

在Maven发布插件上构建失败

[英]Failure build on Maven release plugin

I'm new to Maven and I'm assigned in a multi module project working with parent pom file. 我是Maven的新手,我在一个使用父pom文件的多模块项目中被分配。 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. 即使我添加了scm标签和Maven发布插件,发布:准备目标仍然失败。

This is what I added on the parent pom.xml file: 这是我在父pom.xml文件中添加的内容:

 <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! 提前致谢!

You should install git, obviously! 显然你应该安装git!

If your OS is UNIX-like, use some sort of package manager, apt-get install git for debian derivatives and ubuntu. 如果您的操作系统类似于UNIX,请使用某种包管理器, apt-get install git用于debian衍生产品和ubuntu。

If your OS is Windows, also make sure that git.exe is on %PATH . 如果您的操作系统是Windows,请确保git.exe位于%PATH

请先安装GIT,然后再试一次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM