Re: Help with Shading on ActiveMQ Artemis

2021-11-19 Thread Clebert Suconic
Thank you so much.. this really helped me a lot. I will still shade json into my artemis-commons package, but now that I understand what's going on.. I will never depend on renamed classes between the packages.. that really helps. Perhaps this little bit of information should be added to the

Re: Help with Shading on ActiveMQ Artemis

2021-11-18 Thread Matt Benson
I have not yet analyzed your example in full detail, but typically the idea with shaded code is that your original code will refer to the classes of the package to be shaded by their original names (that's assuming you're relocating packages, which you are in this case; otherwise the names would

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Francois Marot
Hello Clebert I hope my comment will help you. In my experience, using the shade plugin is tricky because the rule of thumb I came up with is: "your shaded artifacts must be the last artifact to be built in your multi modules Maven project". Which can read "you must not depend onto your shaded

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Clebert Suconic
although it's marked as an improvement for the IDEs to pick this up.. but I see other issues internally... On Wed, Nov 17, 2021 at 2:46 PM Clebert Suconic wrote: > > well.. that is a bug: > > https://issues.apache.org/jira/browse/MSHADE-269 > > On Wed, Nov 17, 2021 at 10:57 AM Clebert Suconic >

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Clebert Suconic
well.. that is a bug: https://issues.apache.org/jira/browse/MSHADE-269 On Wed, Nov 17, 2021 at 10:57 AM Clebert Suconic wrote: > > I had to play with optional to have the dependency not picked up internally. > > It would be a lot easier if shaded worked internally without requiring > a

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Clebert Suconic
I had to play with optional to have the dependency not picked up internally. It would be a lot easier if shaded worked internally without requiring a downstream dependency. As a matter of fact, I just looked on Netty, and they shade org.jctools into netty-common, which is the same pattern that

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Clebert Suconic
Right.. This should happen by default. and it will only work if I'm using the shaded jar outside of my project. However if I use it within my project it will not work at all. I have created a minimal version of my issue on this github project:

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Matt Benson
https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createDependencyReducedPom On Tue, Nov 16, 2021, 10:47 PM Clebert Suconic wrote: > I’m not sure how you mean. > > Just get the Pom at the source level or am intermediate build process ? > > > How to do that ? > > On Tue, Nov

Re: Help with Shading on ActiveMQ Artemis

2021-11-16 Thread Clebert Suconic
I’m not sure how you mean. Just get the Pom at the source level or am intermediate build process ? How to do that ? On Tue, Nov 16, 2021 at 11:34 PM Matt Benson wrote: > You probably want to rewrite the pom, using the property provided by the > shade goal for this purpose. > > Matt > > On

Re: Help with Shading on ActiveMQ Artemis

2021-11-16 Thread Matt Benson
You probably want to rewrite the pom, using the property provided by the shade goal for this purpose. Matt On Tue, Nov 16, 2021, 7:48 PM Clebert Suconic wrote: > I am trying to create a component within ActiveMQ Artemis that would > shade johnzon and javax.json. > > That component should then

Help with Shading on ActiveMQ Artemis

2021-11-16 Thread Clebert Suconic
I am trying to create a component within ActiveMQ Artemis that would shade johnzon and javax.json. That component should then be used by other components within Artemis. I'm doing that because some users want to use javax.json and others want to use jakarta.json on their runtimes. Since we only