[jbosstools-issues] [JBoss JIRA] (JBIDE-14430) Run as arquillian seem to *always* ask for there being exactly one implementation of DeploymentContainer - can't it detect it ?

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Fri May 24 17:06:06 EDT 2013


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

Snjezana Peco edited comment on JBIDE-14430 at 5/24/13 5:04 PM:
----------------------------------------------------------------

Currently, Arquillian Eclipse detects the DeploymentContainer implementation(s) by scanning a classpath. It reports an error/a warning if there isn't any or there is more than one implementation. 

I propose to solve the issue in the following way:

- scan a classpath
- if there is no implementation of the DeployableContainer interface, it reports an error
- if there is exactly one implementation of this interface, nothing reported (the Arquillian environment is valid)
- if there is more than one implementation of this interface, we would check if there is the META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension resource on the classpath as well as if there is a class defined in this resource.
If both exist, nothing is reported 
Otherwise, Arquillian Eclipse reports an error

I am not sure if it is possible to check if the MyLoadableExtensionClass class activates the DeployableContainer interface correctly. Maybe we could analyze the b.service(DeployableContainer.class, MyDeployableContainer.class) method, check if the MyDeployableContainer.class exists and implements the DeployableContainer interface.
 
                
      was (Author: snjeza):
    Currently, Arquillian Eclipse detects the DeploymentContainer implementation(s) by scanning a classpath. It reports an error/a warning if there isn't any or there is more than one implementation. 

I propose to solve the issue in the following way:

- scan a classpath
- if there is no implementation of the DeploymentContainer interface, it reports an error
- if there is exactly one implementation of this interface, nothing reported (the Arquillian environment is valid)
- if there is more than one implementation of this interface, we would check if there is the META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension resource on the classpath as well as if there is a class defined in this resource.
If both exist, nothing is reported 
Otherwise, Arquillian Eclipse reports an error

I am not sure if it is possible to check if the MyLoadableExtensionClass class activates the DeploymentContainer interface correctly. Maybe we could analyze the b.service(DeplyableContainer.class, MyDeplyableContainer.class) method, check if the MyDeplyableContainer.class exists and implements the DeplyableContainer interface.
 
                  
> Run as arquillian seem to *always* ask for there being exactly one implementation of DeploymentContainer - can't it detect it ?
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-14430
>                 URL: https://issues.jboss.org/browse/JBIDE-14430
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: testing-tools
>            Reporter: Max Rydahl Andersen
>            Assignee: Snjezana Peco
>             Fix For: 4.1.0.Beta2
>
>
> can't we detect if there is more than one DeploymentContainer for Run As > Arquillian test or is that too slow ?
> Or at least show which profile is enabled or something to give user an idea what he is currently running with.

--
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