'dependencies.dependency.version' is missing for xxx
2011-03-30 18:30
453 查看
对于多个平行 module 的 maven 项目,为保证所有依赖版本一致,肯定会用到 dependencyManagement。
当阅读了 maven 的说明文档, 将开发中的 flex maven 项目使用此功能按示例编写后,却遇到了 'dependencies.dependency.version' is missing for xxx 的问题。
经多次尝试,原来 maven 对于父项目定义的dependencyManagement 中的 非 jar 类型的 <type></type>节点不会继承,也就是说子项目中必须再次声明非 jar 类型的 <type></type> 即可。
比如 父项目中声明:
子项目中再声明一次,如果是jar 则不必要。
当阅读了 maven 的说明文档, 将开发中的 flex maven 项目使用此功能按示例编写后,却遇到了 'dependencies.dependency.version' is missing for xxx 的问题。
经多次尝试,原来 maven 对于父项目定义的dependencyManagement 中的 非 jar 类型的 <type></type>节点不会继承,也就是说子项目中必须再次声明非 jar 类型的 <type></type> 即可。
比如 父项目中声明:
<dependencyManagement> <dependencies> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>flex-framework</artifactId> <version>4.0.0.14159</version> <type>pom</type> <scope>compile</scope> </dependency> <dependency> <groupId>com.adobe.flexunit</groupId> <artifactId>flexunit</artifactId> <version>0.85</version> <type>swc</type> <scope>test</scope> </dependency> </dependencies> </dependencyManagement>
子项目中再声明一次,如果是jar 则不必要。
<dependencies> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>flex-framework</artifactId> <type>pom</type> </dependency> <dependency> <groupId>com.adobe.flexunit</groupId> <artifactId>flexunit</artifactId> <type>swc</type> </dependency> </dependencies>
相关文章推荐
- maven项目jar包版本错误:'dependencies.dependency.version' for xxx:jar is missing. @ line xx, column xx
- maven项目jar包版本错误:'dependencies.dependency.version' for xxx:jar is missing. @ line xx, column xx
- maven项目jar包版本错误:'dependencies.dependency.version' for xxx:jar is missing. @ line xx, column xx
- 'dependencies.dependency.version' for XXX:jar is missing
- 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing
- 'dependencies.dependency.version' for XX:XX:jar is missing. @ com.wb:wb-b:[unknown-version], D:\Work
- eclipse中Project'XX'is missing required library:'[路径]\XXX.jar&#0
- [WARNING] The POM for XXX-system:jar:1.9.0-SNAPSHOT is missing, no dependency information available
- problem中Project'XX'is missing required library:'[路径]\XXX.jar'解决方法
- files list file for package '*****' is missing final newline的解决
- WPF 错误:DependencyProperty.UnsetValue}' is not a valid value for property 'Background'
- MyBatis There is no getter for property named 'xxx' in 'class java.lang.String'
- Android开发笔记: Project "XXX" is missing required source folder: 'gen'
- VS2010 + Sql Server Express 2008 R2 如何安装(兼谈错误:The database 'XXX' cannot be opened because it is version 661. This server support
- DependencyProperty.UnsetValue}' is not a valid value for property 'Background' 的错误原因
- The major.minor version '49.0' is too recent for this tool to understand.
- There is no getter for property named 'xxx' in 'class java.lang.Long'
- problem中Project'XX'is missing required library:'[路径]\XXX.jar'解决方法
- 【Maven】dependencies.dependency.version is missing 问题
- Mybatis-异常-There is no getter for property named 'VARCHAR' in 'class com.xxx.xxxxx