在Windows VM上使用bower构建maven项目的问题

时间:2016-01-21 12:57:25

标签: maven bower

我有一个有人给我使用凉亭的maven项目。我正在尝试在我已经设置了所有相关版本的虚拟机上进行基本的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 install -g bower)并且似乎没有任何问题。我现在唯一能想到的是它可能与从VM(VMware工作站)运行有关。我不想在我的主机上更改软件版本,所以我想在看到这条路线之前我是否有任何想法。

提前致谢...

问题在于POM中的安装参数...

所以相关条目是

 <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>

如果我删除参数

               <arguments>
                    <argument>install</argument>
                </arguments>

然后项目建立。也许我应该回去看看这个。

我现在暂时打开这个问题,但万一之前有人遇到过这个问题

bowser.json

{
"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"
}

1 个答案:

答案 0 :(得分:0)

道歉我找到了答案elsewhere ......

git config --global url。“https://”.insteadOf git://

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

非常感谢你的帮助。

相关问题