我有一个关于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)为什么在依赖管理中使用配置文件被认为是反模式 –