2011-04-01 133 views
0

我使用Maven 2.2和Grails 1.2.1。當試圖運行「集成測試」的目標,我得到一些神祕的警告,這是我無法弄清楚如何解決......如何解決這些maven 2警告?

davea-MBP2:socialmediaproxy davea $ MVN集成測試
[INFO ]掃描的項目...
[警告]同時爲socialmediaproxy的有效模式遇到
[警告一些問題:socialmediaproxy:戰爭:0.1
[警告] 'build.plugins.plugin.version' 的組織.apache.maven.plugins:缺少maven-compiler-plugin。 @ line 125,column 15
[WARNING]'dependencies.dependency.exclusions.exclusion.groupId'for net.sf.ehcache:ehcache-core:jar缺失。 @行33,列22
[WARNING]'dependencies.dependency.exclusions.exclusion.groupId'for net.sf.ehcache:ehcache-core:jar缺失。 @行36,列22
[WARNING]'dependencies.dependency.exclusions.exclusion.groupId'for net.sf.ehcache:ehcache-core:jar缺失。 @第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> 

任何想法如何,我可以解決這些?謝謝, - 戴夫

回答

1

只是你的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> 
+0

感謝您的反饋,但是「commons-logging」和「servlet-api」排除只列舉了一些例子嗎?如果不是的話,你是如何根據我得到的警告來弄清楚這些的? - 戴夫 – Dave 2011-04-04 13:14:18

+0

沒關係,我明白你的意思。一切正常。謝謝, - – Dave 2011-04-04 13:23:34