You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2019/12/10 11:45:14 UTC

[camel-quarkus] branch master updated: chore: Clarify supported URI schemes in SQL script-files config property

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a10f463  chore: Clarify supported URI schemes in SQL script-files config property
a10f463 is described below

commit a10f4636d6a49c92550d30d29f1f26cfa252ce6f
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Dec 10 11:29:38 2019 +0000

    chore: Clarify supported URI schemes in SQL script-files config property
---
 docs/modules/ROOT/pages/extensions/sql.adoc                          | 1 +
 .../apache/camel/quarkus/component/sql/deployment/SqlProcessor.java  | 3 ++-
 .../java/org/apache/camel/quarkus/component/sql/CamelSqlConfig.java  | 5 +++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/extensions/sql.adoc b/docs/modules/ROOT/pages/extensions/sql.adoc
index 49cedfe..a1d89a3 100644
--- a/docs/modules/ROOT/pages/extensions/sql.adoc
+++ b/docs/modules/ROOT/pages/extensions/sql.adoc
@@ -22,6 +22,7 @@ The extension provides support for the Camel https://camel.apache.org/components
 === Configuration
 
 When configuring `sql` or `sql-stored` endpoints to reference script files from the classpath, set the following configuration property to ensure that they are available in native mode.
+Note that URI schemes such as `file` or `http` do not need to be listed.
 
 [source,properties]
 ----
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 f5f4232..a1cf3e0 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
@@ -55,7 +55,8 @@ class SqlProcessor {
 
     @BuildStep(onlyIf = NativeBuild.class)
     void generateKParameterClass(BuildProducer<GeneratedClassBuildItem> generatedClass) {
-        // TODO: The native image build fails with a NoClassDefFoundError without this. Possibly similar to https://github.com/oracle/graal/issues/656.
+        // TODO: Investigate removing this. See https://github.com/apache/camel-quarkus/issues/534
+        // The native image build fails with a NoClassDefFoundError without this. Possibly similar to https://github.com/oracle/graal/issues/656.
         ClassOutput classOutput = new GizmoAdaptor(generatedClass, false);
         ClassCreator.builder()
                 .className("kotlin.reflect.KParameter")
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
index 521581b..db15f7e 100644
--- 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
@@ -27,6 +27,11 @@ 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.
      */
     @ConfigItem
     public List<String> scriptFiles;