Discussion:
[jboss-user] [JBoss Tools] - CDI validator reporting ambiguity due to test classes
Shay Matasaro
2013-06-04 12:00:45 UTC
Permalink
Shay Matasaro [https://community.jboss.org/people/shay_matasaro] created the discussion

"CDI validator reporting ambiguity due to test classes"

To view the discussion, visit: https://community.jboss.org/message/821244#821244

--------------------------------------------------------------
Hi,

The CDI validator for src/main/java is processing  and showing warnings for beans and producers that are in src/test/java .

I have added an exclude line to the main beans.xml "^(.*)Test$"   but the errors are still showing.

Does the CDI validator take beans.xml into account?

Is there a way to distinguish between main and test validation?

Thanks,
Shay
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821244#821244]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Alexey Kazakov
2013-06-04 16:46:19 UTC
Permalink
Alexey Kazakov [https://community.jboss.org/people/akazakov] created the discussion

"Re: CDI validator reporting ambiguity due to test classes"

To view the discussion, visit: https://community.jboss.org/message/821334#821334

--------------------------------------------------------------
Hi,
It is a limitation in Eclipse. A project can have the only one classpath. See https://issues.jboss.org/browse/JBIDE-13138 https://issues.jboss.org/browse/JBIDE-13138
And yes, CDI validation does take beans.xml into account. But it does not support exclusions in beans.xml (it's not a part of CDI spec). Are you using weld:exclude extension?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821334#821334]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Shay Matasaro
2013-06-05 11:15:44 UTC
Permalink
Shay Matasaro [https://community.jboss.org/people/shay_matasaro] created the discussion

"Re: CDI validator reporting ambiguity due to test classes"

To view the discussion, visit: https://community.jboss.org/message/821498#821498

--------------------------------------------------------------
Hi,

Yes i am using :

<weld:exclude pattern="^(.*)Test$"/>

Thanks,
Shay
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821498#821498]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Alexey Kazakov
2013-06-05 16:51:09 UTC
Permalink
Alexey Kazakov [https://community.jboss.org/people/akazakov] created the discussion

"Re: CDI validator reporting ambiguity due to test classes"

To view the discussion, visit: https://community.jboss.org/message/821561#821561

--------------------------------------------------------------
I created an issue https://issues.jboss.org/browse/JBIDE-14765 https://issues.jboss.org/browse/JBIDE-14765
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821561#821561]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Loading...