[
https://issues.jboss.org/browse/JBIDE-13799?page=com.atlassian.jira.plugi...
]
Snjezana Peco commented on JBIDE-13799:
---------------------------------------
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. The container
probably has to be moved to the JBoss Source Lookup plugin.
See
http://screencast.com/t/fHTO6ZP5dFh
Source Lookup enhancements
--------------------------
Key: JBIDE-13799
URL:
https://issues.jboss.org/browse/JBIDE-13799
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: maven
Affects Versions: 4.1.0.Alpha1
Reporter: Snjezana Peco
Assignee: Snjezana Peco
The PR includes the following enhancements:
- AS 7.2/EAP 6.1 are now recognized correctly
- the fix for the issue caused by changing the editor ID for ClassFileEdtor in 3.8/4.2
- the fix for the ConcurrentModificationException exception
- included libraries can be filtered - jsf 1.2 and hibernate 3 will be excluded by
default for JBoss AS Container
- JBoss Runtimes now can be included in the Java Search (this feature has been
implemented in a similar way to adding PDE plugins to the Java Search)
- JBoss Java Project Source Container
See
http://screencast.com/t/39LHqYx5m
Screenshot shows debugging the WeldBootstrap class in JBoss AS 7.1 and JBoss AS 7.2.
Note:
You have to have some deployment on the servers in order the WeldBootstrap class to be
created.
You can add more JBoss servers to the Java Search, but it is the best to use only one at
a time because of the performance reason.
The "Automatically add the JBoss Maven source container to all JBoss AS launch
configurations" and "Include the following JBoss Servers in the Java
Search" checkboxes aren't related. The first checkbox adds the source container
that enables finding a Java source file when debugging, the second enables finding a Java
source file using the Java Search (using the "Open type" command, for instance).
--
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