把dao放到私服上,然后service从私服上下载
来源:互联网 发布:淘宝直播小二 编辑:程序博客网 时间:2024/05/29 06:56
1.需要在客户端即部署dao工程的电脑上配置 maven环境,并修改 settings.xml 文件,配置连接私服的用户和密码 。
此用户名和密码用于私服校验,因为私服需要知道上传都 的账号和密码 是否和私服中的账号和密码 一致。
添加到settings.xml中
<server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server>
2 . 配置项目pom.xml
配置私服仓库的地址,本公司的自己的jar包会上传到私服的宿主仓库,根据工程的版本号决定上传到哪个宿主仓库,如果版本为release则上传到私服的release仓库,如果版本为snapshot则上传到私服的snapshot仓库
添加到pom.xml中
<distributionManagement> <repository> <id>releases</id> <url>http://localhost:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <url>http://localhost:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
注意:pom.xml这里 和 settings.xml 配置 对应!
3 .执行deploy命令发布到私服
从私服上下载
1.修改settings.xml
<profile> <!--profile的id--> <id>dev</id> <repositories> <repository> <!--仓库id,repositories可以配置多个仓库,保证id不重复--> <id>nexus</id> <!--仓库地址,即nexus仓库组的地址--> <url>http://localhost:8081/nexus/content/groups/public/</url> <!--是否下载releases构件--> <releases> <enabled>true</enabled> </releases> <!--是否下载snapshots构件--> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 --> <pluginRepository> <!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 --> <id>public</id> <name>Public Repositories</name> <url>http://localhost:8081/nexus/content/groups/public/</url> </pluginRepository> </pluginRepositories> </profile>
激活上面的代码
<activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles>
第二步 删除本地仓库中的dao
第三步 update service工程,出现以下信息说明已经成功
阅读全文
0 0
- 把dao放到私服上,然后service从私服上下载
- Android把百度定位放到service里面
- @Service、@Repository注解是放到service或者dao类的实现类还是接口类中
- 把db数据库放到assert下,然后拷贝到某个地方使用
- java 实现生成文件 然后把文件放到共享文件夹下面 smb
- 点击notification把应用从后台放到前台
- 点击notification把应用从后台放到前台
- dao&service
- c#如何把文件夹压缩打包然后下载
- 把文件下载到本地然后pod install
- c#如何把文件夹压缩打包然后下载
- 从键盘输入一批学生的数据,然后把…
- 安卓:启动service,下载网络图片,并将图片存放到内存卡,保存成功后发出广播提醒,然后从SD卡读出显示
- 把音量放到最大
- 把本地文件放到服务器端
- Unity 从服务器下载图片保存本地然后下次读取
- 判断是否登陆然后从服务器下载一个文件
- 怎么把从mysql数据库中去取出来的数据放到xml文件
- Linux 查看文件或文件夹大小
- git上传和下载githubs上的项目
- Hibernate学习---检索优化
- Android 动画之 ---- View Animation (视图动画,补间动画)
- 微信神兽大厅12牛牛源码搭建
- 把dao放到私服上,然后service从私服上下载
- 关于java反射的个人理解
- CentOS 6.8 安装mysql5.7
- Oracle数据库的常用操作总结
- Boost笔记-boost使用方式
- Javascript模块化编程(三):require.js的用法
- CMU与FAIR联合发布非局部神经网络,有效提升视频分类、对象分割、姿态估计结果
- sort-cut-wc详解
- 【转】linux下杀死进程(kill)的N种方法