You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2020/03/12 14:16:56 UTC
Why jakarta.enterprise.cdi-api has "provided" scope ?
Hi,
Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
dependency [1] has provided
scope in dependency management ?
I'm hitting NoClassDefFoundError
for javax.enterprise.inject.spi.BeanManager while deploying
wicket-examples.war in Tomcat.
1.
https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
Re: Why jakarta.enterprise.cdi-api has "provided" scope ?
Posted by Martin Grigorov <mg...@apache.org>.
On Fri, Mar 13, 2020 at 10:22 AM Emond Papegaaij <em...@gmail.com>
wrote:
> Looking at the examples, I think the packaging currently is wrong. The
> examples package weld (cdi implementation), but rely on a provided
> cdi-api. The cdi-api should simply be added as a compile dependency to
> the examples.
>
I've made this change!
Thanks!
>
> Emond
>
> On Fri, Mar 13, 2020 at 2:59 AM Maxim Solodovnik <so...@gmail.com>
> wrote:
> >
> > Maybe this dependency can be added to dependencies of jetty-maven-plugin
> ?
> >
> > On Thu, 12 Mar 2020 at 23:23, Martin Grigorov <mg...@apache.org>
> wrote:
> > >
> > > On Thu, Mar 12, 2020, 16:41 Martijn Dashorst <
> martijn.dashorst@gmail.com>
> > > wrote:
> > >
> > > > Because it is, just like the servlet-api, a specification that is
> provided
> > > > by the container. When your container does not supply that
> specification,
> > > > you have to override the scope yourself and supply the API that way.
> E.G.
> > > > Wildfly supplies that API, as does Glassfish, etc.
> > > >
> > > > The examples could override the scope, but not sure if that is the
> correct
> > > > answer for all deployments.
> > > >
> > >
> > > Which deployments do we want to support for the examples?
> > > Since a while "mvn jetty:run" does not work because of CDI. Now Tomcat
> too.
> > > I suggest to either add this dependency or remove the CDI example.
> > >
> > >
> > > > Martijn
> > > >
> > > >
> > > > On Thu, Mar 12, 2020 at 3:17 PM Martin Grigorov <
> mgrigorov@apache.org>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
> > > > > dependency [1] has provided
> > > > > scope in dependency management ?
> > > > > I'm hitting NoClassDefFoundError
> > > > > for javax.enterprise.inject.spi.BeanManager while deploying
> > > > > wicket-examples.war in Tomcat.
> > > > >
> > > > >
> > > > > 1.
> > > > >
> > > > >
> > > >
> https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
> > > > >
> > > >
> > > >
> > > > --
> > > > Become a Wicket expert, learn from the best:
> http://wicketinaction.com
> > > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
>
Re: Why jakarta.enterprise.cdi-api has "provided" scope ?
Posted by Emond Papegaaij <em...@gmail.com>.
Looking at the examples, I think the packaging currently is wrong. The
examples package weld (cdi implementation), but rely on a provided
cdi-api. The cdi-api should simply be added as a compile dependency to
the examples.
Emond
On Fri, Mar 13, 2020 at 2:59 AM Maxim Solodovnik <so...@gmail.com> wrote:
>
> Maybe this dependency can be added to dependencies of jetty-maven-plugin ?
>
> On Thu, 12 Mar 2020 at 23:23, Martin Grigorov <mg...@apache.org> wrote:
> >
> > On Thu, Mar 12, 2020, 16:41 Martijn Dashorst <ma...@gmail.com>
> > wrote:
> >
> > > Because it is, just like the servlet-api, a specification that is provided
> > > by the container. When your container does not supply that specification,
> > > you have to override the scope yourself and supply the API that way. E.G.
> > > Wildfly supplies that API, as does Glassfish, etc.
> > >
> > > The examples could override the scope, but not sure if that is the correct
> > > answer for all deployments.
> > >
> >
> > Which deployments do we want to support for the examples?
> > Since a while "mvn jetty:run" does not work because of CDI. Now Tomcat too.
> > I suggest to either add this dependency or remove the CDI example.
> >
> >
> > > Martijn
> > >
> > >
> > > On Thu, Mar 12, 2020 at 3:17 PM Martin Grigorov <mg...@apache.org>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
> > > > dependency [1] has provided
> > > > scope in dependency management ?
> > > > I'm hitting NoClassDefFoundError
> > > > for javax.enterprise.inject.spi.BeanManager while deploying
> > > > wicket-examples.war in Tomcat.
> > > >
> > > >
> > > > 1.
> > > >
> > > >
> > > https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
> > > >
> > >
> > >
> > > --
> > > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > >
>
>
>
> --
> WBR
> Maxim aka solomax
Re: Why jakarta.enterprise.cdi-api has "provided" scope ?
Posted by Maxim Solodovnik <so...@gmail.com>.
Maybe this dependency can be added to dependencies of jetty-maven-plugin ?
On Thu, 12 Mar 2020 at 23:23, Martin Grigorov <mg...@apache.org> wrote:
>
> On Thu, Mar 12, 2020, 16:41 Martijn Dashorst <ma...@gmail.com>
> wrote:
>
> > Because it is, just like the servlet-api, a specification that is provided
> > by the container. When your container does not supply that specification,
> > you have to override the scope yourself and supply the API that way. E.G.
> > Wildfly supplies that API, as does Glassfish, etc.
> >
> > The examples could override the scope, but not sure if that is the correct
> > answer for all deployments.
> >
>
> Which deployments do we want to support for the examples?
> Since a while "mvn jetty:run" does not work because of CDI. Now Tomcat too.
> I suggest to either add this dependency or remove the CDI example.
>
>
> > Martijn
> >
> >
> > On Thu, Mar 12, 2020 at 3:17 PM Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
> > > dependency [1] has provided
> > > scope in dependency management ?
> > > I'm hitting NoClassDefFoundError
> > > for javax.enterprise.inject.spi.BeanManager while deploying
> > > wicket-examples.war in Tomcat.
> > >
> > >
> > > 1.
> > >
> > >
> > https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
> > >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> >
--
WBR
Maxim aka solomax
Re: Why jakarta.enterprise.cdi-api has "provided" scope ?
Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Mar 12, 2020, 16:41 Martijn Dashorst <ma...@gmail.com>
wrote:
> Because it is, just like the servlet-api, a specification that is provided
> by the container. When your container does not supply that specification,
> you have to override the scope yourself and supply the API that way. E.G.
> Wildfly supplies that API, as does Glassfish, etc.
>
> The examples could override the scope, but not sure if that is the correct
> answer for all deployments.
>
Which deployments do we want to support for the examples?
Since a while "mvn jetty:run" does not work because of CDI. Now Tomcat too.
I suggest to either add this dependency or remove the CDI example.
> Martijn
>
>
> On Thu, Mar 12, 2020 at 3:17 PM Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi,
> >
> > Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
> > dependency [1] has provided
> > scope in dependency management ?
> > I'm hitting NoClassDefFoundError
> > for javax.enterprise.inject.spi.BeanManager while deploying
> > wicket-examples.war in Tomcat.
> >
> >
> > 1.
> >
> >
> https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
> >
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
Re: Why jakarta.enterprise.cdi-api has "provided" scope ?
Posted by Martijn Dashorst <ma...@gmail.com>.
Because it is, just like the servlet-api, a specification that is provided
by the container. When your container does not supply that specification,
you have to override the scope yourself and supply the API that way. E.G.
Wildfly supplies that API, as does Glassfish, etc.
The examples could override the scope, but not sure if that is the correct
answer for all deployments.
Martijn
On Thu, Mar 12, 2020 at 3:17 PM Martin Grigorov <mg...@apache.org>
wrote:
> Hi,
>
> Does anyone know why jakarta.enterprise:jakarta.enterprise.cdi-api
> dependency [1] has provided
> scope in dependency management ?
> I'm hitting NoClassDefFoundError
> for javax.enterprise.inject.spi.BeanManager while deploying
> wicket-examples.war in Tomcat.
>
>
> 1.
>
> https://github.com/apache/wicket/blob/1245ee2998930f3b9169ca8afa4018d49e2346e4/pom.xml#L221-L226
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com