This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Project X is missing required Java project Y - But Maven is managing dependencies? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Project X is missing required Java project Y - But Maven is managing dependencies?" Watch "Project X is missing required Java project Y - But Maven is managing dependencies?" New topic
Author

Project X is missing required Java project Y - But Maven is managing dependencies?

Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 78

I'm new to Maven, Spring and JEE and starting a new job on a probation period (so be gentle!

I understand that Maven manages the build and oversees everything from compilation to later stages such as deployment. When I do a Maven build on a project of ours, Eclipse gives me the error in the subject of this thread. Why would a project be required and who / what is requiring it? The build was succesful (although there is a red exclamation mark on the project).
Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 78

Extra Info: The project does exist in the workspace. But as I checked it out from SVN, I prepended the name with [trunk] so that later checkouts from branch won't conflict.
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2277
    
  28

How did you import your project into eclipse? Are you using eclipse-maven-plugin?
Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 78

Hi Jayesh. Yes, I used the SVN Exploring view to import it to the project space and m2e to build. I have removed the project dependencies and added them to the .pom file as maven dependencies, which seems to be working better (that is, I'm getting new errors now ). So is it just a badly made project that had Eclipse project specific dependencies defined when they should have been maven dependencies?
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2277
    
  28

Oh yes. You have your fix. Your dependencies should always be added to the pom, and not to the eclipse project. M2E will automatically import your maven dependencies into your eclipse project.
Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 78

Thank you Jayesh A Lalwani!
 
Don't get me started about those stupid light bulbs.
 
subject: Project X is missing required Java project Y - But Maven is managing dependencies?
 
Similar Threads
Maven target folder is empty when using Eclipse M2 plugin
Can some one please explain why do i need MAVEN here
Build a java application using Maven
how to configure my already existing project in Maven
maven configuration for compiling a java project in eclips