I\'ve downloaded the source for all the Maven JARs in my buildpath using Maven->Download Sources and mvn eclipse:eclipse -DdownloadSources=true
, which worked! W
Window->Preferences->JBoss Tools->Source Lookup
make sure you have check "Automatically add the JBoss Maven source container to all JBoss As launch configurations". and under "Automatically configure the Java Source Attachment", choose "Always".
this helps myself out of the problem.
I think I fixed this for myself by updating my Eclipse m2e. I think I had version ~1.2, and then updated to latest [as of writing] 1.6.2.
The Eclipse Bug comments helped me figure this out.
Now I can debug into my gquery-dnd-bundle-1.0.6!
The "target" maven project should emit it's source code before the "client" projects can have access to the source code. I solved the issue by using the maven-source-pluging in the "target" project: https://maven.apache.org/plugins/maven-source-plugin/index.html
Just use the following snippet in the pom.xml file of the target project, make a release, and use the release version into the pom.xml file of the client project. Then eclipse can automatically let you "jump" to the target project seamlesly:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${version.maven-source-plugin}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
Use External Maven instead of default Embedded in Debug Configurations dialogue.
Please see example screenshot below (menu Run -> Debug Configurations...):
Configure external Maven
Tested environment:
hpi:run
(sample Jenkins plugin)I found this com.ifedorenko.m2e.sourcelookup plugin. The link was provided in "Java Debugging: Source not found".
Go to Help > Install New Software ..
and use
http://ifedorenko.github.com/m2e-extras/
to search for the links. After installing this plugin I was finally able to debug the source code of dependencies.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${version.maven-source-plugin}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>