【发布时间】:2018-01-16 18:19:08
【问题描述】:
环境: 日食 4.4.2 雄猫:7 爪哇 1.7 行家3.5 已安装 STS 包。
这是我现在的状况。当我制作 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>
【问题讨论】:
-
看看Life cycles。应该能帮到你。
-
首先你能显示完整的 pom.xml 文件吗?此外,您正在定义非常旧的插件版本....最好使用可以在此处找到的最新版本:maven.apache.org/plugins
-
我改了之后,成功了!非常感谢:)