简单介绍maven项目上传到nexus私服细节
2017-12-19 00:00
507 查看
1.上传到私服哪个仓库
<!-- 这个是发布到私服的时候在私服哪个仓库, SNAPSHOT是Snapshot仓库,如果是RELEASE则发布到releases仓库-->
<version>1.0.1-RELEASE</version>
<-- <version>1.0.1-SNAPSHOT</version> -->
<packaging>war</packaging> 发布的类型
2.上传到私服设置仓库用户名密码,防止非相关人员操作,默认密码是admin123
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
3.分销管理,发布到私服的仓库的id和链接地址
<distributionManagement>
<repository>
<!-- 发行版本 -->
<id>releases</id>--这里的id和url必须和nexus的仓库id一致
<url>http://127.0.0.1:8080/nexus-2.9.0/content/repositories/releases/</url>
</repository>
<!-- 发布到私服nexus的测试版本 -->
<snapshotRepository>
<id>snapshots</id>
<url>http://127.0.0.1:8080/nexus-2.9.0/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
4.乱码
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<argLine>-Dfile.encoding=UTF-8</argLine> --防止控制台输出乱码
</properties>
5.build 你的maven项目(是maven整合的web项目)
右键项目-->run as-->maven Build-->在Goals输入栏输入如下命令:
clean --------清除编译的加载文件
compile --------编译源文件
package --------打包
deploy ----发布到nexus私服
---------------------------------
如果报错了,可以通过 compile -x 命令打印错误
6.发布到私服的资源默认存放在:C:\Users\sonatype-work\nexus,c盘用户的文件夹下
<!-- 这个是发布到私服的时候在私服哪个仓库, SNAPSHOT是Snapshot仓库,如果是RELEASE则发布到releases仓库-->
<version>1.0.1-RELEASE</version>
<-- <version>1.0.1-SNAPSHOT</version> -->
<packaging>war</packaging> 发布的类型
2.上传到私服设置仓库用户名密码,防止非相关人员操作,默认密码是admin123
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
3.分销管理,发布到私服的仓库的id和链接地址
<distributionManagement>
<repository>
<!-- 发行版本 -->
<id>releases</id>--这里的id和url必须和nexus的仓库id一致
<url>http://127.0.0.1:8080/nexus-2.9.0/content/repositories/releases/</url>
</repository>
<!-- 发布到私服nexus的测试版本 -->
<snapshotRepository>
<id>snapshots</id>
<url>http://127.0.0.1:8080/nexus-2.9.0/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
4.乱码
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<argLine>-Dfile.encoding=UTF-8</argLine> --防止控制台输出乱码
</properties>
5.build 你的maven项目(是maven整合的web项目)
右键项目-->run as-->maven Build-->在Goals输入栏输入如下命令:
clean --------清除编译的加载文件
compile --------编译源文件
package --------打包
deploy ----发布到nexus私服
---------------------------------
如果报错了,可以通过 compile -x 命令打印错误
6.发布到私服的资源默认存放在:C:\Users\sonatype-work\nexus,c盘用户的文件夹下
相关文章推荐
- 简单介绍maven项目上传到nexus私服细节
- Maven创建并管理Web项目(上传Web项目的API的JAR到Nexus 私服上)
- MyEclipse 配置maven项目pom.xml设置 上传项目到nexus私服,通过中转仓库下载插件,以及nexus的配置
- Maven创建并管理Web项目(上传Web项目的API的JAR到Nexus 私服上)
- maven私服(nexus)的安装和仓库的简单介绍
- Nexus搭建Maven私服上传与下载项目
- 【项目管理与构建】Maven搭建私服——Nexus的详细介绍以及安装(四)
- 【项目管理与构建】Maven搭建私服——Nexus的详细介绍以及安装(四)
- maven第三节-nexus私服功能介绍
- maven上传jar到nexus私服仓库
- 安卓搭建nexus私服-3.androidstudio中项目上传到nexus仓库
- maven 上传项目或者jar到私服
- maven私服配置上传jar到nexus
- Maven 向私服nexus上传jar
- Maven项目构建工具和Nexus私服
- Java Maven项目之Nexus私服搭建和版本管理应用
- maven 项目上传私服pom配置
- reindex-maven 私服(nexus)架设以及项目管理中遇到的问题及解决方案(updating)
- Maven仓库—Nexus环境搭建及简单介绍
- 项目构建之maven篇:5.仓库及nexus创建私服-2