问 题:“Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean
最近换了台电脑,所以重新在IEDA上搭建Spring Boot环境,遇到一个问题,网上查了很久,又实践了一通,终于解决,这里把步骤详细记录下来。
[INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin
异常:Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project clean project 现象:eclipse在使用maven的tomcat控件编译java程序时,报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin
如: D:\code\IdeaProjects\maven-chat06>mvn org.apache.maven.plugins:maven-clean-plugin:help [INFO] Scanning 如: D:\code\IdeaProjects\maven-chat06>mvn org.apache.maven.plugins:maven-clean-plugin:help -Dgoal=help 周期中只有clean阶段默认绑定了maven-clean-plugin插件的clean目标。 maven-clean-plugin插件的clean目标作用就是删除项目的输出目录。 插件的clean目标,所以运行mvn clean的时候,实际上会调用maven-clean-plugin插件的clean目标来清理代码。
maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> <plugin> <artifactId>maven-clean-plugin moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin
Downloading: [http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin -2.4.1.pom](http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin -2.4.1.pom) [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin :2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:
Downloading: [http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin -2.4.1.pom](http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin -2.4.1.pom) [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin :2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:
如: D:\code\IdeaProjects\maven-chat06>mvn org.apache.maven.plugins:maven-clean-plugin:help -Dgoal=help 周期中只有clean阶段默认绑定了maven-clean-plugin插件的clean目标。 maven-clean-plugin插件的clean目标作用就是删除项目的输出目录。 插件的clean目标,所以运行mvn clean的时候,实际上会调用maven-clean-plugin插件的clean目标来清理代码。 :2.5:clean (default-clean) @ maven-chat06 --- 这个表示调用的插件是:maven-clean-plugin,版本是:2.5,插件的目标是:clean mvn
-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId
<scope>test</scope> </dependency> </dependencies> </project> 执行mvn clean,执行mvn clean需要下载maven-clean-plugin 注意:如果界面为空,表示没有下载,原因是之前下载过该插件到本地仓库,需要把本地仓库的maven-clean-plugin插件删除,我的本地仓库路径为D:\Reporsitory,所以需要删掉文件夹:D: \Reporsitory\org\apache\maven\plugins\maven-clean-plugin,然后重新构建即可。
] --------------------------------[ jar ]--------------------------------- 6 [INFO] 7 [INFO] --- maven-clean-plugin
背景: 问题1:新建的 maven项目,下载依赖包慢 问题2:遇到下载失败的问题 Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin
Maven defaults (may be moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin
] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin
] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin ] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin
clean如下: 生命周期阶段 插件目标 pre-clean clean maven-clean-plugin:clean post-clean site如下: 生命周期阶段 插件目标 pre-site
clean如下: 生命周期阶段 插件目标 pre-clean clean maven-clean-plugin:clean post-clean site如下:
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin artifactId> <version>2.2-beta-2</version> </plugin> <plugin> <artifactId>maven-clean-plugin
Maven defaults (may be moved to parent pom) --> <plugins> <plugin> <artifactId>maven-clean-plugin