[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-9309) Easily adding full JBoss AS source

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Wed Jul 27 19:59:23 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617168#comment-12617168 ] 

Snjezana Peco commented on JBIDE-9309:
--------------------------------------

I have created a feature that contains a source container for adding the source code of JBoss AS servers.
Currently, the feature supports JBoss AS 7.
The plugin requires Eclipse 3.7, JBoss AS Tools and m2e 1.0.

Usage:
If you want to debug JBoss AS sources, you need to add the "JBoss AS7 Source Container" to a launch configuration (the JBoss AS 7 launch configuration or Remote Java Application launch configuration). The source container requires you to enter JBoss AS 7 home. All you need to do is to download the binary distribution of JBoss AS 7, unpack it to some directory and enter the directory when adding the source container. It is not necessary to download any source code. The source container will automatically download the JBoss AS 7 sources when they are required.
It is recommended to add this container to the end of the source container list, since it searches a lot of jars and can affect performance.
You have to set the JBoss Maven repository to the global maven settings file or create at least one project containing the JBoss Maven Repository (https://repository.jboss.org/nexus/content/groups/public-jboss/). 

The source container works the following way:
- examines if a class is included in a binary jar within the JBoss AS distribution. Currently it searches jboss-modules.jar and all the jars in the bundles and modules directory.
- if such a jar is found, the container tries to find maven coordinates using the Nexus indexer. If they aren't found using the Nexus indexer, it tries to find them in META-INF/maven/*/*/pom.properties. If the library is created with maven, this file contains its maven coordinates
- when the maven coordinates are found, the source container configures the source artifact of the library, downloads it if necessary and adds it to the source container of the type external archive. This new source container will be further used for source lookup.

You can automatically add the JBoss AS7 Source Container to all JBoss AS7 launch configurations using the Window>Preferences>JBoss Tools>Source Lookup preferences page. 
When debugging the server using the Remote Java Application or JBoss Tools Remote Debug plugin (JBIDE-8548), the container has to be added manually.

The update site is here: https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite
The source code: https://github.com/snjeza/jbossas-sourcelookup


> Easily adding full JBoss AS source
> ----------------------------------
>
>                 Key: JBIDE-9309
>                 URL: https://issues.jboss.org/browse/JBIDE-9309
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: JBossAS
>            Reporter: arjan tijms
>            Assignee: Snjezana Peco
>              Labels: debugging, source
>             Fix For: 3.3.0.M3
>
>
> The JBoss AS server runtime from JBoss tools adds a library container to the classpath of an Eclipse project. This container provides a large amount of jar files that make up JBoss AS itself and the Java EE services it offers.
> Attaching the source code for this is notoriously difficult. Because it concerns a large amount of jar files, attaching source code for each jar is a rather tedious job. 
> For JBoss AS 5, the fact that the location of jars in the source archive was completely different from the structure exposed in Eclipse or the binary build of JBoss AS, made it very hard to actually locate the correct source jar. Sometimes even names were different, making it even harder. 
> For JBoss AS 6, the source archive does not even contain the source for the majority of the JBoss AS artifacts. Source for 'core functionality' (from the point of view of the Java EE developer), like Servlet and JSF is missing. The user has to hunt the Internet to find the correct source for the correct version that JBoss AS 6 uses. This makes an already tedious job even more tedious.
> I would like to request functionality where the user can point to a single _jboss-src.xyz_ file that contains all sources. JBoss tools should then automatically attach the right source from the archive to the right jar from the library container. Alternatively the user could point to a maven repository (but this should not make the Eclipse project dependent on maven).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list