weijenli
weijenli

Reputation: 75

Eclipse how to refer debug to local code but not in jar

I have two projects A and B. Project A includes B as a library. However, A normally refers to a jar that is built from B over maven.

Now I changed a few lines in project B and wants to debug, but the debugger always goes to the class in the jar, which is the old code.

How do I tell Eclipse to use project B? I cannot remove the jar because it has other libraries that I need.

Thanks.

Upvotes: 0

Views: 396

Answers (2)

asg
asg

Reputation: 2456

Change your project B pom.xml version to something unique say - PROJECTB-SNAPHOT.

Clean and build project B using eclipse. Now use this version of project B as a dependency version in your project A pom.xml.

Your project A will start referring to project B which is a SNAPSHOT version and which also contains your latest code.

Upvotes: 1

Andreas
Andreas

Reputation: 159106

In Eclipse, right-click project A and select "Build Path" > "Configure Build Path". Select "Projects" tab and add project B if not already there. Then select "Order and Export" tab and move project B up, so it's listed before your Jar files.

Upvotes: 1

Related Questions