maven报错:Failed to execute goal org.apache.maven.plugins:maven-source-plugin

夏落星空丶 2018-10-29 02:29:43
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-source-plugin:2.4:jar (attach-sources) on project DIM-Core: Execution attach-sources of goal org.apache.maven.plugins:maven-source-plugin:2.4:jar failed: Plugin org.apache.maven.plugins:maven-source-plugin:2.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.2.1, org.apache.maven:maven-artifact-manager:jar:2.2.1: Failure to find org.apache.maven:maven-project:jar:2.2.1 in http://172.21.20.25:8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :DIM-Core


		<plugins>
<!-- source attach plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>


百度了一圈,各种错误原因都试了。
jdk版本对应,环境变量配置正常。
...全文
1210 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
夏落星空丶 2018-10-29
  • 打赏
  • 举报
回复
有人吗。。本地有maven-source-plugin,版本号没错。JDK也没错
一直无法解决这个问题
咸哼酒家 2018-10-29
  • 打赏
  • 举报
回复
DIM项目的maven-source-plugin:2.4:jar 加载出错
应该是环境问题,先确认可以链接上maven服务,能够下载需要的包;
再JDK版本对应确认同步<java.version>1.8</java.version>
项目的JDK、workspace的JDK、pom.xml中配置的JDK
然后各种clean,关掉工具再打开,试试

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