This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 942215936c2e6592b7ea05247f1e59fb023b9c60 Author: Zoran Regvart <zo...@regvart.com> AuthorDate: Mon Sep 13 20:49:22 2021 +0200 CAMEL-16639: Don't modify files in docs directory The files in the docs directory are symbolic links to the files in the git tree, i.e. no longer copies. Modifying those to add information that they're copies modifies the original source files; and we don't need that. --- .../camel/maven/packaging/UpdateReadmeMojo.java | 36 ---------------------- 1 file changed, 36 deletions(-) diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java index ad914cc..f58b540 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java @@ -220,24 +220,6 @@ public class UpdateReadmeMojo extends AbstractGeneratorMojo { throw new MojoExecutionException("Failed build due failFast=true"); } } - - if (updated || exists) { - try { - // if we run in camel-core project then add additional meta-data - File rootFile = findCamelDirectory(project.getBasedir(), "core/camel-core"); - if (rootFile != null) { - Path root = rootFile.toPath().getParent().getParent(); - String text = PackageHelper.loadText(file); - String rep = "$1\n" - + "//THIS FILE IS COPIED: EDIT THE SOURCE FILE:\n" - + ":page-source: " + root.relativize(file.toPath()); - text = Pattern.compile("^(= .+)$", Pattern.MULTILINE).matcher(text).replaceAll(rep); - updateResource(root.resolve("docs/components/modules/ROOT/pages"), file.getName(), text); - } - } catch (IOException e) { - throw new MojoExecutionException("Error reading file " + file + " Reason: " + e, e); - } - } } } } @@ -447,24 +429,6 @@ public class UpdateReadmeMojo extends AbstractGeneratorMojo { throw new MojoExecutionException("Failed build due failFast=true"); } } - - if (updated || exists) { - try { - // if we run in camel-core project then add additional meta-data - File rootFile = findCamelDirectory(project.getBasedir(), "core/camel-core"); - if (rootFile != null) { - Path root = rootFile.toPath().getParent().getParent(); - String text = PackageHelper.loadText(file); - String rep = "$1\n" - + "//THIS FILE IS COPIED: EDIT THE SOURCE FILE:\n" - + ":page-source: " + root.relativize(file.toPath()); - text = Pattern.compile("^(= .+)$", Pattern.MULTILINE).matcher(text).replaceAll(rep); - updateResource(root.resolve("docs/components/modules/languages/pages"), file.getName(), text); - } - } catch (IOException e) { - throw new MojoExecutionException("Error reading file " + file + " Reason: " + e, e); - } - } } } }