jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Integration for Eclipse
  • MNGECLIPSE-983

source lookup does not seem to work

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 0.9.8
  • Component/s: Maven Launcher
  • Labels:
    None

Description

Using latest m2e from trunk, source code lookup does not seem to work when debugging maven plugins. Manual changes to source lookup path are lost between maven executions.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    mylyn-context.zip
    19/Oct/08 6:24 PM
    125 kB
    Eugene Kuleshov
    1. XML File
      http%3A%2F%2Fjira.codehaus.org-75253.xml 2.59 MB
    Download Zip
    Show
    Zip Archive
    mylyn-context.zip
    19/Oct/08 6:24 PM
    125 kB
    Eugene Kuleshov

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Igor Fedorenko added a comment - 18/Oct/08 12:34 AM

This is very recent regression. Looks like this functionality was lost during maven launch refactoring, call to ILaunchConfiguration#setSourceLocator has been commented out.

The old code https://svn.sonatype.org/m2eclipse/tags/0.9.6.20080905-0917/org.maven.ide.eclipse/src/org/maven/ide/eclipse/internal/launch/MavenLaunchDelegate.java

The new code https://svn.sonatype.org/m2eclipse/trunk/org.maven.ide.eclipse.launching/src/org/maven/ide/eclipse/internal/launch/MavenLaunchDelegate.java

Please fix ASAP!

Show
Igor Fedorenko added a comment - 18/Oct/08 12:34 AM This is very recent regression. Looks like this functionality was lost during maven launch refactoring, call to ILaunchConfiguration#setSourceLocator has been commented out. The old code https://svn.sonatype.org/m2eclipse/tags/0.9.6.20080905-0917/org.maven.ide.eclipse/src/org/maven/ide/eclipse/internal/launch/MavenLaunchDelegate.java The new code https://svn.sonatype.org/m2eclipse/trunk/org.maven.ide.eclipse.launching/src/org/maven/ide/eclipse/internal/launch/MavenLaunchDelegate.java Please fix ASAP!
Hide
Permalink
Eugene Kuleshov added a comment - 18/Oct/08 8:12 PM

Igor, the commented code been replaced with protected method overwriting one from the super class. Can you please provide more details ASAP how to reproduce issue? I suppose I can roll those changes back, but I would like to understand what is happening there. Thanks.

Show
Eugene Kuleshov added a comment - 18/Oct/08 8:12 PM Igor, the commented code been replaced with protected method overwriting one from the super class. Can you please provide more details ASAP how to reproduce issue? I suppose I can roll those changes back, but I would like to understand what is happening there. Thanks.
Hide
Permalink
Igor Fedorenko added a comment - 18/Oct/08 8:40 PM

Follow Developing and debugging Maven plugins miniHOWTO to create trivial maven plugin and sample project that uses it. Make sure you can successfully run the build on the sample project, as described in the miniHOWTO (entire process should take <2 minutes).

Put a breakpoint inside HelperMojo#execute method and run the build in debug mode.

Problem 1. when execution stops at breakpoint, "source not found/edit source lookup path" page is shown instead of HelperMojo source.

Problem 2. if I press "edit source lookup path" button and make changes, these changes are lost next time I rerun the build.

Tested both on linux (e341+wtp302) and on windows (e340+wtp300).

Show
Igor Fedorenko added a comment - 18/Oct/08 8:40 PM Follow Developing and debugging Maven plugins miniHOWTO to create trivial maven plugin and sample project that uses it. Make sure you can successfully run the build on the sample project, as described in the miniHOWTO (entire process should take <2 minutes). Put a breakpoint inside HelperMojo#execute method and run the build in debug mode. Problem 1. when execution stops at breakpoint, "source not found/edit source lookup path" page is shown instead of HelperMojo source. Problem 2. if I press "edit source lookup path" button and make changes, these changes are lost next time I rerun the build. Tested both on linux (e341+wtp302) and on windows (e340+wtp300).
Hide
Permalink
Eugene Kuleshov added a comment - 19/Oct/08 6:24 PM

