Fórum

Eclipse Indigo, m2e debugging source lookup problem

Piotr N, modificado 11 Anos atrás.

Eclipse Indigo, m2e debugging source lookup problem

New Member Postagens: 2 Data de Entrada: 27/02/11 Postagens Recentes
Hi there!

I've been struggling with source lookup issue on maven dependencies for some time and couldn't find an answer. There is a similar problem described here http://jira.codehaus.org/browse/MNGECLIPSE-983 but I'm not sure if my problem is really connected with M2E because I also tried this on IAM and it also occured.

My projects are standard maven projects. I use M2E to manage maven dependency classpath container in eclipse. I deploy projects to liferay using bash script (mvn install and then copy .war to liferay deploy folder). In eclipse under Server view I configured liferay as Liferay v6.0 CE Server type available from Liferay IDE. In liferay launch configuration the source lookup is set to all projects in workspace. I start the server in debug mode from eclipse. If it hits a breakpoint in class which is directly in workspace project it shows its source code. However when I set a breakpoint in some maven dependency it show its source code for a short second and then shows window with message "Source not found". The source jars are assigned to maven dependencies (I can open any class from maven dependencies and see the code). The only way to attach the source code so the debugger can see it, is to Edit source lookup path and add External archive and point the source jar from .m2/repository folder. I have to do this for every library (pointing to .m2/repository and selecting Search subfolders doesn't work). However, I still cannot inspect or evaluate expressions on variables on sources attached this way because I get this message:

Unable to evaluate the selected expression:

To perform an evaluation, an expression must be compiled in the context of a Java project's build path. The current execution context is not associated with a Java project in the workspace.

Has anyone had similar issues? Did you manage to solve them? I've also tried using Tomcat server type instead of Liferay but with no luck emoticon
Piotr N, modificado 11 Anos atrás.

RE: Eclipse Indigo, m2e debugging source lookup problem

New Member Postagens: 2 Data de Entrada: 27/02/11 Postagens Recentes
I've found what was the problem. The webapp was deplyed from bash script by copying the .war file to liferay deploy directory. Jowever, it should be deployed through eclipse Server view by right clicking the server and 'Add and Remove...' window.