2 Replies Latest reply on Feb 18, 2014 5:11 PM by Clay Ferguson

    How to attach source in Eclipse for Debugging

    Clay Ferguson Newbie

      Does anyone know how to attach the jBPM  Source in Eclipse ?


      The  jBP Library shows up as "non-modifiable" when you open the Eclipse build path dialog and so it doesn't allow source attachment.  I have downloaded the source zip (jbpm-6.0.1.Final-src.zip), and I even discovered it has a pom.xml that can be built, and appears to build ok with Maven, but I'm stuck at that point, not knowing what to do next, and can find nothing online.  How can I start debugging the source (just stepping thru the code) in Eclipse?  I'm very experienced with Eclipse, I don't need baby steps.  I just need the "secret" to how to debug jBPM source, which does seem to be a secret.  Thanks in advance, to anyone who can help!

        • 1. Re: How to attach source in Eclipse for Debugging
          Maciej Swiderski Master

          Clay, best would be to use maven to bring the libs and sources when you start looking into debugging jbpm. That way all dependencies will be loaded as well - like hibernate, weld, etc. Which you would need manually add to eclipse classpath.



          1 of 1 people found this helpful
          • 2. Re: How to attach source in Eclipse for Debugging
            Clay Ferguson Newbie

            eclipse.pngMaceij, I noticed there was a pom.xml in the source distro, so I did figured out I should run maven on that, which runs fine.  However I don't know how to get the maven output into Eclipse project source path.  Can you please provide just the basic steps?  The normal ways of attaching source to Eclipse won't work because the jBPM Library is 'non-modifiable'.


            This image shows the non-modifiable message.  You also get that message if you try to modify the Build Path (the normal way of attaching source):



            ANSWER / SOLUTION

            I finally figured this out myself:  Once you build the source projects using maven (by running the pom.xml in the root, of the source), you then can right-click your eclipse project and go to Properties Dialog, then choose jBPM on the tree.  Choose "Enable Project Specific Settings", and create a runtime with "Configure Workspace Settings".  Your new runtime can simply be chosen to be the root folder of the source distro (the folder with the root source pom.xml in it), and that apparently can act as your "runtime", folder.  Once you pick it, you need to restart eclipse and then come BACK into this same dialog to actually select it in the drop down.  This is required.  Beware, If you didn't go to that dialog twice you did it wrong.  Now your editor still won't be able to see the source yet until you hover over at least one method name from a given jar and then click the "fix source" option (or something to that effect).  Also you should import each source project you need as a Maven project, into eclipse.