Hi, yes, I've tested a really simple rest example in maven aswell and the fat-jar/META-INF/beans.xml for 1.2.8:
<beans /> while in 1.2.9: <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" version="2.0" bean-discovery-mode="none"/> off course, this is the beans.xml that comes with the meecrowave-core jar. I noticed that the change is related to the MEECROWAVE-206 so what is the procedure now for scanning rest endpoints?(or scan packages) as far as I can see, the current openwebbeans props transformer uses an "ancient" 1.2.3 version of the gradle shadow plugin and Im using 5.2.0. Should maybe be updated? /hw ti., 03.12.2019 kl. 07.41 +0100, skrev Mark Struberg: > With an empty beans.xml ALL classes have to be scanned. > If we do anything else then we introduced a BIG bug. > > Or do you mean your _final_ beans.xml (after shading) now has a bean- > discovery-mode="none" and before it was just empty? > > > > Using my own OpenWebBeansPropertiesTransformer which is basically > > the same as the > > openwebbeans one (never got the original to work), just using: > > Is this working now Ofer Romains tips? > If still not, can you please create a ticket for it? txs! > > LieGrue, > strub > > > > Am 30.11.2019 um 11:47 schrieb Romain Manni-Bucau < > > [email protected] > > >: > > > > Yes but you can also control your selected beans.xml in shadow > > plugin, easier ;) > > > > Wonder if you shouldnt do a transform(new xxx()) for the built in > > transformer, dont recall clearly but think it is what i used > > > > Le sam. 30 nov. 2019 à 11:45, Helge Waastad < > > [email protected] > > > a écrit : > > 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 > > > > > > > > -- Helge Waastad - The Undelstad Cup Champion 2017
