" gradle build"

时间:2017-06-19 18:24:42

标签: java maven gradle solr transitive-dependency

我在64位Windows 7上使用Gradle 2.7和Maven 3.2.1

设置: ProjectA依赖于projectB,projectB驻留在本地maven存储库C:\ Users \ Carlos \ vagrant.m2 \ repository .. [projectB .pom和.war files]

问题: 在构建项目A时:

* What went wrong:
Execution failed for task ':stage'.
> Could not resolve all dependencies for configuration ':webapp'.
   > Could not find [projectB].
     Searched in the following locations:
         ...
         file:/home/vagrant/.m2/repository/../[projectB].pom
         file:/home/vagrant/.m2/repository/../[projectB].war
         Required by:
         [projectA]

目标:如何制作projectA"请参阅"项目B?从上面的错误消息来看,似乎projectB.pom和projectB.war在文件系统中不存在。

我尝试了什么:在C:/Users/Carlos/.m2/settings.xml中更改maven本地存储库默认位置:

<settings>
  <localRepository>C:/Users/Carlos/vagrant/.m2/repository</localRepository>
</settings>

,在projectA中:

...
repositories {
    mavenLocal()
    ...
}

和projectB文件是C:/Users/Carlos/vagrant/.m2/repository /.../projectB.pom和C:/Users/Carlos/vagrant/.m2/repository /.../ projectB.war

0 个答案:

没有答案