maven项目使用eclipse上传nexus私服

 公司架构调整,后期使用RocketMQ和spring boot进行项目开发。由于spring boot没有集成RocketMQ的start包,所以自己写了一个简单的rocketmq-spring-boot-start应用。在此记录将应用生成jar包上传maven私服过程中遇到的几个问题。

  首先回顾下上传过程中的配置:

 1、pom.xml的配置

	<build>
		<plugins>
			<!-- compile -->
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<configuration>
					<attach>true</attach>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<distributionManagement>
		<repository>
			<id>releases</id>
			<name>releases</name>
			<url>http://xxx:8081/repository/rocketmq-spring-boot-starter/</url>
		</repository>
	</distributionManagement>

 2、setting.xml的配置

	<server>
		<id>releases</id>
		<username>username</username>
		<password>password</password>
	</server>
	<server>
		<id>snapshots</id>
		<username>username</username>
		<password>password</password>
	</server>

 3、eclipse打包

 右击项目 -> Run As -> Run Configurations。Goals填上deploy,点击Run,就能直接上传maven私服。


 在引入项目时,发现rocketmq-spring-boot-start的jar包不能使用,核心代码BOOT-INF文件夹下面,引入其他项目后无法正常读取。

解决方法:去除pom.xml中的spring-boot插件再次打包



eclipse上传nexus私服配置参考:https://www.jianshu.com/p/f0c87c7d4353


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值