简体   繁体   中英

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

Hello I am new to 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. However, I have searched the POM.xml and project files and no where do I see that it defines 2.5 as a dependency. So why does it keep looking for 2.5? What are some different ways I could fix it aside from putting 2.5 on the nexus?

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:

which means if you change the Maven version it happen that versions of the plugins to be used is changed. So it's really necessary to defined the used plugin versions via a pluginManagement within a company pom.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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