首先下载(我比较喜欢包形式)
设置
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转换)