gansheer commented on code in PR #4656:
URL: https://github.com/apache/camel-k/pull/4656#discussion_r1288326004


##########
script/offline_dependencies.sh:
##########
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+location=$(dirname $0)
+rootdir=$location/../
+outputLocation=${rootdir}build/_offline
+
+if [ "$#" -lt 3 ]; then
+  echo "usage: $0 <Camel K runtime version> --with <path/to/maven/version>"
+  exit 1
+fi
+
+# Non reproducible builds: we must use the exact maven version used by the 
operator
+# Change the mvnCmd variable to include the maven version you're willing to 
use ie, /usr/share/apache-maven-3.8.6/bin/mvn
+if [ ! "$2" == "--with" ]; then
+  echo "usage: $0 <Camel K runtime version> --with <path/to/maven/version>"
+  exit 2
+fi
+
+runtime_version="$1"
+mvnCmd="$3"
+
+echo "WARN: Running the script with the following maven version. Make sure 
maven version matches the target!"
+$mvnCmd --version | grep "Apache Maven"
+
+echo "INFO: preparing a base project to download maven dependencies..."
+$mvnCmd -q clean package -f $location/camel-k-runtime-archetype/pom.xml 
-Dmaven.repo.local=$outputLocation -s $location/maven-settings.xml

Review Comment:
   Could the `runtime_version` be injected in the pom.xml as the 
`camel-k-runtime-bom` version ? 



-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to