首先下載(我比較喜歡包形式)
設置
MAVEN_HOME
JAVA_HOME
add MAVEN_HOME/bin to your path (optional)
資源庫的設置,可以找一個已存在的資源庫,節約下載時間。
maven.jar中的defaults.properties
maven.home.local = ${maven.home}/local
maven -v 測試運行
命令
maven java:compile - this will compile the code and check for errors - nothing more
maven test - this will compile the code and tests, then run all of the unit tests
maven jar - this will build a JAR from your code, after running the tests as above
maven site - even now, you can generate a site in target/docs and see what it will look like
maven clean
創建一個project
maven genapp 生成模板
配置文件:
project.xml 主配置
中文問題:
進入maven.jar,發現org\apache\maven\messages目錄下的messages_zh_CN.properties里面直接寫了中文字符。刪掉它!就不會亂碼了。(或者用native2ascii轉換)