Nov 2nd, 2011, 09:58 AM
Maven issues with STS
I'm using Maven for all of my projects. Within STS I get missing dependency errors and I find that often I need to go outside STS and run Maven from command line. Actually the projects are working, but STS seems to be out of sync, thinking that dependencies are missing when in fact they are not. The main result is red error markings that seem to be meaningless. My conclusion is that the Maven plugin integration is not very robust. Is there anything I can do to "pretty things up?"
thanks to the STS team for their great work,
Nov 2nd, 2011, 10:12 AM
What kind of meaningless error markings do you see? Are they 'plugin lifecycle' related messages? Did you check the FAQ on m2e and STS 2.8: http://forum.springsource.org/showth....0-and-m2e-FAQ ?
I would hope an 'Update project configuration' would sort things out if it is something other than lifecycle issues, if it is lifecycle messages see the FAQ and decide whether to execute or ignore them (if you can't find the plugins).
If nothing works, perhaps we need a jira raising to investigate. ( issuetracker.springsource.com/browse/STS )
Nov 2nd, 2011, 11:03 AM
Generally I see the project marked with red "x" and when expanded the POM is marked with red "x". In the POM editor the dependency hierarchy pane shows "Project read error" and the two panes are empty. The dependencies pane show an error: "ArtifactDescriptionException: Failed to read artifact descriptor for..." I'm fairly new to Maven but I'm quickly becoming a fan of this project object model concept. We use Maven/TeamCity/SVN for our automated build process and it's great.
Nov 2nd, 2011, 11:16 AM
Lawrence, can you take a look at your Problems view? Sometimes the errors are explained better there.
Nov 3rd, 2011, 10:22 AM
I'm aware of the Problems view - it shows missing dependencies that aren't really missing and this:
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for com.jamonapi:jamon:jar:2.7: ArtifactResolutionException: Failure to transfer com.jamonapi:jamonom:2.7 from... (repo location)
But when I run it from command line - no errors - very odd :-)
Nov 3rd, 2011, 11:43 AM
One possibility is that you are using a different version of maven inside of STS from outside. And maybe the two versions are behaving a bit differently.
Also, what version of STS and m2eclipse are you using?
Nov 3rd, 2011, 12:06 PM
You are correct. My M2_HOME environment variable is pointing to maven 2.2.1 - I'm using a fresh copy of STS 2.8.0 - it uses maven 3.0.2, I believe.
Tags for this Thread