Maven 2 如何在ubuntu中安装maven clean插件

Maven 2 如何在ubuntu中安装maven clean插件,maven-2,Maven 2,我的maven版本是2.2.0 我想要maven clean插件,但这里是我得到的。我运行mvnclean命令查看是否有maven clean插件,但是该命令找不到安装它的资源 mvn clean Warning: JAVA_HOME environment variable is not set. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------

我的maven版本是2.2.0 我想要maven clean插件,但这里是我得到的。我运行mvnclean命令查看是否有maven clean插件,但是该命令找不到安装它的资源

mvn clean
Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2' from repository central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar. Return code is: 501
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command: 
    mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


  org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


  org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Apr 19 13:52:56 EDT 2021
[INFO] Final Memory: 4M/481M
[INFO] -----------------------------------
mvn清理
警告:未设置JAVA_HOME环境变量。
[信息]正在扫描项目。。。
[信息]------------------------------------------------------------------------
[信息]正在构建Maven默认项目
[信息]任务段:[清理]
[信息]------------------------------------------------------------------------
下载:http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[警告]无法从repository central获取资源“org.apache.maven.plugins:maven clean plugin:maven plugin:2.2”(http://repo1.maven.org/maven2):无法传输文件:http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar. 返回代码为:501
[信息]------------------------------------------------------------------------
[错误]生成失败
[信息]------------------------------------------------------------------------
[信息]找不到所需的插件:找不到插件-检查目标名称是否正确:无法从任何存储库下载工件
尝试从项目网站手动下载该文件。
然后,使用以下命令安装:
mvn安装:安装文件-DgroupId=org.apache.maven.plugins-DartifactId=maven clean plugin-Dversion=2.2-dpackage=maven plugin-Dfile=/path/to/file
或者,如果您拥有自己的存储库,则可以在其中部署文件:
mvn部署:部署文件-DgroupId=org.apache.maven.plugins-DartifactId=maven clean plugin-Dversion=2.2-dpackage=maven plugin-Dfile=/path/to/file-Durl=[url]-DrepositoryId=[id]
插件:maven清洁插件:maven插件:2.2
从指定的远程存储库:
中央的(http://repo1.maven.org/maven2)
插件:maven清洁插件:maven插件:2.2
从指定的远程存储库:
中央的(http://repo1.maven.org/maven2)
[信息]------------------------------------------------------------------------
[信息]有关更多信息,请使用-e开关运行Maven
[信息]------------------------------------------------------------------------
[信息]总时间:<1秒
[信息]完成时间:2021年4月19日星期一13:52:56美国东部夏令时
[信息]最终内存:4M/481M
[信息]-----------------------------------

再使用Maven 2.X的好理由?