[jbosstools-issues] [JBoss JIRA] (JBIDE-13852) JBoss Java Project Source Container

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Mon Apr 29 15:09:53 EDT 2013


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

Snjezana Peco commented on JBIDE-13852:
---------------------------------------

JBoss Java Project Source Container (Debugging Arquillian tests)

When debugging an Arquillian test using a remote container, we usually do the following steps:

- create a project
- add the Arquillian support
- create a test
- configure Maven profiles
- create a JBoss server
- start the server in the debug mode
- start the test in the debug mode

We can debug the classes from the project's source by adding the Eclipse Java Project source container to the Source Lookup.

However, if we want to debug some Arquillian code in a server (remote) JVM, adding the Eclipse container won't be enough. The Arquillian classes aren't included in a JBoss server and the Java Project source container searches only the project's source folders.

If we can deploy the project, the JBoss Source Lookup plugin will solve all the classes from a mavenized archive so that we can debug the classes from such a project.

If we can't (or don't want to) deploy the project, we can use the JBoss Java Project Source Container from the arquillian eclipse plugin.

The JBoss Java Project Source Container is similar to the Java Project source container. The differ is that it searches classes from the project's classpath. The container solves source files for all the classes from a mavenized library included in the classpath.

The project can, but doesn't have to be a Maven project.

Test case:

- create a JBoss AS Server
- import the JBoss Central Java EE project (don't deploy it)
- set a breakpoint in the org.jboss.arquillian.junit.Arquillian.methodInvoker(FrameworkMethod, Object) method (at line 270 in Arquillian 1.0.3)
- start the server in the debug mode from JBT/JBDS
- debug MemberRegistrationTest

The Eclipse won't open the Arquillian source file, which happens because this method is called from within the server's JVM that doesn't know anything about the Java EE project.

Adding the Eclipse Java Project source container won't help because it adds only source folders.
The Remote Debug feature also won't help because we have started the server from JBT/JBDS so that we are already connected to the JVM.

- install/update the Source Lookup plugin from http://snjeza.github.com/jbosstools-central
- add the JBoss Java Project Source Container to the Source Lookup

You will be able to debug any class from the project.

It is possible to create different helper projects and add the container to different remote launch configurations.

The JBoss Java Project Source Container isn't related to the arquillian-eclipse feature and/or JBoss servers and can be added to any launch configuration.

See http://screencast.com/t/fHTO6ZP5dFh

                
> JBoss Java Project Source Container
> -----------------------------------
>
>                 Key: JBIDE-13852
>                 URL: https://issues.jboss.org/browse/JBIDE-13852
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: maven
>    Affects Versions: 4.1.0.Alpha1
>            Reporter: Snjezana Peco
>            Assignee: Snjezana Peco
>             Fix For: 4.1.0.Beta1
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list