【记录】Nexus上传到私库的pom文件配置案例

本文详细介绍了如何在两种不同情况下(有主类和无主类)配置上传pom文件到Nexus私库的步骤,包括具体的配置案例,帮助开发者更好地管理自己的依赖库。
摘要由CSDN通过智能技术生成

有主类的情况

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.16.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>vip.juner.system</groupId>
	<artifactId>cloud-config</artifactId>
	<version>${project.version}</version>
	<name>cloud-config</name>
	<description>cloud-config</description>

	<distributionManagement>
		<repository>
			<uniqueVersion>false</uniqueVersion>
			<id>releases</id>
			<layout>default</layout>
			<name>Nexus Snapshot</name>
			<url>http://127.0.0.1:8081/repository/maven-releases/</url>
		</repository>
		<snapshotRepository>
			<uniqueVersion>false</uniqueVersion>
			<id>snapshots</id><!-- id 需要对应 settings 中的配置 id -->
			<layout>default</layout>
			<name>Nexus Snapshot</name>
			<url>http://127.0.0.1:8081/repository/maven-snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

	<repositories>
		<repository>
			<id>nexus</id>
			<name>local-nexus</name>
			<url>http://127.0.0.1:8081/repository/maven-public/</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>

	<properties>
		<!-- /****** 一、基本配置 *******/ -->
		<project.version>0.0.10</project.version>
		<java.version>1.8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值