父版本的 Maven 子依赖错误
Maven child dependency error with parent version
我们有下一个项目结构:
parentPom.xml
java 个项目
streambase 项目
streambaseParentPom.xml
项目 1
project2(依赖project1)
所以我们有一个继承到 streambaseParentPom 的 parentPom,最后一个继承到所有 streambase 项目。
因此,我们尝试在 parentPom 中有一个名为 cerebro.version 的属性,它定义了父级的版本。
当我们将 project1 作为其他项目的依赖项时,我们会遇到问题,我们会收到下一条错误消息:
[ERROR] Failed to execute goal on project eFX-SB7-Pricing: Could not resolve dependencies for project com.santander.fx:eFX-SB7-Pricing:jar:3.14.10.0.4-SNAPSHOT:
Failed to collect dependencies at com.santander.fx:eFX-SB7-Common:jar:3.14.10.0.4-SNAPSHOT:
Failed to read artifact descriptor for com.santander.fx:eFX-SB7-Common:jar:3.14.10.0.4-SNAPSHOT:
Could not transfer artifact com.santander.fx:eFX-SB7-Parent:pom:${cerebro.version} from/to eFX-External-Repository (http://lnx-efxbuild2.ants.ad.anplc.co.uk:8081/artifactory/ext-release-local):
Illegal character in path at index 109: http://lnx-efxbuild2.ants.ad.anplc.co.uk:8081/artifactory/ext-release-local/com/santander/fx/eFX-SB7-Parent/${cerebro.version}/eFX-SB7-Parent-${cerebro.version}.pom -> [Help 1]
提前致谢。
恐怕这样不行。参数化 <version>
值不是一个好主意,因为即使您设法将它部署到远程存储库,以后使用该工件的任何项目都不知道 ${cerebro.version}
应该解决什么问题。
请记住,Maven 努力保持您的构建可重现。如果构建依赖于某些在部署时已知但依赖项未知的变量,则您的构建将不再可重现。
我们有下一个项目结构:
parentPom.xml
java 个项目
streambase 项目
streambaseParentPom.xml
项目 1
project2(依赖project1)
所以我们有一个继承到 streambaseParentPom 的 parentPom,最后一个继承到所有 streambase 项目。 因此,我们尝试在 parentPom 中有一个名为 cerebro.version 的属性,它定义了父级的版本。 当我们将 project1 作为其他项目的依赖项时,我们会遇到问题,我们会收到下一条错误消息:
[ERROR] Failed to execute goal on project eFX-SB7-Pricing: Could not resolve dependencies for project com.santander.fx:eFX-SB7-Pricing:jar:3.14.10.0.4-SNAPSHOT:
Failed to collect dependencies at com.santander.fx:eFX-SB7-Common:jar:3.14.10.0.4-SNAPSHOT:
Failed to read artifact descriptor for com.santander.fx:eFX-SB7-Common:jar:3.14.10.0.4-SNAPSHOT:
Could not transfer artifact com.santander.fx:eFX-SB7-Parent:pom:${cerebro.version} from/to eFX-External-Repository (http://lnx-efxbuild2.ants.ad.anplc.co.uk:8081/artifactory/ext-release-local):
Illegal character in path at index 109: http://lnx-efxbuild2.ants.ad.anplc.co.uk:8081/artifactory/ext-release-local/com/santander/fx/eFX-SB7-Parent/${cerebro.version}/eFX-SB7-Parent-${cerebro.version}.pom -> [Help 1]
提前致谢。
恐怕这样不行。参数化 <version>
值不是一个好主意,因为即使您设法将它部署到远程存储库,以后使用该工件的任何项目都不知道 ${cerebro.version}
应该解决什么问题。
请记住,Maven 努力保持您的构建可重现。如果构建依赖于某些在部署时已知但依赖项未知的变量,则您的构建将不再可重现。