[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: Maven extensions and shared code
From:       jebeaudet () gmail ! com
Date:       2021-10-12 13:12:10
Message-ID: CANm9npQiReA87SOH8LmjBtu3MzMAx5dwFBpDDoqGNci9FVPbHw () mail ! gmail ! com
[Download RAW message or body]


Hey,

There might be other ways to do this but what I did was I built a custom
image with some special configuration. You could also try mounting a volume
to the /lib directory (something like
https://stackoverflow.com/questions/47519309/mount-an-empty-folder-in-host-to-a-non-empty-folder-in-docker).
 Here is the Dockerfile I use for the named locks with redisson (most jars
are omitted for clarity) :
FROM maven:3.8.1-openjdk-11-slim

RUN mkdir -p /usr/share/maven/lib/ext/redisson/
RUN sed -i '/.*${maven.conf}\/logging/a load
${maven.home}/lib/ext/redisson/*.jar' usr/share/maven/bin/m2.conf

RUN wget -P /usr/share/maven/lib/ext/redisson/
https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.7/byte-buddy-1.10.7.jar

So I build an image with this and push it to a repository (docker hub, ECR,
etc.) and use it in my CI instances.

On Tue, Oct 12, 2021 at 2:09 AM torsten.liermann@googlemail.com.INVALID
<torsten.liermann@googlemail.com.invalid> wrote:

> Hi,
> 
> Is there a possibility that several extensions share code without having
> to install it in the maven/lib directory?
> 
> I want to use maven in Docker for a build and don't see the possibility of
> installing jars before the build starts.
> 
> In my case a common code base is necessary because several extensions
> implement ModelProcessor.
> 
> Thanks for hints
> Torsten
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic