This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new ba1baa8033c CAMEL-21558: Add missing package context for Static
Endpoint DSL Generation when you want to use customized package names (#16613)
ba1baa8033c is described below
commit ba1baa8033c46a61655423a6db49a197f66dffd0
Author: Malyky <[email protected]>
AuthorDate: Fri Dec 20 16:40:50 2024 +0100
CAMEL-21558: Add missing package context for Static Endpoint DSL Generation
when you want to use customized package names (#16613)
Co-authored-by: Martin Ly-Ky <[email protected]>
---
.../main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java | 2 ++
.../src/main/resources/velocity/endpoint-builder-factory.vm | 2 +-
.../src/main/resources/velocity/endpoint-builder.vm | 2 +-
.../src/main/resources/velocity/endpoint-builders.vm | 2 +-
.../src/main/resources/velocity/endpoint-static-builders.vm | 4 ++--
5 files changed, 7 insertions(+), 5 deletions(-)
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
index 442ffc4b508..d28bbd93beb 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
+++
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
@@ -207,6 +207,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
Map<String, Object> ctx = new HashMap<>();
ctx.put("generatorClass", getClass().getName());
ctx.put("componentName", componentName);
+ ctx.put("package", componentsFactoriesPackageName);
ctx.put("model", model);
ctx.put("aliases", aliases);
ctx.put("mojo", this);
@@ -335,6 +336,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
Map<String, Object> ctx = new HashMap<>();
ctx.put("generatorClass", getClass().getName());
ctx.put("package", endpointFactoriesPackageName);
+ ctx.put("dslPackage", componentsFactoriesPackageName);
ctx.put("className", "StaticEndpointBuilders");
ctx.put("models", models);
ctx.put("sortedModels", sortedModels);
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder-factory.vm
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder-factory.vm
index f76a1bb6135..5882ad6f2fc 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder-factory.vm
+++
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder-factory.vm
@@ -31,7 +31,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.builder.endpoint;
+package ${package};
import java.util.List;
import java.util.stream.Collectors;
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder.vm
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder.vm
index 5c2e3a23950..aa84c677aa4 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder.vm
+++
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builder.vm
@@ -34,7 +34,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.builder.endpoint.dsl;
+package ${package};
import java.util.*;
import java.util.concurrent.*;
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builders.vm
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builders.vm
index 3f04134471f..1d7f4af8cf0 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builders.vm
+++
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-builders.vm
@@ -31,7 +31,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.builder.endpoint;
+package ${package};
import javax.annotation.processing.Generated;
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-static-builders.vm
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-static-builders.vm
index 0c087471b35..891e7a8a9b6 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-static-builders.vm
+++
b/tooling/maven/camel-package-maven-plugin/src/main/resources/velocity/endpoint-static-builders.vm
@@ -33,10 +33,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.builder.endpoint;
+package ${package};
import javax.annotation.processing.Generated;
-import org.apache.camel.builder.endpoint.dsl.*;
+import ${dslPackage}.*;
/**
* Generated by camel build tools - do NOT edit this file!