This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push:
new 802f3f422e4 CAMEL-19250: Classes generated by
camel-restdsl-openapi-plugin are not added to jar (#9820)
802f3f422e4 is described below
commit 802f3f422e4ffc1f84010081a99868b9718048f3
Author: Luigi De Masi <[email protected]>
AuthorDate: Wed Apr 5 11:36:57 2023 +0200
CAMEL-19250: Classes generated by camel-restdsl-openapi-plugin are not
added to jar (#9820)
---
.../org/apache/camel/maven/generator/openapi/GenerateMojo.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
index 608c98f3afe..568033645bc 100644
---
a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
+++
b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/GenerateMojo.java
@@ -147,6 +147,14 @@ public class GenerateMojo extends AbstractGenerateMojo {
throw new MojoExecutionException(
"Unable to generate REST DSL OpenApi sources from
specification: " + specificationUri, e);
}
+
+ // Add the generated classes to the maven build path
+ if (ObjectHelper.isNotEmpty(modelOutput)) {
+ project.addCompileSourceRoot(modelOutput);
+ }
+ if (ObjectHelper.isNotEmpty(outputDirectory)) {
+ project.addCompileSourceRoot(outputDirectory);
+ }
}
}