我有一個關於Gradle構建的問題,我很難解決。問題與gradle構建和pom解析
我不斷收到一個錯誤說更新:
> Could not resolve credit/open/fabric:credit-open-fabric-api:17.4.1.RELEASE.
> Could not parse POM http://Mywebsite/content/groups/public/openapi/17.4.1.RELEASE/open-api-17.4.1.RELEASE.pom
> Could not resolve open:api:17.4.1.RELEASE.
> Could not resolve open:api2:17.4.1.RELEASE.
> Could not parse POM http://Mywebsite/content/groups/public/open/api2/17.4.1.RELEASE/api2-17.4.1.RELEASE.pom
> Could not resolve open:open-parent:17.4.1.RELEASE.
> Could not resolve open:open-parent:17.4.1.RELEASE.
> Could not parse POM http://Mywebsite/content/groups/public/open/open-parent/17.4.1.RELEASE/open-parent-17.4.1.RELEASE.pom
> Unable to resolve version for dependency 'tibco:${tibrv.native}:jar'
和堆棧跟蹤顯示有一個問題解析包含更新如下依存性的POM:
<dependency>
<groupID>tibco</groupID>
<artifactId>${tibrv.native}</artifactID>
</dependency>
<dependency>
<groupID>tibco</groupID>
<artifactId>tibask</artifactID>
</dependency>
.
.
.
<profile>
<id>tib-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<tibrv.native>tibask</tibrv.native>
</properties>
</profile>
在我的構建.gradle文件我有:
compile 'tibco:ask:8.3.1'
其中,nativity是我的POM中的artifactID。
我需要在我的build.gradle文件中爲gradle中的pom解析器添加什麼內容才能獲得${tibrv.native}
值的真實值?
請粘貼'pom.xml'的相關部分,它定義了'tibrv.native'財產。希望它不在 –
這正是它在... – koala421
請參閱[這裏](https://blog.gradle.org/maven-pom-profiles)討論關於gradle中maven配置文件的支持。和[這裏](https://dzone.com/articles/maven-profile-best-practices)爲什麼在依賴管理中使用配置文件被認爲是反模式 –