Maven 2 如何解决这些maven 2警告?

Maven 2 如何解决这些maven 2警告?,maven-2,grails,Maven 2,Grails,我将Maven 2.2与Grails 1.2.1一起使用。当尝试运行“集成测试”目标时,我得到一些神秘的警告,我不知道如何解决 davea-mbp2:socialmediaproxy davea$mvn集成测试 [信息]项目扫描… [警告] [警告]为socialmediaproxy:socialmediaproxy:war:0.1构建有效模型时遇到一些问题 [警告]“org.apache.maven.plugins:maven编译器插件”的“build.plugins.plugin.versi

我将Maven 2.2与Grails 1.2.1一起使用。当尝试运行“集成测试”目标时,我得到一些神秘的警告,我不知道如何解决

davea-mbp2:socialmediaproxy davea$mvn集成测试
[信息]项目扫描…
[警告]
[警告]为socialmediaproxy:socialmediaproxy:war:0.1构建有效模型时遇到一些问题
[警告]“org.apache.maven.plugins:maven编译器插件”的“build.plugins.plugin.version”丢失。@第125行第15列
[警告].sf.ehcache:ehcache core:jar的“dependencies.dependency.exclusions.exclusion.groupId”丢失。@第33行第22列
[警告].sf.ehcache:ehcache core:jar的“dependencies.dependency.exclusions.exclusion.groupId”丢失。@第36行第22列
[警告].sf.ehcache:ehcache core:jar的“dependencies.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>

org.hibernate
休眠ehcache
3.3.1.GA
net.sf.ehcache
ehcache内核
1.7.1
jms
servlet api
公用记录

有没有办法解决这些问题?谢谢,-Dave

只是pom.xml排除中的一个配置错误-您需要添加groupId条目。我不知道它们到底需要什么(可能是javax.jms),但只要根据需要替换fixme即可

<dependency>
      <groupId>net.sf.ehcache</groupId>
      <artifactId>ehcache-core</artifactId>
      <version>1.7.1</version>
  <exclusions>
      <exclusion> <!-- line 33 -->
          <groupId>fixme</groupId>
          <artifactId>jms</artifactId>
      </exclusion>
      <exclusion> <!-- line 36 -->
          <groupId>fixme</groupId>
          <artifactId>servlet-api</artifactId>
      </exclusion>

      <!-- We have JCL-over-SLF4J instead. -->
      <exclusion>
          <groupId>fixme</groupId>
          <artifactId>commons-logging</artifactId>
      </exclusion>
  </exclusions>
    </dependency>

net.sf.ehcache
ehcache内核
1.7.1
修理工
jms
修理工
servlet api
修理工
公用记录

感谢您的反馈,但您列出的“commons logging”和“servlet api”排除是否只是示例?如果没有,你是如何根据我收到的警告找出这些的不管怎样,我明白你的意思。一切正常。谢谢-