tomka
tomka

Reputation: 385

m2eclipse dependency to open project in workspace is missing when run project

I'm working on an application which contains several modules. The modules are defined as independent Maven-projects and have dependencies between each other. For this question let us talk about the example that there exists project-a and project-b and project-b depends on project-a. This dependency is defined in the pom of project-b.

As long as only project-b is opened in Eclipse, m2eclipse includes the JAR-file of project-a to the class path and I can run project-b by pressing Ctrl + F11 (or select "Run" in Eclipse's "Run"-menu).

If both projects are opened in Eclipse, the dependency is resolved to the Eclipse-project and no more to the JAR-file and the Run-command will fail because m2eclipse obiously does not include project-a's target-folder to the class-path.

Does anyone has a hint how I can open both projects in Eclipse and let project-b run?

Tomka.

Upvotes: 0

Views: 297

Answers (1)

miq
miq

Reputation: 2766

I'm quite new to Maven & m2eclipse myself, but have you tried disabling the workspace resolution ([someproject] -> Maven -> Disable workspace resolution) ?

Upvotes: 1

Related Questions