[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [hudson-dev] Supporting Java EE 7 (CDI 1.1) and later
|
I learned unknown annotations are silently ignored if not available on the classpath as Stuart described, so we won't need to include any new jars. It should be OK to just add dependency on cdi-api with scope 'provided' so that we can use CDI annotations only at compile-time. I hope I can make a new patch in a few days.
2015/01/29 2:39 "Winston Prakash" <
winston.prakash@xxxxxxxxx>:
Hi Kaz,
I have created this wiki page (just cut and paste some info from
this e-mail). Can you please update it with all the findings and
detail the solution we are going to use.
We have to get approval from Eclipse to add any new jar we bundle.
So list the new jars that will be included in the war.
Thanks for all the work.
- Winston
Just FYI, I got an error from Weld even for
org.hudsonci.service.internal.ServiceSupport.setHudson that
it has unsatisfied dependency. As you can see, class
ServiceSupport has no annotations, just its method setHudson
has @Inject.
Accoding to the CDI 1.1 spec, in the default 'annotated' bean
discovery mode, ServiceSupport should not be discovered as a
bean since it has no annotations. So it appears that Weld is
trying to process all @Inject annotations even for classes
that have no bean defining annotations, as long as they have
constructors without parameters, with which they are
considered as managed beans. It is unsolicited in my opinion,
but it actually works as such.
If we try to resolve this issue without CDI compatibility, we
will have to use Guice-equivalent of javax.inject.Inject, if
any.
_______________________________________________
hudson-dev mailing list
hudson-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/hudson-dev