You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2021/07/21 07:39:07 UTC

[camel-quarkus] branch main updated (e288fd9 -> b31c0d9)

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

ppalaga pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


    from e288fd9  Minor grammatical correction to native mode serialization docs
     new 03d2ff0  Remove quarkus.camel.sql.script-files configuration property
     new b31c0d9  Remove redundant SQL itest serialization configuration

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/modules/ROOT/pages/migration-guide/2.1.0.adoc |  9 +++++
 docs/modules/ROOT/pages/migration-guide/index.adoc |  1 +
 .../component/sql/deployment/SqlProcessor.java     | 18 ---------
 .../quarkus/component/sql/CamelSqlConfig.java      | 43 ----------------------
 .../sql/src/main/resources/application.properties  |  2 -
 .../src/main/resources/serialization-config.json   | 20 ----------
 6 files changed, 10 insertions(+), 83 deletions(-)
 create mode 100644 docs/modules/ROOT/pages/migration-guide/2.1.0.adoc
 delete mode 100644 extensions/sql/runtime/src/main/java/org/apache/camel/quarkus/component/sql/CamelSqlConfig.java
 delete mode 100644 integration-tests/sql/src/main/resources/serialization-config.json

[camel-quarkus] 01/02: Remove quarkus.camel.sql.script-files configuration property

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 03d2ff084a98470379cabddbb931c241fb812565
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jul 20 13:10:24 2021 +0100

    Remove quarkus.camel.sql.script-files configuration property
    
    Fixes #2823
---
 docs/modules/ROOT/pages/migration-guide/2.1.0.adoc |  9 +++++
 docs/modules/ROOT/pages/migration-guide/index.adoc |  1 +
 .../component/sql/deployment/SqlProcessor.java     | 18 ---------
 .../quarkus/component/sql/CamelSqlConfig.java      | 43 ----------------------
 4 files changed, 10 insertions(+), 61 deletions(-)

diff --git a/docs/modules/ROOT/pages/migration-guide/2.1.0.adoc b/docs/modules/ROOT/pages/migration-guide/2.1.0.adoc
new file mode 100644
index 0000000..a4502ff
--- /dev/null
+++ b/docs/modules/ROOT/pages/migration-guide/2.1.0.adoc
@@ -0,0 +1,9 @@
+= Camel Quarkus 2.1.0 Migration Guide
+
+The following guide outlines how to adapt your code to changes that were made in Camel Quarkus 2.1.0 & Quarkus 2.1.0.Final.
+
+== SQL extension `quarkus.camel.sql.script-files` configuration property is removed
+
+The `quarkus.camel.sql.script-files` configuration property was deprecated in the 2.0.0 release and has now been removed.
+
+If you need to have SQL script files accessible via the classpath for `sql` or `sql-stored` endpoints, please use configuration property `quarkus.native.resources.includes`.
diff --git a/docs/modules/ROOT/pages/migration-guide/index.adoc b/docs/modules/ROOT/pages/migration-guide/index.adoc
index a37e0fb..8a3dacf 100644
--- a/docs/modules/ROOT/pages/migration-guide/index.adoc
+++ b/docs/modules/ROOT/pages/migration-guide/index.adoc
@@ -4,4 +4,5 @@ We do frequent releases, a release almost every month, and even though we strive
 
 Listed here are guides on how to migrate between major versions and anything of significance to watch for when upgrading from minor versions.
 
+* xref:migration-guide/2.1.0.adoc[Camel Quarkus 2.0.0 to Camel Quarkus 2.1.0 migration guide]
 * xref:migration-guide/2.0.0.adoc[Camel Quarkus 1.x to Camel Quarkus 2.0.0 migration guide]
diff --git a/extensions/sql/deployment/src/main/java/org/apache/camel/quarkus/component/sql/deployment/SqlProcessor.java b/extensions/sql/deployment/src/main/java/org/apache/camel/quarkus/component/sql/deployment/SqlProcessor.java
index c7208b9..571b2d9 100644
--- a/extensions/sql/deployment/src/main/java/org/apache/camel/quarkus/component/sql/deployment/SqlProcessor.java
+++ b/extensions/sql/deployment/src/main/java/org/apache/camel/quarkus/component/sql/deployment/SqlProcessor.java
@@ -22,16 +22,12 @@ import java.util.LinkedHashMap;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.apache.camel.quarkus.component.sql.CamelSqlConfig;
 import org.apache.camel.quarkus.core.deployment.spi.CamelSerializationBuildItem;
 import org.apache.camel.support.DefaultExchangeHolder;
