http://mysun.iteye.com/blog/1435084
- 单独部署一个文件到repo
- mvn install:install-file -Dfile=[your file] -DgroupId=[xxxx] -DartifactId=[xxxx] -Dversion=[xxxx] -Dpackaging=[pom|jar|other]
- mvn deploy:deploy-file -Dfile=[your file] -DgroupId=[xxxx] -DartifactId=[xxxx] -Dversion=[xxxx] -Dpackaging=[pom|jar|other] -DrepositoryId=[id] -Durl=[repo url]
对于install命令来说,只有file参数是必选的,但是如果在本地库里面没有groupId、artifactId和version对应的目录,那么maven会要求传入这些参数,packaging则根据需要上传的文件类型指定。
对于deploy命令来说,file、repositoryId和url是必选的。其中repositoryId是指远程maven库的id,一般会配置在setting.xml文件里面,是在<server>标签下的那个id。url比较重要,如果错误的话,是无法上传的,一般来说我们可以在setting.xml文件的<server>标签下找到,但是这个<server>下的这个url不一定就是真正的maven库地址,如果这个url不行,那么可以尝试把这个url中的最后一个路径替换成<server>标签下<id>自标签的内容,一般来说是可以行的。如果再不行,就要文人了。其他的几个参数与install是一样的。
http://maven.apache.org/plugins/maven-install-plugin/
http://maven.apache.org/plugins/maven-deploy-plugin/
- 查看项目的间接依赖
- mvn project-info-reports:dependencies -X
一定要加上-X选项,否则在控制台上是不会打出来依赖的,只能在生成的报告里面看到依赖。
这个插件需要使用2.1以上版本的maven才能运行。
http://maven.apache.org/plugins/maven-project-info-reports-plugin/