2017-08-09 65 views
0

環境: 的Eclipse 4.4.2 的Tomcat:7 的Java 1.7 行家安裝3.5 STS包。插件執行不屬於生命週期配置:org.apache.maven.plugins

這是我現在的狀況。當我創建Spring遺留項目(MVC)時,pom.xml中存在一些問題。

首先,在戰爭中發生錯誤,但在我清理Maven和更新後,錯誤消失了。但在此之後,發生錯誤的部分。我不知道如何解決它。

但奇怪的是,我昨天在我的其他筆記本電腦上也是這樣做的,沒有任何問題。

CentOS7 
java 1.8 
Eclipse 4.7.0 
Tomcat 8.5.16 

這裏是POM文件的部分

<plugin>     
//plugin execution not covered by lifecycle configuration:org.apache.maven.plugins:maven-compiler-plugin2.5.1:testCompile(execution:default-testComplile, phase:test-conpile)"). 

<groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.5.1</version> 
      <configuration> 
       <source>1.7</source> 
       <target>1.7</target> 
       <compilerArgument>-Xlint:all</compilerArgument> 
       <showWarnings>true</showWarnings> 
       <showDeprecation>true</showDeprecation> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 
      <version>1.2.1</version> 
      <configuration> 
       <mainClass>org.test.int1.Main</mainClass> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 
</project> 
+0

查看[生命週期](https://www.tutorialspoint.com/maven/maven_build_life_cycle.htm)。應該幫助你。 – Ayushya

+0

首先可以顯示完整的pom.xml文件?此外,你正在定義非常舊的插件版本....更好地使用最新版本,可以在這裏找到:https://maven.apache.org/plugins/ – khmarbaise

+0

我改變後,它的工作!非常感謝:) –

回答

0

您需要在生命週期中的一個插件,通過該錯誤指出。如果你想要將這些插件打包到war文件中,請將它們放在<packaging></packaging>中。但是你需要在生命週期中包含它。

+0

謝謝你的回覆! –

+0

如果您認爲我的答案可以幫助您解決問題,那麼您可以將其標記爲已接受的答案。 – Ayushya

相關問題