Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate

新建Maven工程报错:Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate

 问题原因是没有跳过测试,解决方法有两种:

一:命令行

mvn clean package -Dmaven.test.skip=true

二:在pom文件中配置

<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-archetype-plugin</artifactId>  
        <version>3.1.1</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin> 

其他类似的问题解决方法也大体如此,命令行很方便,配置pom文件需要根据具体问题来修改。

原文地址:https://www.cnblogs.com/shiyueyangne/p/14240501.html