如何解决这些 Maven 2 警告?
我正在使用 Maven 2.2 和 Grails 1.2.1。当尝试运行“集成测试”目标时,我收到一些神秘的警告,我不知道如何解决...
davea-mbp2:socialmediaproxy davea$ mvn Integration-test
[信息] 扫描项目...
[警告]
[警告] 为socialmediaproxy构建有效模型时遇到了一些问题:socialmediaproxy:war:0.1
[警告] org.apache.maven.plugins:maven-compiler-plugin 的“build.plugins.plugin.version”丢失。 @第125行,第15列
[警告] net.sf.ehcache:ehcache-core:jar 缺少“dependency.dependency.exclusions.exclusion.groupId”。 @第33行,第22列
[警告] net.sf.ehcache:ehcache-core:jar 缺少“dependency.dependency.exclusions.exclusion.groupId”。 @第36行第22列
[警告] net.sf.ehcache:ehcache-core:jar 缺少“dependency.dependency.exclusions.exclusion.groupId”。 @第41行第22列
[警告]
[警告] 强烈建议修复这些问题,因为它们会威胁到您构建的稳定性。
[警告]
[警告] 因此,未来的 Maven 版本可能不再支持构建此类格式错误的项目。
[警告]
这是我的 pom.xml 中警告所指的部分...
<!-- Grails defaults to Ehache for the second-level Hibernate cache. -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>3.3.1.GA</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>1.7.1</version>
<exclusions>
<exclusion> <!-- line 33 -->
<artifactId>jms</artifactId>
</exclusion>
<exclusion> <!-- line 36 -->
<artifactId>servlet-api</artifactId>
</exclusion>
<!-- We have JCL-over-SLF4J instead. -->
<exclusion>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
我有什么想法可以解决这些问题吗?谢谢,-戴夫
I'm using Maven 2.2 with Grails 1.2.1. When trying to run the "integration-test" target, I get some cryptic warnings, which I can't figure out how to resolve ...
davea-mbp2:socialmediaproxy davea$ mvn integration-test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for socialmediaproxy:socialmediaproxy:war:0.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 125, column 15
[WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for net.sf.ehcache:ehcache-core:jar is missing. @ line 33, column 22
[WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for net.sf.ehcache:ehcache-core:jar is missing. @ line 36, column 22
[WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for net.sf.ehcache:ehcache-core:jar is missing. @ line 41, column 22
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
Here is the part of my pom.xml the warnings are referring to ...
<!-- Grails defaults to Ehache for the second-level Hibernate cache. -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>3.3.1.GA</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>1.7.1</version>
<exclusions>
<exclusion> <!-- line 33 -->
<artifactId>jms</artifactId>
</exclusion>
<exclusion> <!-- line 36 -->
<artifactId>servlet-api</artifactId>
</exclusion>
<!-- We have JCL-over-SLF4J instead. -->
<exclusion>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
Any ideas how i can solve these? Thanks, - Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是 pom.xml 排除中的配置错误 - 您需要添加 groupId 条目。我不知道它们到底需要什么(可能是 javax.jms),但只需根据需要替换修复程序。
Just a misconfiguration in your pom.xml exclusions - you need to add the groupId entries. I don't know exactly what they need to be (possibly javax.jms) but just replace the fixme as necessary.