'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为非常量值的情况。
9359 0
|
5月前
|
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
65 0
|
5月前
|
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
38 0
|
5月前
|
Java
Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
115 0
|
5月前
|
自然语言处理 数据库
Expected one result (or null) to be returned by selectOne(), but found: 2
Expected one result (or null) to be returned by selectOne(), but found: 2
85 0
AttributeError: ‘version_info‘ object has no attribute ‘version‘
AttributeError: ‘version_info‘ object has no attribute ‘version‘
248 0
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
312 0
|
机器学习/深度学习 计算机视觉
成功解决This module was deprecated in version 0.18 in favor of the model_selection module into which all
成功解决This module was deprecated in version 0.18 in favor of the model_selection module into which all
|
关系型数据库
Automysqlbackup: WARNING: Turning off multicore support, since pigz isn’t there.
在使用Automysqlbackup备份MySQL时,有时候你会在邮件里面看见"WARNING: Turning off multicore support, since pigz isn't there."这样的告警信息,为什么会出现这个告警信息呢? 错误原因: Automysqlbackup在备份MySQL数据库时会去压缩dump文件。
1136 0