maven 打包项目成war报错
[ERROR] Failed to execute goal org.apache.maven.plugins2.2:war (default-war) on project tomcat_demo2: Execution default-war of goal org.apache.maven.plugins
2.2:war failed: Unable to load the mojo ‘war’ in the plugin ‘org.apache.maven.plugins
2.2’ due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Cannot access defaults field of Properties
在pom.xml里,
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</build>
还没有评论,来说两句吧...