6 Replies Latest reply on Mar 4, 2008 6:41 AM by maxandersen

    Source path in build path libraries not retained

    ffreemarket

      Hi,

      When I add a external folder to the build path configuration for Libraries to specify the Source Attachment, the path is not retained after the properties dialog window is closed. This is in the Eclipse workbench
      for Jboss Developer Studio 1.0.0 GA. This is quite annoying as you must reenter the path again when debugging code.

      Project -> build path configuration -> java build path -> libraries,

      open jar -> Source attachment -> external folder.

      Curiously enough, the apache tomcat 6 library jars retain the source attachment while all other libraries lose them. Anyone else find this?

      Thanks,
      Henry

        • 1. Re: Source path in build path libraries not retained
          maxandersen

          I don't follow you completely on what you do here.

          could you write down the steps in a jira with what happens and what you expected....maybe use jinq or something similar to show the steps.

          • 2. Re: Source path in build path libraries not retained
            freemarket

            Hi,

            Steps to follow:

            in project explorer for your typical dynamic web project with jsf 1.2:
            right click on project -> build path -> configure build path

            in Properties dialog box:
            pick Java Build Path
            click on Libraries tab

            pick a library - eg. SUN-RI (JSF library - user defined)
            open library
            open jar
            click on source attachment
            click on edit button
            click on external folder and select directory path
            click ok to save information

            repeat above steps to verify source path to jar still exists.
            Lo and behold, it has vanished, source attachment is back to (none).

            This behavior exists for all JSF libraries that I have defined, eg.
            iBatis, JSTL, richfaces, facelets. I know the source is correct for
            when I am debugging a thread and I want to trace into facelets, I supply the directory path when prompted and can follow the thread into this body of code. The only library in which the source attachment does not seem to vanish is in the apache tomcat 6
            libraries.

            Hopefully that was clearer.

            Regards,
            Henry

            • 3. Re: Source path in build path libraries not retained
              maxandersen

              you bumped into https://bugs.eclipse.org/bugs/show_bug.cgi?id=202177

              workaround: use normal user libraries if you want source attachments.

              • 4. Re: Source path in build path libraries not retained
                freemarket

                gotcha. I didn't think to look under eclipse's bugzilla only looked under jboss jira for 3rd party.

                I'll try user libs.

                Regards,
                Henry

                • 5. Re: Source path in build path libraries not retained

                  sorry for my newbie question to this thread, but:
                  I need to attach source code for hibernate3.jar (to debug)
                  how can I do that?
                  in as stated above it's not directly possible (and in the Libraries tab of the Java Build Path, the Source attachment of hiberante3.jar is not modifiable)
                  so how can I attach a source code?

                  I also cannot remove the hibernate3.jar from the 'All JBoss Libraries' library.
                  So do I need to remove the complete library and add ALL included .jars to my project manually, just to get the source of one single .jar?

                  • 6. Re: Source path in build path libraries not retained
                    maxandersen

                    For the moment yes....it sucks i now ,(

                    Alternatively you can just add a single entry for hibernate3.jar and have it duplicated. would not affect anything (unless you use a different version of the jar ,)