Le jeu. 27 août 2026 à 15:00, Martin Desruisseaux via dev <
[email protected]> a écrit :

> Le 27/08/2026 à 14:24, Romain Manni-Bucau a écrit :
>
> > let say I have a class AwesomeService, i want a java 8 impl
> (src/main/java)
> > which uses jackson 2 and a java 25 version which uses jackson 3
> > (META-INF/versions/25).
> > how do I handle that since both are literally like different codebase.
>
> I'm not aware of any way to handle that with standard Java. Maybe with
> Maven profiles, but it would force the use of Maven for running the
> application (not only for building).
>

the way it is done since mjar popped up is to have multiple compilation
cycles (2 javac commands to make it concrete) and a kind of overlay
assembly merging the compiled output with the right layout, each
compilation scope uses its own maven module so no issue by design.


>
>
> > in other words it seems we only handle java specificities but in today's
> > world the java version related specificities is about transitive
> > dependencies too so we should be able to configure a <dependencies> block
> > per source directory IMHO with overrides of the default block.
>
> Okay, but this is additional work beyond the support of --release
> option. It can be a discussion for future Maven developments.
>

The point is --release support is not needed - what is needed strictly
speaking is to respect a layout and fusion binaries folder in a single
archive.
Therefore the point to ask if our model is not oversimplistic for a
particular dependency free case? 🤔


>
>      Martin
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to