Adding custom maven project as dependency

I’m using eclipse with the m2eclipse plugin now I just want to resolve a – imho – easy problem: I’ve got two maven projects, I want to add project A as dependency to project B.

Well how do I achieve this in a manner way? If I add the project A to the build path of project B eclipse recognizes the classes but this project isn’t resolved by eclipse on build time.

I got it working by installing project A to my local repo and adding this as dependency to my pom. This works but is cumbersome because I always have to install a new version of project A when something changed.

Shouldn’t the plugin handle such a situation for me?

Answer

Providing that you have both maven projects open in your workbench then make sure you have the “Enable Workspace Resolution” option enabled in the Maven context menu.

Leave a Reply

Your email address will not be published. Required fields are marked *