Step 1 of 4: Choose Issues


Key Summary Description

JBIDE-13228 Make sure the CDI Maven configurator supports CDI 1.1

Make sure the CDI Maven configurator supports CDI 1.1. At the very least add ITs to make sure it works as expected.


JBIDE-13228 Wrong CDI warnings

I moved to WildFly (and therefore to Weld 2.0.CR1 resp CDI 1.1). I'm getting warnings about wrong dependency injection of these classes:

  • HttpSession
  • HttpServletRequest

But the CDI 1.1 spec allows them to be injected (and my web app works fine).

I'll attach a stacktrace to illustrate the wrong warnings


JBIDE-13228 CDI 1.1 allows injecting bean that may have null values to a point with primitive type
Consider producer and injection point.

@Produces @SomeQualifier Boolean b() {
    return null;
@Inject @SomeQualifier boolean b;

CDI 1.0 treated that injection as a deployment problem.
CDI 1.1 lets primitive field/parameter be assigned to the default value when injected bean has null value.


JBIDE-13228 Support annotation @Priority

An alternative can be annotated with Priority.

@Alternative @Priority(APPLICATION+100)
public class MockAsynchronousService extends AsynchronousService {

That makes it enabled without declaring it in beans.xml.
Value of Priority is used to resolve ambiguous dependencies.


JBIDE-13228 Support annotation @Vetoed

If class is anotated @Vetoed or if its package is annotated @Vetoed, then it is excluded from managed beans.

Test with archive.
1. Import project /
2. Open class test.a.Test
3. Check that injection @Inject Venus venus; is not satisfied because class test.d.planets.Venus in lib2/cdiastro.jar is annotated @Vetoed.
4. Check that injection @Inject Sirius sirius; is not satisfied because package test.d.stars in lib2/cdiastro.jar is annotated @Vetoed. (jar file contains sources to check that).

Test with sources.
1. Import project /
2. Open class org.jboss.jsr299.tck.tests.jbt.vetoed.Injections
3. Check that @Inject Pond pond; is not satisfied because org.jboss.jsr299.tck.tests.jbt.vetoed.Pond is annotated @Vetoed.
4. Check that @Inject Black black; is not satisfied because package org.jboss.jsr299.tck.tests.jbt.vetoed.seas is annotated @Vetoed (see
5. Check that @Inject Caspian caspian; is satisfied because package org.jboss.jsr299.tck.tests.jbt.vetoed.seas.inner is not annotated @Vetoed although it is a subpackage of an annotated package.
6. Check that @Inject Pond.Creek creek; is satisfied because class Pond.Creek is not annotated @Vetoed although it is a nested class in an annotated class.


JBIDE-13228 Support CDI 1.1 in New CDI Project wizard


JBIDE-13228 Implement bean discovery in explicit and implicit archives

1. Create CDI 1.1 project.
2. Create other CDI 1.1 projects and export them to jars or to class folders,
these projects may vary in beans.xml:

  • no beans.xml
  • empty beans.xml
  • beans.xml with 1.0 schema
  • beans.xml with 1.1 schema and all possible values
    of bean-discovery-mode attribute ("annotated"/"none"/"all")

and have classes with and without scope declaration.

3. Add these archives to classpath of project (1).
4. Create a bean with injections to types defined in the archives.
5. Check that injection is satisfied or not according to bean discovery rules given by specification.


  • Archive has no beans.xml: only annotated beans will be resolved;
  • Archive has empty beans.xml, or beans.xml with 1.0 schema: all beans will be resolved;
  • Archive has beans.xml with version 1.1: beans will be resolved according to the value of bean-discovery-attribute.

JBIDE-13228 Support beans.xml 1.1

1. Create an Eclipse project and copy to it file jbosstools-javaee/cdi/tests/
2. Open it with JBoss Tools XML editor.

Check that Tree tab displays subtitle 'Beans XML 1.1 Editor' and is not in the error mode.
Check that excludes in scan, classes in interceptors, decorators and alternatives, and stereotypes in alternatives are displayed correctly.
Check that you can add such elements by actions on Tree tab.