日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

Maven命令行使用:mvn clean install(安装)

發布時間:2025/7/14 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Maven命令行使用:mvn clean install(安装) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

先把命令行切換到Maven項目的根目錄,比如:/d/xxxwork/java/maven-test,然后執行命令:

$ mvn clean install

執行結果如下:

[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building rtp-front 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rtp-front --- [INFO] Deleting D:\xxxwork\Java\maven-test\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rtp-front --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rtp-front --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent! [INFO] Compiling 13 source files to D:\xxxwork\Java\maven-test\target\classes [WARNING] /D:/xxxwork/Java/maven-test/src/main/java/ReadOnly.java: 某些輸入文件使用了未經檢查或不安全的操作。 [WARNING] /D:/xxxwork/Java/maven-test/src/main/java/ReadOnly.java: 有關詳細信息, 請使用 -Xlint:unchecked 重新編譯。 [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rtp-front --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\xxxwork\Java\maven-test\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ rtp-front --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rtp-front --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ rtp-front --- [INFO] Building jar: D:\xxxwork\Java\maven-test\target\rtp-front-1.0-SNAPSHOT.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ rtp-front --- [INFO] Installing D:\xxxwork\Java\maven-test\target\rtp-front-1.0-SNAPSHOT.jar to d:\Users\xyz\.m2\repository\com\xyz\finance\rtp\rtp-front\1.0-SNAPSHOT\rtp-front-1.0-SNAPSHOT.jar [INFO] Installing D:\xxxwork\Java\maven-test\pom.xml to d:\Users\xyz\.m2\repository\com\xyz\finance\rtp\rtp-front\1.0-SNAPSHOT\rtp-front-1.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.892 s [INFO] Finished at: 2016-11-14T16:10:35+08:00 [INFO] Final Memory: 15M/76M [INFO] ------------------------------------------------------------------------

?執行順序:

1、使用清理插件:maven-clean-plugin:2.5執行清理刪除已有target目錄(版本2.5);

2、使用資源插件:maven-resources-plugin:2.6執行資源文件的處理(版本2.6);

3、使用編譯插件:maven-compiler-plugin:3.1編譯所有源文件生成class文件至target\classes目錄下(版本3.1);

4、使用資源插件:maven-resources-plugin:2.6執行測試資源文件的處理(版本2.6);

5、使用編譯插件:maven-compiler-plugin:3.1編譯測試目錄下的所有源代碼(版本3.1);

6、使用插件:maven-surefire-plugin:2.12運行測試用例(版本2.12);

7、使用插件:maven-jar-plugin:2.4對編譯后生成的文件進行打包,包名稱默認為:artifactId-version,比如本例生成的jar文件:rtp-front-1.0-SNAPSHOT,包文件保存在target目錄下;

8、使用maven-install-plugin:2.4把上述打包生成的jar包和pom文件安裝到本地的倉庫中(一般默認的路徑為:%HOMEPATH%\.m2\repository\pom中groupId按.分隔的目錄層次\pom中的artifactId\pom中的version\jar包的名稱)。

?

轉載于:https://www.cnblogs.com/frankyou/p/6062414.html

總結

以上是生活随笔為你收集整理的Maven命令行使用:mvn clean install(安装)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。