当前位置:   article > 正文

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project

org.apache.maven.lifecycle.lifecycleexecutionexception: failed to execute go

1.目的

使用maven下载mqtt 相关jar,配置如下

<dependency>
		<groupId>org.eclipse.paho</groupId>
		<artifactId>mqtt-client</artifactId>
		<version>0.2.1</version>
</dependency>
  • 1
  • 2
  • 3
  • 4
  • 5

2.问题

Build errors for anjie31; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project anjie31: Could not resolve dependencies for project anjie31:anjie31:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.paho:mqtt-client:jar:0.4.0 in central (http://repo1.maven.org/maven2)

3.原因

在central仓库找不到。
因为mqtt的包在Spring Plugins Repository
在这里插入图片描述
在这里插入图片描述

4.解决方案

在这里插入图片描述

<repositories>
		<repository>
			<id>Spring Plugins Repository</id>
			<name>Spring Plugins Repository</name>
			<url>http://repo.spring.io/plugins-release/</url>
		</repository>

	</repositories>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/276446
推荐阅读
相关标签
  

闽ICP备14008679号