BTW,
using mw 1.2.8  the jar/META-INF/beans.xml is:

<beans/>

while 1.2.9 is
bean-discovery-mode="none"

So is it possible to programmatic set scanning option in mw?

/hw

 lø., 30.11.2019 kl. 10.07 +0100, skrev Romain Manni-Bucau:
> Hmm, looks like the same we provide so not sure why you cant reuse
> it.
> 
> But anyway you can check what is put in the final properties in your
> jar and that it matches meecrowave spi.
> 
> You can also debug AnnotationFinder constructor to check what is
> found.
> 
> Also ensure your jar is not in exclusion list by default maybe (like
> a cdi-demo.jar since it starts with cdi ;))
> 
> 
> Le sam. 30 nov. 2019 à 09:39, Helge Waastad <[email protected]> a
> écrit :
> > Hi,
> > the transformer is:
> > 
> > https://gist.github.com/hwaastad/3eea474d9e93db24f244f38e79490ece
> > 
> > using com.github.jengelman.gradle.plugins:shadow:5.2.0
> > 
> > So are you saying that the default ordinal 100 would not work on
> > the
> > OWBTransformer?
> > 
> > /hw
> > 
> > fr., 29.11.2019 kl. 14.45 +0100, skrev Romain Manni-Bucau:
> > > Hi,
> > > 
> > > The OWBTransformer does not work if you dont handle ordinals in
> > > modifyOutputstream (see 
> > > 
> > https://github.com/apache/openwebbeans/tree/master/webbeans-gradle)
> > .
> > > This can break the runtime if not done.
> > > 
> > > Romain Manni-Bucau
> > > @rmannibucau |  Blog | Old Blog | Github | LinkedIn | Book
> > > 
> > > 
> > > Le ven. 29 nov. 2019 à 11:46, Helge Waastad <[email protected]> a
> > > écrit :
> > > > Hi,
> > > > I'll see about the extension.
> > > > 
> > > > I have'nt a public repo just yet, but the shadowjar config is:
> > > > ---
> > > > 
> > > > mergeServiceFiles()
> > > > 
> > > > transform(AppendingTransformer) {
> > > >     resource = 'META-INF/cxf/bus-extensions.txt'
> > > > }
> > > > transform(AppendingTransformer) {
> > > >     resource = 'log4j2.component.properties'
> > > > }
> > > > transform(Log4j2PluginsCacheFileTransformer)
> > > > 
> > > > transform(OpenWebBeansPropertiesTransformer) {
> > > >     resource = 'META-INF/openwebbeans/openwebbeans.properties'
> > > > }
> > > > 
> > > > transform(ServiceFileTransformer)
> > > > 
> > > > manifest {
> > > >     attributes 'Main-Class': 'org.waastad.Main'
> > > > }
> > > > ---
> > > > 
> > > > Using my own OpenWebBeansPropertiesTransformer which is
> > basically
> > > > the same as the openwebbeans one (never got the original to
> > work),
> > > > just using:
> > > > 
> > > > ---
> > > > @Override
> > > >     void transform(TransformerContext context) {
> > > >         Properties p = new Properties()
> > > >         try {
> > > >             p.load(context.is)
> > > >         } catch (IOException e) {
> > > >             throw new IllegalStateException(e);
> > > >         }
> > > >         configurations.add(p)
> > > >     }
> > > > 
> > > > ---
> > > > 
> > > > psvm:
> > > > builder.setTomcatScanning(true);
> > > >       builder.setTomcatAutoSetup(true);
> > > > 
> > > >       try (Meecrowave container = new
> > Meecrowave(builder).bake()) {
> > > >          container.await();
> > > >    }
> > > > ---
> > > > 
> > > > 
> > > > If this does'nt make sense, or is too limited for analysis,
> > I'll
> > > > see if I can make a sample.
> > > > 
> > > > Thx for your reply, BTW :-)
> > > > 
> > > > /hw
> > > > 
> > > > 
> > > > to., 28.11.2019 kl. 20.18 +0100, skrev Romain Manni-Bucau:
> > > > > Hi,
> > > > > 
> > > > > No real reason and I have cases where it works.
> > > > > Can it be a shade misconfig (like a missing beans.xml merge,
> > > > > module-info exclusion, excludee package etc...)?
> > > > > 
> > > > > Any way to get a reproducer?
> > > > > 
> > > > > Side note: trivial workaround is a cdi extension registering
> > the
> > > > > annitated type of jaxrs beans in beforebeandiscovery event.
> > > > > 
> > > > > Le jeu. 28 nov. 2019 à 19:24, Helge Waastad <
> > [email protected]> a
> > > > > écrit :
> > > > > > Hi,
> > > > > > I’ve just upgraded a simple rest project using
> > gradle/shadowjar
> > > > > > to meecrowave 1.2.9 and now it seems that the annotated
> > rest
> > > > > > services are not found.
> > > > > > 
> > > > > > If I add a beans.xml it’s OK again.
> > > > > > 
> > > > > > Is there a reason why?
> > > > > > 
> > > > > > /hw
> > > > > > 
> > > > > > Sendt fra min iPhone
> > > > 
> > > > -- 
> > > > 
> > > > Helge Waastad
> > > > - The Undelstad Cup Champion 2017
> > 
> 
> 

Reply via email to