'version' contains an expression but should be a constant

简介: [WARNING] Some problems were encountered while building the effective model for com.app:cache:jar:4.

 

[WARNING] Some problems were encountered while building the effective model for com.app:cache:jar:4.0.0
[WARNING] 'version' contains an expression but should be a constant. @ com.app:webapi:${myproject.version}, /usr/local/jenkins/webapi/pom.xml, line 8, column 14

 

[WARNING] Some problems were encountered while building the effective model for cy.nad.cyg:pay-web:war:3.0.2
[WARNING] 'version' contains an expression but should be a constant. @ cy.nad.cyg:pay:${myproject.version}, D:\workspace\idea\pay\pom.xml, line 7, column 14

这是因为Maven3 不允许出现version为非常量值的情况,我们就需要第三方插件来帮我们自动完成升级版本的工作。

参见下文:

http://mojo.codehaus.org/versions-maven-plugin/examples/update-child-modules.html

这个插件等于只需要我们在parent pom中变更一下版本号,然后执行

mvn -N versions:update-child-modules这个命令,就会将所有依赖的地方全部变成新的版本号,从而帮我们完成该问题。

 

http://www.cnblogs.com/beiyeren/p/4275032.html

 

相关文章
|
Java Maven
Maven3 package时报 'version' contains an expression but should be a constant
父pom文件: 4.0.0 com.wey WEY ${com.wey.version} pom 子Module 4.0.0 com.wey WEY ${com.wey.version} pom package web工程时报 'version' contains an expression but should be a constant这个错误提示,这是因为Maven3 不允许出现version为非常量值的情况。
9423 0
|
7月前
|
JSON 数据格式
解决报错TypeError: Converting circular structure to JSON --> starting at object with constructor
解决报错TypeError: Converting circular structure to JSON --> starting at object with constructor
|
7月前
|
JavaScript 程序员 Swift
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
87 0
|
7月前
|
Java Maven
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile
55 0
|
7月前
|
数据库
Field ‘xxx‘ doesn‘t have a default value
Field ‘xxx‘ doesn‘t have a default value
64 0
|
数据库
Field ‘id‘ doesn‘t have a default value
Field ‘id‘ doesn‘t have a default value
178 0
|
Java 程序员 编译器
Variable used in lambda expression should be final or effectively final
Variable used in lambda expression should be final or effectively final
Variable used in lambda expression should be final or effectively final
error: ‘nullptr’ was not declared in this scope
error: ‘nullptr’ was not declared in this scope
242 0