在windows VM上使用bower构建maven项目时出现问题

在windows VM上使用bower构建maven项目时出现问题,maven,bower,Maven,Bower,我有一个maven项目,有人给了我一个使用bower的项目。我正在尝试在我用所有相关版本设置的vm上进行基本mvn清理安装。我已经在我的虚拟机上构建了更大的项目,所以我不认为存在网络错误,但我不断地在虚拟机上遇到错误 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular.bower-angular-mocks.git", exit code of #128 fatal: u

我有一个maven项目,有人给了我一个使用bower的项目。我正在尝试在我用所有相关版本设置的vm上进行基本mvn清理安装。我已经在我的虚拟机上构建了更大的项目,所以我不认为存在网络错误,但我不断地在虚拟机上遇到错误

ECMDERR Failed to execute "git ls-remote --tags --heads     git://github.com/angular.bower-angular-mocks.git", exit code of #128 fatal:     unable to connect to github.com: 192.30.252.131]: errno=No such file or     directory
我可以在浏览器中从vm访问该位置,并在命令提示符下运行该命令,因此我认为该位置没有具体问题。此外,尽管它在构建中的大致相同点(在bower.bootstrap#3.2.0之后)中断,但每次都会给出不同的git地址作为失败点

我有点被这个难住了。我已经重新安装了bower好几次(npm安装-g bower),似乎没有任何问题。目前我唯一能想到的是,这可能与从VM(VMware工作站)运行有关。我不想改变我的主机上的软件版本,所以我想在走这条路之前看看有没有人有什么想法

先谢谢你

问题在于POM中的install参数

因此,相关条目是

 <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <executable>bower</executable>
                <arguments>
                    <argument>install</argument>
                </arguments>
                <workingDirectory>${basedir}</workingDirectory>
            </configuration>
        </plugin>

抱歉,我已经找到了答案

git config--全局url。“https://”。而不是git://

“问题是bower试图通过git://协议检索包,这似乎在我的机器上被阻止了。”


非常感谢您的帮助。

您能给我们看一下您的构建文件吗?您能给我们看一下
bower.json
文件吗?您的.ssh目录中有多个ssh密钥吗?我还没有在那个vm上设置一个。我现在已经设置了一个地址,但仍然失败(这次使用…/bower-angular.git,但它已经切换了其中一些地址,所以我认为这与此无关)
               <arguments>
                    <argument>install</argument>
                </arguments>
{
"name": "java-angular-seed",
"version": "0.0.0",
"authors": [
    "Mrs X"
],
"description": "A seed project",
"keywords": [
    "java",
    "maven",
    "angularjs",
    "seed"
],
"license": "Apache 2.0",
"homepage": "http://matador.com",
"private": true,
"ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "src/main/webapp/vendor",
    "test",
    "tests"
],
"dependencies": {
    "angular-loader": "1.5.0-rc.0",
    "angular-mocks": "1.5.0-rc.0",
    "angular-route": "1.5.0-rc.0",
    "angular": "1.5.0-rc.0",
    "bootstrap": "3.2.0"
},
"main": "src/main/webapp/index.html"
}