-import org.jboss.logging.Logger;
 
 class SqlProcessor {
 
-    private static final Logger LOG = Logger.getLogger(SqlProcessor.class);
     private static final String FEATURE = "camel-sql";
 
     @BuildStep
@@ -49,18 +45,4 @@ class SqlProcessor {
         reflectiveClass.produce(new ReflectiveClassBuildItem(false, true, Types.class, DefaultExchangeHolder.class));
         reflectiveClass.produce(ReflectiveClassBuildItem.serializationClass(LinkedHashMap.class.getName()));
     }
-
-    @BuildStep
-    void sqlNativeImageResources(BuildProducer<NativeImageResourceBuildItem> nativeImage, CamelSqlConfig config) {
-        if (!config.scriptFiles.isPresent()) {
-            return;
-        }
-
-        LOG.warn(
-                "Configuration property quarkus.camel.sql.script-files is deprecated. Please use quarkus.native.resources.includes");
-        config.scriptFiles.get()
-                .stream()
-                .map(scriptFile -> new NativeImageResourceBuildItem(scriptFile.replace("classpath:", "")))
-                .forEach(nativeImage::produce);
-    }
 }
diff --git a/extensions/sql/runtime/src/main/java/org/apache/camel/quarkus/component/sql/CamelSqlConfig.java b/extensions/sql/runtime/src/main/java/org/apache/camel/quarkus/component/sql/CamelSqlConfig.java
deleted file mode 100644
index 4b0f7b2..0000000
--- a/extensions/sql/runtime/src/main/java/org/apache/camel/quarkus/component/sql/CamelSqlConfig.java
+++ /dev/null
@@ -1,43 +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.quarkus.component.sql;
-
-import java.util.List;
-import java.util.Optional;
-
-import io.quarkus.runtime.annotations.ConfigItem;
-import io.quarkus.runtime.annotations.ConfigPhase;
-import io.quarkus.runtime.annotations.ConfigRoot;
-
-@ConfigRoot(name = "camel.sql", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
-public class CamelSqlConfig {
-
-    /**
-     * A comma separated list of paths to script files referenced by SQL endpoints.
-     *
-     * Script files that only need to be accessible from the classpath should be specified on this property.
-     *
-     * Paths can either be schemeless (E.g sql/my-script.sql) or be prefixed with the classpath: URI scheme (E.g
-     * classpath:sql/my-script.sql). Other URI schemes are not supported.
-     *
-     * @deprecated use configuration property `quarkus.native.resources.includes` to include your SQL scripts in the native
-     *             image.
-     */
-    @ConfigItem
-    @Deprecated
-    public Optional<List<String>> scriptFiles;
-}

[camel-quarkus] 02/02: Remove redundant SQL itest serialization configuration

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b31c0d9d9df00e18cc871e5cdb1f05f2a58cdfd3
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jul 20 13:15:31 2021 +0100

    Remove redundant SQL itest serialization configuration
---
 .../sql/src/main/resources/application.properties    |  2 --
 .../sql/src/main/resources/serialization-config.json | 20 --------------------
 2 files changed, 22 deletions(-)

diff --git a/integration-tests/sql/src/main/resources/application.properties b/integration-tests/sql/src/main/resources/application.properties
index d0da756..8dc76ac 100644
--- a/integration-tests/sql/src/main/resources/application.properties
+++ b/integration-tests/sql/src/main/resources/application.properties
@@ -19,5 +19,3 @@
 #
 quarkus.native.resources.includes=sql/*.sql
 
-#Serialization-config.json is a workaround until serilazation support makes it into Quarkus (see https://github.com/quarkusio/quarkus/pull/15380)
-quarkus.native.additional-build-args=-H:SerializationConfigurationResources=serialization-config.json
diff --git a/integration-tests/sql/src/main/resources/serialization-config.json b/integration-tests/sql/src/main/resources/serialization-config.json
deleted file mode 100644
index 44c58a6..0000000
--- a/integration-tests/sql/src/main/resources/serialization-config.json
+++ /dev/null
@@ -1,20 +0,0 @@
-[
-  {
-    "name" : "java.lang.Integer"
-  },
-  {
-    "name" : "java.lang.Number"
-  },
-  {
-    "name" : "java.lang.String"
-  },
-  {
-    "name" : "java.util.HashMap"
-  },
-  {
-    "name" : "java.util.LinkedHashMap"
-  },
-  {
-    "name" : "org.apache.camel.support.DefaultExchangeHolder"
-  }
-]
\ No newline at end of file