camel-k
camel-k copied to clipboard
Add mvnd build strategy
Resolves 2nd part of #2832
Release Note
feat(builder): Add Maven Daemon support
cc @astefanutti
RUN temp=$(mktemp -d) \
&& curl -Lso "$temp"/mvnd.zip https://github.com/mvndaemon/mvnd/releases/download/0.8.0/mvnd-0.8.0-linux-amd64.zip \
&& unzip -d "$temp" "$temp"/mvnd.zip \
&& rm -v "$temp"/mvnd.zip \
&& mv "$temp"/mvnd /usr/bin/mvnd \
&& rm -rf "$temp"
This is the current way we are trying to have both the maven and mvnd versions in the operator image by replacing the embedded maven version in mvnd, which is not quite accurate. Do we have any other ways where we can achieve this? @gnodet @ppalaga your suggestions could come handy. Thanks!
Not 100% sure what is your aim, @SubhasmitaSw
To install mvnd, you need not only the mvnd
binary. You also need the mvn
directory from the distribution zip and the mvnd
binary must be informed where to find that mvn directory via ~/.m2/mvnd.properties
or via env. var MVND_HOME
.
Not 100% sure what is your aim, @SubhasmitaSw To install mvnd, you need not only the
mvnd
binary. You also need themvn
directory from the distribution zip and themvnd
binary must be informed where to find that mvn directory via~/.m2/mvnd.properties
or via env. varMVND_HOME
.
@ppalaga The Camel K operator image will have both Maven and Maven Daemon. We were wondering whether it's possible to avoid having two Maven versions packaged, that are the standard Maven one and the embedded one into the Maven Daemon distribution. Is there a way to instruct the Maven daemon to use an external Maven installation?
Is there a way to instruct the Maven daemon to use an external Maven installation?
mvnd currently does not support that use case. It would be hard and the result would be very fragile.
gnu-sed
is failing, causing the post processing steps to abort returning an error like:
➜ camel-k git:(mvnd-support) ✗ make generate-crd
go: creating new go.mod: module tmp
CONTROLLER_GEN=/Users/chikki/go/bin/controller-gen ./script/gen_crd.sh
sed: 1: "/creationTimestamp:/a\ ...": extra characters after \ at the end of a command
make: *** [generate-crd] Error 1
Hi @SubhasmitaSw do you plan to continue work on this change ?
Yes @claudio4j I'll whack this up in the weekends, sorry for the delay.
This PR has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!