maven 上传项目或者jar到私服
2015-07-29 04:32
381 查看
首先到私服管理页面在配置中允许redeploy,maven 上传jar需要在某一个项目下,执行以下命令:
需要配置信息为:
.settings文件,可以喂maven安装目录,也可以是当前用户.m2下,一个是全局,一个是当前用户配置
如果要depoly某一个项目:
可以直接在项目下执行mvn deploy。
maven的jetty插件运行配置:
启动时可以制定端口:
mvn -Djetty.port=9999 jetty:run
mvn deploy:deploy-file -DgroupId=com.need.http -DartifactId=need-http -Dversion=0.1.0 -Dpackaging=jar -Dfile=/Users/shenyb/Downloads/http.jar Downloads -DrepositoryId=maven-repository-inner -Durl=http://ip:port/nexus/content/repositories/thirdparty/
需要配置信息为:
.settings文件,可以喂maven安装目录,也可以是当前用户.m2下,一个是全局,一个是当前用户配置
<server> <id>thirdparty</id> <username>admin</username> <password>admin123</password> <filePermissions>664</filePermissions> <directoryPermissions>775</directoryPermissions> </server>
如果要depoly某一个项目:
可以直接在项目下执行mvn deploy。
maven的jetty插件运行配置:
<!-- 添加此插件以便启动jetty --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.10</version> <configuration> <encoding>UTF-8</encoding> <scanIntervalSeconds>10</scanIntervalSeconds> <stopKey>foo</stopKey> <stopPort>9999</stopPort> </configuration> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <goal>run</goal> </goals> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> <daemon>true</daemon> </configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin>
启动时可以制定端口:
mvn -Djetty.port=9999 jetty:run
相关文章推荐
- ISLR 4.6 Lab: Logistic Regression, LDA, QDA, and KNN
- 基于C#解决OJ刷题之输入输出问题的总结(AKOJ1064-1071A+B问题汇总)
- 手机的web页面调用相机拍照上传
- VBS_动态数组详解
- wkhtmltopdf比较好用的html转pdf开源工具
- centos/redhat中文支持安装
- PHP学习 - 获取字符串子串
- [Leetcode]Kth Smallest Element in a BST
- 一个题目做了好久,java,想说爱你不容易!
- 手机安全卫士------查询号码归属地
- C. New Year Snowmen --优先队列
- MyGUI 解析
- 封装 链表
- cf 442B Andrey and Problem
- Cocos2d-x中文支持问题的解决办法
- python总结
- python总结
- Android官方命令深入分析之AVD Manager
- Android官方命令深入分析之AVD Manager
- 中国大学MOOC-翁恺-C语言程序设计习题集 08-2 到 10-2