Gogs:可以实现fork + 代码提交 + 代码框架java
Nexus:进行jar包的版本管理,私服下载jar包共享jar包git
Maven:在客户端进行模块管理和批量操做spring
settings.xml
apache
<project> <!-- 用户名密码 --> <servers> <server> <id>nexus-releases</id> <username>admin</username> <password>xxxxxxx</password> </server> <server> <id>nexus-snapshots</id> <username>deployment</username> <password>xxxxxxx</password> </server> </servers> <!-- 镜像仓库配置 --> <mirrors> <mirror> <id>repo-nexus</id> <url>http://127.0.0.1:8081/nexus/content/repositories/central/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <!-- 私服配置 --> <profile> <id>repo</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>repo</id> <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>repo</id> <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> </project>
pom.xml
缓存
<project> <!-- 构建管理配置私服 --> <distributionManagement> <repository> <id>nexus-releases</id> <name>Nexus Release FRepository</name> <url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>nexus-snapshots</id> <name>Nexus Shapshots Repository</name> <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> <!-- git的版本管理控制 --> <scm> <connection>scm:git:http://127.0.0.1:3062/wulonghuai/maven_module.git</connection> <developerConnection>scm:git:http://127.0.0.1:3062/wulonghuai/maven_module.git</developerConnection> <url>http://127.0.0.1:3062/wulonghuai/maven_module/src/master</url> </scm> <!-- 插件配置 --> <build> <plugins> <!-- maven release 发布插件--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.3</version> <configuration> <tagNameFormat>v@{project.version}</tagNameFormat> <username>username</username> <password>password</password> <branchBase>master</branchBase> </configuration> </plugin> </plugins> </build> </project>
在mave项目目录下,对应配置的pom.xml文件下面springboot
clean package -U deploy -Dmaven.test.skip=true # BUILD SUCCESS即为上传成功
第一步:release:prepare:打包前的准备工做服务器
# 执行发布准备命令 release:prepare # 确认maven仓库的release版本号,回车为默认值 What is the release version for "mavenmodule"? (com.wlh:mavenmodule) 1.3: : # 确认scm中的仓库的tag标签版本号,回车为默认值 What is SCM release tag or label for "mavenmodule"? (com.wlh:mavenmodule) v1.3: : # 确认下一个开发版本的快照版本编号 What is the new development version for "mavenmodule"? (com.wlh:mavenmodule) 1.4-SNAPSHOT: :
后悔药:release:rollback
在顺北阶段发生错误的时候,就须要这个命令了,这个命令执行会去作如下这些事情框架
# 执行回滚命令 release:rollback # 会降本的的分支进行删除,可是服务器上的分支不会删除,须要手动经过工具进行删除命令 release:prepare
最后一步:release:perform
若是确认无误了之后,就能够执行perform命令了maven
# 将源代码上传到服务器了 release:perform
去spring的框架上面看了下,springboot仍是用maven进行管理依赖,而spring框架就是用gradle。
后来看了下dubbo也是用maven插件的方式进行版本发布,因此看来路子是没有错误的,哈哈哈。工具
华为云和Sonatype联合发布的中国官方Maven中央仓库