This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 93d57cc025 Clean up usage of deprecated Quarkus configuration options
93d57cc025 is described below
commit 93d57cc02514bc5bd9dd0d152fae244e9d38ff07
Author: James Netherton <[email protected]>
AuthorDate: Mon Oct 20 12:48:38 2025 +0100
Clean up usage of deprecated Quarkus configuration options
* Removed references to deprecated quarkus.native.resources.excludes
* Updated deprecated quarkus.log.file.enable to quarkus.log.file.enabled
* Removed redundant TimerDevModeTest
---
.../modules/ROOT/pages/user-guide/native-mode.adoc | 9 +-
extensions/timer/deployment/pom.xml | 12 ---
.../test/devmode/timer/TimerDevModeTest.java | 98 ----------------------
.../component/test/devmode/timer/TimerRoute.java | 31 -------
.../core/src/main/resources/application.properties | 1 -
.../java/org/apache/camel/quarkus/core/CoreIT.java | 12 ---
.../src/main/resources/application.properties | 2 +-
.../log/src/main/resources/application.properties | 2 +-
.../src/main/resources/application.properties | 2 +-
.../src/main/resources/application.properties | 2 +-
.../box/src/main/resources/application.properties | 2 +-
.../src/main/resources/application.properties | 2 +-
.../src/main/resources/application.properties | 2 +-
.../src/main/resources/application.properties | 2 +-
tooling/scripts/group-tests.groovy | 2 +-
15 files changed, 12 insertions(+), 169 deletions(-)
diff --git a/docs/modules/ROOT/pages/user-guide/native-mode.adoc
b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
index 93f9b980e7..5b7418c4a0 100644
--- a/docs/modules/ROOT/pages/user-guide/native-mode.adoc
+++ b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
@@ -44,19 +44,16 @@ Using a value of `all` will include all available locales
into the native image.
Resources accessed via `Class.getResource()`, `Class.getResourceAsStream()`,
`ClassLoader.getResource()`,
`ClassLoader.getResourceAsStream()`, etc. at runtime need to be explicitly
listed for including in the native executable.
-This can be done using Quarkus `quarkus.native.resources.includes` and
`quarkus.native.resources.excludes` properties
-in `application.properties` file as demonstrated below:
+This can be done using the `quarkus.native.resources.includes` configuration
option in `application.properties` as demonstrated below:
[source,properties]
----
quarkus.native.resources.includes = docs/*,images/*
-quarkus.native.resources.excludes = docs/ignored.adoc,images/ignored.png
----
-In the example above, resources named `docs/included.adoc` and
`images/included.png` would be embedded in the native executable
-while `docs/ignored.adoc` and `images/ignored.png` would not.
+In the example above, resources named `docs/included.adoc` and
`images/included.png` would be embedded in the native executable.
-`resources.includes` and `resources.excludes` are both lists of comma
separated Ant-path style glob patterns.
+`quarkus.native.resources.includes` is a list of comma separated Ant-path
style glob patterns.
Please refer to
https://quarkus.io/guides/building-native-image#quarkus-native-pkg-native-config_quarkus.native.resources.includes[Quarkus
documentation] for more details.
[[using-onexception-clause-in-native-mode]]
diff --git a/extensions/timer/deployment/pom.xml
b/extensions/timer/deployment/pom.xml
index 059ded7f44..357fc45c0c 100644
--- a/extensions/timer/deployment/pom.xml
+++ b/extensions/timer/deployment/pom.xml
@@ -38,18 +38,6 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer</artifactId>
</dependency>
-
-
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-junit5-internal</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git
a/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerDevModeTest.java
b/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerDevModeTest.java
deleted file mode 100644
index 51c99fff2f..0000000000
---
a/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerDevModeTest.java
+++ /dev/null
@@ -1,98 +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.test.devmode.timer;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import io.quarkus.test.QuarkusDevModeTest;
-import org.awaitility.Awaitility;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.Asset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class TimerDevModeTest {
- private static final Path LOG_FILE = Paths.get("target/" +
TimerDevModeTest.class.getSimpleName() + ".log");
-
- @RegisterExtension
- static final QuarkusDevModeTest TEST = new QuarkusDevModeTest()
- .setArchiveProducer(() -> ShrinkWrap
- .create(JavaArchive.class)
- .addClasses(TimerRoute.class)
- .addAsResource(applicationProperties(),
"application.properties"))
- .setLogFileName(LOG_FILE.getFileName().toString());
-
- @Test
- void logMessageEdit() throws IOException {
- Awaitility.await()
- .atMost(1, TimeUnit.MINUTES)
- .until(() -> Files.exists(LOG_FILE));
-
- try (BufferedReader logFileReader = Files.newBufferedReader(LOG_FILE,
StandardCharsets.UTF_8)) {
- assertLogMessage(logFileReader, "Hello foo", 30000);
- TEST.modifySourceFile(TimerRoute.class, oldSource ->
oldSource.replace("Hello foo", "Hello bar"));
- assertLogMessage(logFileReader, "Hello bar", 30000);
- }
- }
-
- static void assertLogMessage(BufferedReader logFileReader, String msg,
long timeout) throws IOException {
- boolean found = false;
- final long deadline = System.currentTimeMillis() + timeout;
- while (System.currentTimeMillis() < deadline) {
- final String line = logFileReader.readLine();
- if (line == null) {
- try {
- Thread.sleep(50);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new RuntimeException(e);
- }
- } else if (line.contains(msg)) {
- found = true;
- break;
- }
- }
- Assertions.assertTrue(found, "Could not find '" + msg + "' in " +
LOG_FILE);
- }
-
- public static Asset applicationProperties() {
- Writer writer = new StringWriter();
- Properties props = new Properties();
- props.setProperty("quarkus.log.file.enable", "true");
- props.setProperty("quarkus.log.file.path", LOG_FILE.toString());
- props.setProperty("quarkus.log.file.rotation.rotate-on-boot", "false");
- try {
- props.store(writer, "");
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- return new StringAsset(writer.toString());
- }
-}
diff --git
a/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerRoute.java
b/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerRoute.java
deleted file mode 100644
index fc2d1cd59c..0000000000
---
a/extensions/timer/deployment/src/test/java/org/apache/camel/quarkus/component/test/devmode/timer/TimerRoute.java
+++ /dev/null
@@ -1,31 +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.test.devmode.timer;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.jboss.logging.Logger;
-
-public class TimerRoute extends RouteBuilder {
-
- private static final Logger LOG = Logger.getLogger(TimerRoute.class);
-
- @Override
- public void configure() throws Exception {
- from("timer:foo?period=100")
- .process(exchange -> LOG.info("Hello foo"));
- }
-}
diff --git
a/integration-test-groups/foundation/core/src/main/resources/application.properties
b/integration-test-groups/foundation/core/src/main/resources/application.properties
index a46d41abaa..7230260d2b 100644
---
a/integration-test-groups/foundation/core/src/main/resources/application.properties
+++
b/integration-test-groups/foundation/core/src/main/resources/application.properties
@@ -28,7 +28,6 @@ quarkus.camel.native.reflection.exclude-patterns =
org.apache.commons.lang3.tupl
#
quarkus.camel.runtime-catalog.languages = false
quarkus.native.resources.includes =
mysimple.txt,include-pattern-folder/*,sub-resources-folder/foo/bar/*
-quarkus.native.resources.excludes =
exclude-pattern-folder/*,include-pattern-folder/excluded.txt
quarkus.camel.native.reflection.serialization-enabled = true
#
diff --git
a/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/CoreIT.java
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/CoreIT.java
index 87ea2dc56e..34296c79eb 100644
---
a/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/CoreIT.java
+++
b/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/CoreIT.java
@@ -32,18 +32,6 @@ public class CoreIT extends CoreTest {
RestAssured.when().get("/core/resources/not-exist.txt").then().assertThat().statusCode(204);
}
- @Test
- public void
resourceMatchingExcludedPatternOnlyCouldNotBeLoadedFromNativeExecutable() {
-
RestAssured.when().get("/core/resources/exclude-pattern-folder/excluded.txt").then().assertThat()
- .statusCode(204);
- }
-
- @Test
- public void
resourceMatchingIncludeAndExcludedPatternCouldNotBeLoadedFromNativeExecutable()
{
-
RestAssured.when().get("/core/resources/include-pattern-folder/excluded.txt").then().assertThat()
- .statusCode(204);
- }
-
@Test
public void
resourceMatchingIncludePatternOnlyCouldBeLoadedFromNativeExecutable() {
String response =
RestAssured.when().get("/core/resources/include-pattern-folder/included.txt").then()
diff --git
a/integration-test-groups/foundation/direct/src/main/resources/application.properties
b/integration-test-groups/foundation/direct/src/main/resources/application.properties
index b6ff2229d0..d9d6bb19ce 100644
---
a/integration-test-groups/foundation/direct/src/main/resources/application.properties
+++
b/integration-test-groups/foundation/direct/src/main/resources/application.properties
@@ -14,5 +14,5 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
diff --git
a/integration-test-groups/foundation/log/src/main/resources/application.properties
b/integration-test-groups/foundation/log/src/main/resources/application.properties
index a7b671e43c..41e10e2c09 100644
---
a/integration-test-groups/foundation/log/src/main/resources/application.properties
+++
b/integration-test-groups/foundation/log/src/main/resources/application.properties
@@ -14,7 +14,7 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
# Do not start MDC routes by default to avoid interference with logs produced
in other routes
diff --git
a/integration-test-groups/foundation/timer/src/main/resources/application.properties
b/integration-test-groups/foundation/timer/src/main/resources/application.properties
index b6ff2229d0..d9d6bb19ce 100644
---
a/integration-test-groups/foundation/timer/src/main/resources/application.properties
+++
b/integration-test-groups/foundation/timer/src/main/resources/application.properties
@@ -14,5 +14,5 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
diff --git
a/integration-test-groups/foundation/type-converter/src/main/resources/application.properties
b/integration-test-groups/foundation/type-converter/src/main/resources/application.properties
index deb6a5d251..cb7c938794 100644
---
a/integration-test-groups/foundation/type-converter/src/main/resources/application.properties
+++
b/integration-test-groups/foundation/type-converter/src/main/resources/application.properties
@@ -14,6 +14,6 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
quarkus.camel.type-converter.statistics-enabled=true
diff --git a/integration-tests/box/src/main/resources/application.properties
b/integration-tests/box/src/main/resources/application.properties
index 5b8083055d..07777710b6 100644
--- a/integration-tests/box/src/main/resources/application.properties
+++ b/integration-tests/box/src/main/resources/application.properties
@@ -29,5 +29,5 @@ camel.component.box.userPassword = {{env:BOX_USER_PASSWORD}}
camel.component.box.clientId = {{env:BOX_CLIENT_ID}}
camel.component.box.clientSecret = {{env:BOX_CLIENT_SECRET}}
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
diff --git
a/integration-tests/main-xml-io/src/main/resources/application.properties
b/integration-tests/main-xml-io/src/main/resources/application.properties
index 4191fae9fa..9ff522911d 100644
--- a/integration-tests/main-xml-io/src/main/resources/application.properties
+++ b/integration-tests/main-xml-io/src/main/resources/application.properties
@@ -19,7 +19,7 @@
# Quarkus
#
quarkus.native.add-all-charsets = true
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
#
diff --git
a/integration-tests/main-xml-jaxb/src/main/resources/application.properties
b/integration-tests/main-xml-jaxb/src/main/resources/application.properties
index 6afcd39ef7..4c68fdbd68 100644
--- a/integration-tests/main-xml-jaxb/src/main/resources/application.properties
+++ b/integration-tests/main-xml-jaxb/src/main/resources/application.properties
@@ -18,7 +18,7 @@
#
# Quarkus
#
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
#
diff --git
a/integration-tests/quartz-clustered/src/main/resources/application.properties
b/integration-tests/quartz-clustered/src/main/resources/application.properties
index 6ba0495bd2..84d9489400 100644
---
a/integration-tests/quartz-clustered/src/main/resources/application.properties
+++
b/integration-tests/quartz-clustered/src/main/resources/application.properties
@@ -15,7 +15,7 @@
## limitations under the License.
## ---------------------------------------------------------------------------
quarkus.banner.enabled = false
-quarkus.log.file.enable = true
+quarkus.log.file.enabled = true
quarkus.log.file.path = target/quarkus.log
quarkus.log.file.rotation.rotate-on-boot = false
diff --git a/tooling/scripts/group-tests.groovy
b/tooling/scripts/group-tests.groovy
index 0e3c0be04c..75effc5481 100644
--- a/tooling/scripts/group-tests.groovy
+++ b/tooling/scripts/group-tests.groovy
@@ -38,7 +38,7 @@ final String excludes =
binding.properties.variables.'group-tests.files.excludes
final String classNamePrefix =
binding.properties.variables.'group-tests.class.name.prefix' ?: ""
final List<String> fileExcludes = excludes.split('[\\s,]+') as List
/* Property names whose values originating from distinct
application.properties files can be concatenated using comma as a separator */
-final Set<String> commaConcatenatePropertyNames =
["quarkus.native.resources.includes", "quarkus.native.resources.excludes"] as
Set
+final Set<String> commaConcatenatePropertyNames =
["quarkus.native.resources.includes"] as Set
final Map<String, ResourceConcatenator> mergedFiles = new HashMap<>()
concatRelPaths.each {relPath -> mergedFiles.put(relPath, new
ResourceConcatenator(commaConcatenatePropertyNames)) }