You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/06/05 10:23:28 UTC
[camel] 01/03: Spring Boot Auto configuration docs in readme should
include deprecation details
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3ffc422649d2c728284d3f1fe20b21ac1eddb89f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 5 12:14:16 2019 +0200
Spring Boot Auto configuration docs in readme should include deprecation details
---
.../UpdateSpringBootAutoConfigurationReadmeMojo.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
index 8a7b913..46c056d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
@@ -305,6 +305,20 @@ public class UpdateSpringBootAutoConfigurationReadmeMojo extends AbstractMojo {
String desc = row.getStringOrDefault("description", "");
String defaultValue = row.getStringOrDefault("defaultValue", "");
+ // is the option deprecated then include that as well in the description
+ String deprecated = row.getStringOrDefault("deprecated", "");
+ String deprecationNote = row.getStringOrDefault("deprecationNote", "");
+ if ("true".equals(deprecated)) {
+ desc = "*Deprecated* " + desc;
+ if (!StringHelper.isEmpty(deprecationNote)) {
+ if (!desc.endsWith(".")) {
+ desc = desc + ". Deprecation note: " + deprecationNote;
+ } else {
+ desc = desc + " Deprecation note: " + deprecationNote;
+ }
+ }
+ }
+
// skip this special option and also if not matching the filter
boolean skip = name.endsWith("customizer.enabled") || include != null && !name.contains("." + include + ".");
if (!skip) {