简体   繁体   English

如何在Spring / Maven项目中调试此构建失败?

[英]How do I debug this Build Failure in my Spring/Maven project?

Hello I am new to Java & Maven. 您好,我是Java和Maven的新手。 I'm trying to build a project locally and keep getting the same error: 我正在尝试在本地构建项目,并不断收到相同的错误:

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 in nexus http://x.x.x.x:xxxx/nexus/content/groups/public) -> [Help 1]

I checked in my nexus repository in that directory and we do not have a 2.5 folder for maven-clean-plugin. 我在该目录中的nexus存储库中签入,但没有用于maven-clean-plugin的2.5文件夹。 However, I have searched the POM.xml and project files and no where do I see that it defines 2.5 as a dependency. 但是,我已经搜索了POM.xml和项目文件,并且没有在哪里看到它将2.5定义为依赖项。 So why does it keep looking for 2.5? 那么,为什么它继续寻找2.5? What are some different ways I could fix it aside from putting 2.5 on the nexus? 除了将2.5放在关联上之外,我还可以通过哪些其他方式修复它?

The first thing is based on your post that you didn't pinned the versions of your plugins in your own build which means Maven itself takes care of it and it uses those version which a defined in Maven itself which you can read in the following documentations: 第一件事是基于您的帖子,您没有在自己的构建中固定插件的版本,这意味着Maven会自己处理,并且使用Maven本身定义的版本,您可以在以下文档中阅读这些版本:

which means if you change the Maven version it happen that versions of the plugins to be used is changed. 这意味着,如果您更改了Maven版本,则碰巧要使用的插件版本也会更改。 So it's really necessary to defined the used plugin versions via a pluginManagement within a company pom. 因此,确实有必要通过公司pom中的pluginManagement定义使用的插件版本。

Furthermore your message shows me that you seemed to be having some problems to access either your internal repository manager cause it can't download the needed artifacts which should be solved. 此外,您的消息告诉我,您访问内部存储库管理器似乎遇到了一些问题,原因是它无法下载应解决的所需工件。

Update: (Missing maven-clean-plugin) 更新:(缺少maven-clean-plugin)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM