This is an automated email from the ASF dual-hosted git repository.

claudio4j pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git


The following commit(s) were added to refs/heads/main by this push:
     new f94d0846 Clean groovy dependency and drive camel-quarkus from quarkus 
bom (#1191)
f94d0846 is described below

commit f94d084654cc1576df5163c8fb43c0439bbb7774
Author: Claudio Miranda <clau...@claudius.com.br>
AuthorDate: Tue Mar 26 15:15:55 2024 -0300

    Clean groovy dependency and drive camel-quarkus from quarkus bom (#1191)
    
    - the groovy deps were excluded from rest-assured deps, but that's not the 
case anymore
    - removing AvailablePortFinder class as it's not required anymore since 
camel-k-knative was removed
---
 pom.xml                                            | 28 --------
 scripts/sync_cq.sh                                 |  2 -
 support/camel-k-maven-plugin/pom.xml               |  3 -
 .../src/it/generate-catalog/verify.groovy          | 14 +++-
 support/camel-k-test/pom.xml                       | 25 --------
 .../apache/camel/k/test/AvailablePortFinder.java   | 74 ----------------------
 6 files changed, 11 insertions(+), 135 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2f538e29..31760813 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,7 +43,6 @@
         <camel-version>4.4.1</camel-version>
 
         <!-- quarkus -->
-        <camel-quarkus-version>3.8.1</camel-quarkus-version>
         <quarkus-version>3.8.3</quarkus-version>
         <quarkus-platform-group>io.quarkus.platform</quarkus-platform-group>
         <quarkus-platform-version>3.8.3</quarkus-platform-version>
@@ -531,33 +530,6 @@
                 <version>${project.version}</version>
             </dependency>
 
-            <!-- groovy -->
-            <dependency>
-                <groupId>org.apache.groovy</groupId>
-                <artifactId>groovy</artifactId>
-                <version>${groovy-version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.groovy</groupId>
-                <artifactId>groovy-xml</artifactId>
-                <version>${groovy-version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.groovy</groupId>
-                <artifactId>groovy-json</artifactId>
-                <version>${groovy-version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.groovy</groupId>
-                <artifactId>groovy-yaml</artifactId>
-                <version>${groovy-version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.groovy</groupId>
-                <artifactId>groovy-test</artifactId>
-                <version>${groovy-version}</version>
-            </dependency>
-
             <!-- misc -->
             <dependency>
                 <groupId>org.immutables</groupId>
diff --git a/scripts/sync_cq.sh b/scripts/sync_cq.sh
index 5540f551..4fe0b893 100755
--- a/scripts/sync_cq.sh
+++ b/scripts/sync_cq.sh
@@ -65,8 +65,6 @@ main() {
   # camel-version
   mvn -ntp versions:update-parent "-DparentVersion=[$CAMEL_VERSION]" 
-DgenerateBackupPoms=false
   mvn -ntp versions:set-property -Dproperty="camel-version" 
-DnewVersion="$CAMEL_VERSION" -DgenerateBackupPoms=false
-  # camel-quarkus-version
-  mvn -ntp versions:set-property -Dproperty="camel-quarkus-version" 
-DnewVersion="$CQ_VERSION" -DgenerateBackupPoms=false
   # quarkus-version
   mvn -ntp versions:set-property -Dproperty="quarkus-version" 
-DnewVersion="$QUARKUS_VERSION" -DgenerateBackupPoms=false
   # quarkus-platform-version
diff --git a/support/camel-k-maven-plugin/pom.xml 
b/support/camel-k-maven-plugin/pom.xml
index 36a2fa8e..f983bd36 100644
--- a/support/camel-k-maven-plugin/pom.xml
+++ b/support/camel-k-maven-plugin/pom.xml
@@ -72,12 +72,10 @@
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-catalog</artifactId>
-            <version>${camel-quarkus-version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-core</artifactId>
-            <version>${camel-quarkus-version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
@@ -171,7 +169,6 @@
                     <scriptVariables>
                         <runtimeVersion>${project.version}</runtimeVersion>
                         <camelVersion>${camel-version}</camelVersion>
-                        
<camelQuarkusVersion>${camel-quarkus-version}</camelQuarkusVersion>
                         <quarkusVersion>${quarkus-version}</quarkusVersion>
                         
<quarkusNativeBuilderImage>${quarkus-native-builder-image}</quarkusNativeBuilderImage>
                         
<jibMavenPluginVersion>${jib-maven-plugin-version}</jibMavenPluginVersion>
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy 
b/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
index 963ce052..7719c721 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
+++ b/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
@@ -21,9 +21,7 @@ new File(basedir, "catalog.yaml").withReader {
     assert catalog.spec.runtime.version == runtimeVersion
     assert catalog.spec.runtime.applicationClass == 
'io.quarkus.bootstrap.runner.QuarkusEntryPoint'
     assert catalog.spec.runtime.metadata['camel.version'] == camelVersion
-    // Re-enabled this when the version will be the same again
-    //assert catalog.spec.runtime.metadata['quarkus.version'] == quarkusVersion
-    assert catalog.spec.runtime.metadata['camel-quarkus.version'] == 
camelQuarkusVersion
+    assert catalog.spec.runtime.metadata['camel-quarkus.version'] == 
getCamelQuarkusVersion()
     assert catalog.spec.runtime.metadata['quarkus.native-builder-image'] == 
quarkusNativeBuilderImage
     assert catalog.spec.runtime.metadata['jib.maven-plugin.version'] == 
jibMavenPluginVersion
     assert 
catalog.spec.runtime.metadata['jib.layer-filter-extension-maven.version'] == 
jibLayerFilterExtensionMavenVersion
@@ -160,4 +158,14 @@ new File(basedir, "catalog.yaml").withReader {
         assert requiredCapabilities == null
         assert schemes.size() == 1
     }
+
+}
+
+String getCamelQuarkusVersion() {
+    def in = 
org.apache.camel.quarkus.main.CamelMain.class.getClassLoader().getResourceAsStream("META-INF/maven/org.apache.camel.quarkus/camel-quarkus-core/pom.properties")
+    def prop = new Properties()
+    prop.load(in)
+    in.close()
+    camelQuarkusVersion = prop["version"]
+    return camelQuarkusVersion
 }
diff --git a/support/camel-k-test/pom.xml b/support/camel-k-test/pom.xml
index 0615968a..b45af163 100644
--- a/support/camel-k-test/pom.xml
+++ b/support/camel-k-test/pom.xml
@@ -48,36 +48,11 @@
             <groupId>io.rest-assured</groupId>
             <artifactId>rest-assured</artifactId>
             <exclusions>
-                <exclusion>
-                    <groupId>org.apache.groovy</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
                 <exclusion>
                     <groupId>org.hamcrest</groupId>
                     <artifactId>hamcrest</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.groovy</groupId>
-            <artifactId>groovy</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.groovy</groupId>
-            <artifactId>groovy-xml</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.groovy</groupId>
-            <artifactId>groovy-json</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.groovy</groupId>
-            <artifactId>groovy-yaml</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.groovy</groupId>
-            <artifactId>groovy-test</artifactId>
-        </dependency>
     </dependencies>
 </project>
diff --git 
a/support/camel-k-test/src/main/java/org/apache/camel/k/test/AvailablePortFinder.java
 
b/support/camel-k-test/src/main/java/org/apache/camel/k/test/AvailablePortFinder.java
deleted file mode 100644
index 640cb78e..00000000
--- 
a/support/camel-k-test/src/main/java/org/apache/camel/k/test/AvailablePortFinder.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-package org.apache.camel.k.test;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.function.Function;
-
-/**
- * Finds currently available server ports.
- */
-public final class AvailablePortFinder {
-    /**
-     * Creates a new instance.
-     */
-    private AvailablePortFinder() {
-        // Do nothing
-    }
-
-    /**
-     * Gets the next available port.
-     *
-     * @throws IllegalStateException if there are no ports available
-     * @return                       the available port
-     */
-    public static int getNextAvailable() {
-        try (ServerSocket ss = new ServerSocket()) {
-            ss.setReuseAddress(true);
-            ss.bind(new InetSocketAddress((InetAddress) null, 0), 1);
-            return ss.getLocalPort();
-        } catch (IOException e) {
-            throw new IllegalStateException("Cannot find free port", e);
-        }
-    }
-
-    /**
-     * Reserve a list of random and not in use network ports and place them in 
Map.
-     */
-    public static Map<String, Integer> reserveNetworkPorts(String... names) {
-        return reserveNetworkPorts(Function.identity(), names);
-    }
-
-    /**
-     * Reserve a list of random and not in use network ports and place them in 
Map.
-     */
-    public static <T> Map<String, T> reserveNetworkPorts(Function<Integer, T> 
converter, String... names) {
-        Map<String, T> reservedPorts = new HashMap<>();
-
-        for (String name : names) {
-            reservedPorts.put(name, converter.apply(getNextAvailable()));
-        }
-
-        return reservedPorts;
-    }
-}
-

Reply via email to