This is an automated email from the ASF dual-hosted git repository.
orpiske 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 49d8d18b94fd (chores) Improve the awareness if dependency markers are
missing
49d8d18b94fd is described below
commit 49d8d18b94fd703d2f4db09d473283f514f2eddb
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Jan 28 14:40:31 2026 +0100
(chores) Improve the awareness if dependency markers are missing
---
.../apache/camel/maven/packaging/PrepareComponentMojo.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
index db729130906a..e7e22eb3015e 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
+++
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
@@ -267,7 +267,18 @@ public class PrepareComponentMojo extends
AbstractGeneratorMojo {
final String pomText = loadText(pomFile);
final String before = Strings.before(pomText,
startDependenciesMarker);
+ if (before == null) {
+ getLog().warn("The POM file should have a comment marking the
beginning of the dependencies section such as"
+ + startDependenciesMarker + "'");
+ throw new MojoExecutionException("POM file " + pomFile + "
does not have the start of dependencies marker");
+ }
+
final String after = Strings.after(pomText, endDependenciesMarker);
+ if (after == null) {
+ getLog().warn("The POM file should have a comment marking the
end of the dependencies section such as"
+ + endDependenciesMarker + "'");
+ throw new MojoExecutionException("POM file " + pomFile + "
does not have the end of dependencies marker");
+ }
final String between = pomText.substring(before.length(),
pomText.length() - after.length());