Thanks for the test project. Apparently, persisting source lookup patch wasn't working before. So, I've added org.eclipse.debug.core.sourceLocators and org.eclipse.debug.core.sourcePathComputers extension points to handle that and moved code from MavenLaunchDelegate.setDefaultSourceLocator() into newly added MavenSourcePathComputer, that is registered trough org.eclipse.debug.core.sourcePathComputers extension point. That fixed both issues you described, can you please verify if it working for you now. Thanks.

Show
Eugene Kuleshov added a comment - 19/Oct/08 6:24 PM Thanks for the test project. Apparently, persisting source lookup patch wasn't working before. So, I've added org.eclipse.debug.core.sourceLocators and org.eclipse.debug.core.sourcePathComputers extension points to handle that and moved code from MavenLaunchDelegate.setDefaultSourceLocator() into newly added MavenSourcePathComputer, that is registered trough org.eclipse.debug.core.sourcePathComputers extension point. That fixed both issues you described, can you please verify if it working for you now. Thanks.
Hide
Permalink
Igor Fedorenko added a comment - 20/Oct/08 12:01 PM

source lookup works with latest m2e from trunk. thank you for the quick fix.

Show
Igor Fedorenko added a comment - 20/Oct/08 12:01 PM source lookup works with latest m2e from trunk. thank you for the quick fix.
Hide
Permalink
Igor Fedorenko added a comment - 27/Oct/08 12:43 PM

Looks like I spoke too soon. When debugging tycho (see MNGECLIPSE-999), m2e shows wrong source file. Let me explain what I mean. Tycho dev workspace has the following projects

/tycho <= parent project
  tycho-osgi-components <= plain folder
    src/main/java/org/codehaus/tycho/osgitools/OsgiStateController.java <= just a file
/tycho-osgi-components <= module project
  src/main/java <= java source folder
    org.codehaus.tycho.osgitools <= java package
      OsgiStateController.java <= java source file

If I set a breakpoint at OsgiStateController.java:511 and debug tycho build, debugger stops at the breakpoint but shows "plain" OsgiStateController.java from tycho parent project, not from tycho-osgi-components module project. Because of this, most of debug-context sensitive operations, like step-into or conditional breakpoints, do not work. Makes maven launch debugging pretty much useless.

You can find tycho dev build environment setup instructions here: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+development+environment

Also, although I have not explicitly tried, I believe debugging maven itself as described in http://docs.codehaus.org/display/MAVEN/Running+and+debugging+Maven+2.1+from+m2e+workspace is affected too.

Show
Igor Fedorenko added a comment - 27/Oct/08 12:43 PM Looks like I spoke too soon. When debugging tycho (see MNGECLIPSE-999), m2e shows wrong source file. Let me explain what I mean. Tycho dev workspace has the following projects
/tycho <= parent project
  tycho-osgi-components <= plain folder
    src/main/java/org/codehaus/tycho/osgitools/OsgiStateController.java <= just a file
/tycho-osgi-components <= module project
  src/main/java <= java source folder
    org.codehaus.tycho.osgitools <= java package
      OsgiStateController.java <= java source file
If I set a breakpoint at OsgiStateController.java:511 and debug tycho build, debugger stops at the breakpoint but shows "plain" OsgiStateController.java from tycho parent project, not from tycho-osgi-components module project. Because of this, most of debug-context sensitive operations, like step-into or conditional breakpoints, do not work. Makes maven launch debugging pretty much useless. You can find tycho dev build environment setup instructions here: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+development+environment Also, although I have not explicitly tried, I believe debugging maven itself as described in http://docs.codehaus.org/display/MAVEN/Running+and+debugging+Maven+2.1+from+m2e+workspace is affected too.

People

  • Assignee:
    Igor Fedorenko
    Reporter:
    Igor Fedorenko
Vote (2)
Watch (2)

Dates

  • Created:
    18/Oct/08 12:27 AM
    Updated:
    18/Dec/08 3:36 PM

Time Tracking

Estimated:
0m
Original Estimate - 0 minutes
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
12h
Time Spent - 12 hours
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.