'version' contains an expression but should be a constant
Posted 沧海一滴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了'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.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
以上是关于'version' contains an expression but should be a constant的主要内容,如果未能解决你的问题,请参考以下文章
SyntaxError:无法在'Document'上执行'evaluate':字符串'// div [contains(。,'Medium')&
随记--'xxx' does not contain bitcode报错
Type.GetType(string.contains(','))
The container 'Maven Dependencies' references non existing library '
[JS Compose] Understand 'Box' or 'Container', they are just like Array!