0

In theory, enabling Workspace resolution should make Eclipse to use the current project rather to go to the repository.

But it may fail, for different reasons. In my case, two projects A and A-test. Both of them have

  • many subprojects/modules
  • a main pom.xml that mentions such modules

I imported all of them in the same workspace.

Now, when running project in A-test, the only way to see the effect of a change in A is do a mvn install, so the jar is updated in local repository.

Enabling workspace resolution wasn't helping. Although, it sort of works when Debugging from Eclipse. A real mess.

So, how can I make sure projects in A-test are looking at Eclipse's A?

hectorpal
  • 711
  • 2
  • 6
  • 15
  • I didn't see this question clearly stated and answer. Some candidates were related to interactions between war and jar, or related to more specific issues. I tried to make the question more general. I don't think now it's a duplicated. – hectorpal Apr 30 '18 at 17:27
  • I created a new workspace and I got the project referring workspace version of the project. – Parthi Mar 22 '19 at 23:31

1 Answers1

0

It seems the workspace resolution is not exact. When projects are related through a common/global pom.xml, it seems to work.

So, in my case, per project in A-test, I did

  • Right click, Build Path, Config Build path
  • Tab "Projects": add all the A projects (in my case, that's safe)
  • Tab "Order and Export": make sure A projects are BEFORE projects in M2. I just move all the A projects to top.

Now, when I ran a project in A-test, it's looking at A.

NB: - Eclipse Oxygen - A does not depends on A-test, at all.

hectorpal
  • 711
  • 2
  • 6
  • 15