Bug 980492 - beans.xml in test classpath is not taken into account by JBDS
Summary: beans.xml in test classpath is not taken into account by JBDS
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Arquillian
Version: 2.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Rodney Russ
QA Contact: thradec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-02 14:09 UTC by Ron Šmeral
Modified: 2016-11-01 01:37 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-01 18:37:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 982193 0 unspecified CLOSED DeltaSpike Quickstarts imported in JBDS show warnings 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBIDE-15085 0 None None None Never
Red Hat Issue Tracker wfk2-132 0 Major Closed beans.xml in test classpath is not taken into account by JBDS 2015-02-20 18:19:53 UTC

Internal Links: 982193

Description Ron Šmeral 2013-07-02 14:09:39 UTC
Description of problem:
JBDS shows a warning for all injection points in Arquillian test classes: 
"No bean is eligible for injection to the injection point [JSR-299 §5.2.1]"
The warning is shown even when there is beans.xml in src/test/resources and even for beans that reside in src/test/java or src/main/java.

Version-Release number of selected component (if applicable):
WFK 2.3.0.CR1
JBDS 7.0.0.Beta2b

How reproducible:
Import a project with CDI beans and an Arquillian test, e.g. the cdi-add-interceptor-binding quickstart.

Actual results:
The warning is shown for the field 
@Inject TestableParameterLog testableParameterLog;
in ParameterLoggerTest.

Expected results:
The warning doesn't make much sense since the bean will be injected into the test by Arquillian's enricher. Even though this is probably beyond the capability of the standard CDI validator in JBDS, an intelligent IDE could be expected to handle this.

Additional info:
A possible workaround is to add @SuppressWarnings("cdi-ambiguous-dependency") to the field or the class.

Comment 1 Ron Šmeral 2013-07-02 15:42:14 UTC
It seems the problem is somewhere else: JBDS doesn't care about beans.xml in src/test/resources.

Comment 2 Rodney Russ 2013-08-01 18:37:27 UTC
Migrated to Jira

Comment 5 JBoss JIRA Server 2015-02-20 18:19:53 UTC
Rodney Russ <rruss> updated the status of jira WFK2-132 to Closed


Note You need to log in before you can comment on or make changes to this bug.