astefanutti commented on code in PR #3427:
URL: https://github.com/apache/camel-k/pull/3427#discussion_r917967781
##########
pkg/util/maven/maven_command.go:
##########
@@ -47,8 +48,14 @@ func (c *Command) Do(ctx context.Context) error {
if err := generateProjectStructure(c.context, c.project); err != nil {
return err
}
-
- mvnCmd := "mvnd"
+
+ mvnCmd := ""
+ switch c.context.Strategy {
+ case "maven":
Review Comment:
I'd suggest to change it to the `default` case that sets it to `mvn`.
##########
pkg/apis/camel/v1/common_types.go:
##########
@@ -48,17 +48,14 @@ const (
// BuildStrategyPod performs the build in a `Pod` (will schedule a new
builder ephemeral `Pod` which will take care of the build action).
// This strategy has the limitation that every build will have to
download all the dependencies required by the Maven build.
BuildStrategyPod BuildStrategy = "pod"
- // BuildStrategyType is the type of strategy that should be used to
perform the build.
- // It will trigger a Maven daemon process that will take care of
producing the expected Camel/Camel-Quarkus runtime.
- // The Maven daemon will be run in a container.
- // +kubebuilder:validation:Enum=routine;pod
- BuildStrategType BuildStrategy = "mvnd"
+ BuildStrategyMvnd BuildStrategy = "mvnd"
Review Comment:
I didn't meant to remove the whole block :) It was specifically about
removing ` +kubebuilder:validation:Enum=routine;pod`
##########
build/Dockerfile:
##########
@@ -22,10 +22,18 @@ ARG
BASE_URL="https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/bin
USER 0
+RUN mkdir -p ${MAVEN_HOME} \
+ && curl -Lso /tmp/maven.tar.gz
${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
Review Comment:
We should look to using that version with Mvnd as well, that is removing the
embedded one from the Maven Daemon.
##########
pkg/util/maven/maven_command.go:
##########
@@ -47,8 +48,14 @@ func (c *Command) Do(ctx context.Context) error {
if err := generateProjectStructure(c.context, c.project); err != nil {
return err
}
-
- mvnCmd := "mvnd"
+
+ mvnCmd := ""
+ switch c.context.Strategy {
+ case "maven":
+ mvnCmd = "mvn"
+ case "maven_daemon":
Review Comment:
should be `mvnd`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]