Reputation: 5341
I have a maven project in Eclipse which has as a dependency another project which I've installed in my local repo with mvn clean install
. The dependency in pom:
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>mydependency</artifactId>
<version>1.0.0</version>
</dependency>
When I run the project from eclipse in tomcat, Run On Server, it runs fine If I don't have the other project loaded in eclipse(mydependency). If I import mydependency as a maven project in eclipse(I need to for debugging purposes), the project fails on runtime with ClassNotFoundException
. It cannot find classes of mydependency project.
What am I doing wrong?
P.S. I've tried the usual, clean, delete, reimport projects, switch workspaces, delete/recreate tomcat in eclipse, even switched eclipse installation...
Upvotes: 0
Views: 646
Reputation: 14649
First solution:
Choose on your project right-click-> Maven -> Disable workspace resolution
Now when you will debug the debugger will find the jar file - not the source. You has to attach source code to the library (choose java project)
Second solution
Run your project on tomcat as war file and debug remotely.
Third solution
Install JD-Eclipse . It is helpful, but sometimes the lines of code are not the same as decompiled.
Upvotes: 1