在基於Maven的專案中,很多快取輸出在「target」檔案夾中。如果想建立專案部署,必須確保清理所有快取的輸出,從面能夠隨時獲得最新的部署。
要清理專案快取的輸出,發出以下命令:
mvn clean
可以檢視到輸出結果…
C:\worksp\yiibaiweb-core>mvn clean [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building yiibaiweb-core 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ yiibaiweb-core --- [INFO] Deleting C:\worksp\yiibaiweb-core\target [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.538 s [INFO] Finished at: 2015-11-03T07:32:48+08:00 [INFO] Final Memory: 6M/77M [INFO] ------------------------------------------------------------------------
當「mvn clean」執行,在「target」檔案夾中的一切都將被刪除。