下载地址
http://maven.apache.org/download.cgi
环境变量
sudo vim /etc/profile.d/maven-env.sh
export M2_HOME=/opt/maven
export PATH=$PATH:${M2_HOME}/binsource maven-env.sh
mvn -v
配置文件
vim /opt/maven/conf/settings.xml
<localRepository>/media/donny/Ubuntu/repository</localRepository>
<mirror>
<id>alimaven</id> <mirrorOf>*</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror>
mvn help:system 下载基本system文件
mvn install 按pom.xml 下载jar包
mvn -X clean install 按pom.xml 强制下载jar包
mvn dependency:tree -Dverbose -Dincludes=org.apache.avro:avro 查看依赖
mvn install -Dmaven.test.skip=true
Maven pom.xml 详解 http://www.cnblogs.com/sharpest/p/5969566.html
http://mvnrepository.com/
http://maven.aliyun.com/nexus/#welcome
添加本地jar到Maven仓库 mvn install:install-file -Dfile=algs4.jar -DgroupId=edu.princeton.cs.algs4 -DartifactId=algs4 -Dversion=1.0 -Dpackaging=jar
<!-- algs4 -->
<dependency> <groupId>edu.princeton.cs.algs4</groupId> <artifactId>algs4</artifactId> <version>1.0</version> </dependency>