camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-11145: Component docs fix broken links to core stuff
Date Thu, 13 Apr 2017 11:02:04 GMT
Repository: camel
Updated Branches:
  refs/heads/master d5118addc -> e269e10d4


CAMEL-11145: Component docs fix broken links to core stuff


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e269e10d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e269e10d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e269e10d

Branch: refs/heads/master
Commit: e269e10d48663a2d6647e47367a9cac4e69a3cc5
Parents: d5118ad
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Apr 13 13:01:52 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Apr 13 13:01:52 2017 +0200

----------------------------------------------------------------------
 components/readme.adoc                          | 28 ++++++++++----------
 .../maven/packaging/PrepareReadmeMojo.java      | 12 ++++-----
 .../maven/packaging/model/DataFormatModel.java  | 12 ++++++++-
 .../maven/packaging/model/LanguageModel.java    | 12 ++++++++-
 4 files changed, 42 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e269e10d/components/readme.adoc
----------------------------------------------------------------------
diff --git a/components/readme.adoc b/components/readme.adoc
index b68822d..b3393de 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -739,7 +739,7 @@ Number of Data Formats: 45 in 36 JAR artifacts (0 deprecated)
 
 | link:camel-flatpack/src/main/docs/flatpack-dataformat.adoc[Flatpack] (camel-flatpack) |
2.1 | Camel FlatPack support
 
-| link:src/main/docs/gzip-dataformat.adoc[GZip] (camel-core) | 2.0 | GZip compression data
format
+| link:../camel-core/src/main/docs/gzip-dataformat.adoc[GZip] (camel-core) | 2.0 | GZip compression
data format
 
 | link:camel-hessian/src/main/docs/hessian-dataformat.adoc[Hessian] (camel-hessian) | 2.17
| Hessian serialization support
 
@@ -749,7 +749,7 @@ Number of Data Formats: 45 in 36 JAR artifacts (0 deprecated)
 
 | link:camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc[JacksonXML] (camel-jacksonxml)
| 2.16 | Camel Jackson XML support
 
-| link:src/main/docs/serialization-dataformat.adoc[Java Object Serialization] (camel-core)
| 2.12 | Java Object Serialization data format
+| link:../camel-core/src/main/docs/serialization-dataformat.adoc[Java Object Serialization]
(camel-core) | 2.12 | Java Object Serialization data format
 
 | link:camel-jaxb/src/main/docs/jaxb-dataformat.adoc[JAXB] (camel-jaxb) | 1.0 | Camel JAXB
support
 
@@ -775,7 +775,7 @@ Number of Data Formats: 45 in 36 JAR artifacts (0 deprecated)
 
 | link:camel-soap/src/main/docs/soapjaxb-dataformat.adoc[SOAP] (camel-soap) | 2.3 | Camel
SOAP support
 
-| link:src/main/docs/string-dataformat.adoc[String Encoding] (camel-core) | 2.12 | String
(text based) data format
+| link:../camel-core/src/main/docs/string-dataformat.adoc[String Encoding] (camel-core) |
2.12 | String (text based) data format
 
 | link:camel-syslog/src/main/docs/syslog-dataformat.adoc[Syslog] (camel-syslog) | 2.6 | Camel
Syslog support
 
@@ -801,7 +801,7 @@ Number of Data Formats: 45 in 36 JAR artifacts (0 deprecated)
 
 | link:camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc[YAML SnakeYAML] (camel-snakeyaml)
| 2.17 | Camel SnakeYAML support
 
-| link:src/main/docs/zip-dataformat.adoc[Zip Deflate Compression] (camel-core) | 2.12 | Zip
compression data format (not for zip files)
+| link:../camel-core/src/main/docs/zip-dataformat.adoc[Zip Deflate Compression] (camel-core)
| 2.12 | Zip compression data format (not for zip files)
 
 | link:camel-zipfile/src/main/docs/zipfile-dataformat.adoc[Zip File] (camel-zipfile) | 2.11
| Camel Zip file support
 |=======================================================================
@@ -818,19 +818,19 @@ Number of Languages: 24 in 12 JAR artifacts (6 deprecated)
 |=======================================================================
 | Language | Available From | Description
 
-| link:src/main/docs/bean-language.adoc[Bean method] (camel-core) | 1.3 | For expressions
and predicates using a java bean (aka method call)
+| link:../camel-core/src/main/docs/bean-language.adoc[Bean method] (camel-core) | 1.3 | For
expressions and predicates using a java bean (aka method call)
 
-| link:src/main/docs/constant-language.adoc[Constant] (camel-core) | 1.5 | For expressions
and predicates using a constant
+| link:../camel-core/src/main/docs/constant-language.adoc[Constant] (camel-core) | 1.5 |
For expressions and predicates using a constant
 
 | link:camel-juel/src/main/docs/el-language.adoc[EL] (camel-juel) | 1.1 | *deprecated* For
EL expressions and predicates
 
-| link:src/main/docs/exchangeProperty-language.adoc[ExchangeProperty] (camel-core) | 2.0
| An expression which extracts the named exchange property
+| link:../camel-core/src/main/docs/exchangeProperty-language.adoc[ExchangeProperty] (camel-core)
| 2.0 | An expression which extracts the named exchange property
 
-| link:src/main/docs/file-language.adoc[File] (camel-core) | 1.1 | For expressions and predicates
using the file/simple language
+| link:../camel-core/src/main/docs/file-language.adoc[File] (camel-core) | 1.1 | For expressions
and predicates using the file/simple language
 
 | link:camel-groovy/src/main/docs/groovy-language.adoc[Groovy] (camel-groovy) | 1.3 | For
Groovy expressions and predicates
 
-| link:src/main/docs/header-language.adoc[Header] (camel-core) | 1.5 | An expression which
extracts the named exchange header
+| link:../camel-core/src/main/docs/header-language.adoc[Header] (camel-core) | 1.5 | An expression
which extracts the named exchange header
 
 | link:camel-hl7/src/main/docs/terser-language.adoc[HL7 Terser] (camel-hl7) | 2.11 | For
HL7 terser expressions and predicates
 
@@ -848,21 +848,21 @@ Number of Languages: 24 in 12 JAR artifacts (6 deprecated)
 
 | link:camel-script/src/main/docs/python-language.adoc[Python] (camel-script) | 1.0 | *deprecated*
For Python expressions and predicates
 
-| link:src/main/docs/ref-language.adoc[Ref] (camel-core) | 2.8 | For using a custom expression
or predicate
+| link:../camel-core/src/main/docs/ref-language.adoc[Ref] (camel-core) | 2.8 | For using
a custom expression or predicate
 
 | link:camel-script/src/main/docs/ruby-language.adoc[Ruby] (camel-script) | 1.0 | *deprecated*
For Ruby expressions and predicates
 
-| link:src/main/docs/simple-language.adoc[Simple] (camel-core) | 1.1 | For expressions and
predicates using the simple language
+| link:../camel-core/src/main/docs/simple-language.adoc[Simple] (camel-core) | 1.1 | For
expressions and predicates using the simple language
 
 | link:camel-spring/src/main/docs/spel-language.adoc[SpEL] (camel-spring) | 2.7 | For Spring
Expression Language (SpEL) expressions and predicates
 
 | link:camel-josql/src/main/docs/sql-language.adoc[SQL] (camel-josql) | 1.0 | *deprecated*
For SQL expressions and predicates
 
-| link:src/main/docs/tokenize-language.adoc[Tokenize] (camel-core) | 2.0 | For expressions
and predicates using a body or header tokenizer
+| link:../camel-core/src/main/docs/tokenize-language.adoc[Tokenize] (camel-core) | 2.0 |
For expressions and predicates using a body or header tokenizer
 
-| link:src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-core) | 2.14 | For expressions
and predicates using a body or header XML tokenizer
+| link:../camel-core/src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-core) | 2.14
| For expressions and predicates using a body or header XML tokenizer
 
-| link:src/main/docs/xpath-language.adoc[XPath] (camel-core) | 1.1 | For XPath expressions
and predicates
+| link:../camel-core/src/main/docs/xpath-language.adoc[XPath] (camel-core) | 1.1 | For XPath
expressions and predicates
 
 | link:camel-saxon/src/main/docs/xquery-language.adoc[XQuery] (camel-saxon) | 1.0 | For XQuery
expressions and predicates
 |=======================================================================

http://git-wip-us.apache.org/repos/asf/camel/blob/e269e10d/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReadmeMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReadmeMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReadmeMojo.java
index f14fa72..9b9ecf1 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReadmeMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReadmeMojo.java
@@ -341,7 +341,7 @@ public class PrepareReadmeMojo extends AbstractMojo {
             List<DataFormatModel> models = new ArrayList<>();
             for (File file : dataFormatFiles) {
                 String json = loadText(new FileInputStream(file));
-                DataFormatModel model = generateDataFormatModel(json);
+                DataFormatModel model = generateDataFormatModel(json, coreOnly);
 
                 // special for bindy as we have one common file
                 if (model.getName().startsWith("bindy")) {
@@ -418,7 +418,7 @@ public class PrepareReadmeMojo extends AbstractMojo {
             List<LanguageModel> models = new ArrayList<>();
             for (File file : languageFiles) {
                 String json = loadText(new FileInputStream(file));
-                LanguageModel model = generateLanguageModel(json);
+                LanguageModel model = generateLanguageModel(json, coreOnly);
                 models.add(model);
             }
 
@@ -815,10 +815,10 @@ public class PrepareReadmeMojo extends AbstractMojo {
         return other;
     }
 
-    private DataFormatModel generateDataFormatModel(String json) {
+    private DataFormatModel generateDataFormatModel(String json, boolean coreOnly) {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("dataformat",
json, false);
 
-        DataFormatModel dataFormat = new DataFormatModel();
+        DataFormatModel dataFormat = new DataFormatModel(coreOnly);
         dataFormat.setName(JSonSchemaHelper.getSafeValue("name", rows));
         dataFormat.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
         dataFormat.setModelName(JSonSchemaHelper.getSafeValue("modelName", rows));
@@ -834,10 +834,10 @@ public class PrepareReadmeMojo extends AbstractMojo {
         return dataFormat;
     }
 
-    private LanguageModel generateLanguageModel(String json) {
+    private LanguageModel generateLanguageModel(String json, boolean coreOnly) {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("language",
json, false);
 
-        LanguageModel language = new LanguageModel();
+        LanguageModel language = new LanguageModel(coreOnly);
         language.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
         language.setName(JSonSchemaHelper.getSafeValue("name", rows));
         language.setModelName(JSonSchemaHelper.getSafeValue("modelName", rows));

http://git-wip-us.apache.org/repos/asf/camel/blob/e269e10d/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
index 74047a8..f35dd1a 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
@@ -23,6 +23,8 @@ import static org.apache.camel.maven.packaging.StringHelper.cutLastZeroDigit;
 
 public class DataFormatModel {
 
+    private final boolean coreOnly;
+
     private String kind;
     private String name;
     private String modelName;
@@ -37,6 +39,14 @@ public class DataFormatModel {
     private String version;
     private final List<DataFormatOptionModel> dataFormatOptions = new ArrayList<DataFormatOptionModel>();
 
+    public DataFormatModel() {
+        this(false);
+    }
+
+    public DataFormatModel(boolean coreOnly) {
+        this.coreOnly = coreOnly;
+    }
+
     public String getKind() {
         return kind;
     }
@@ -159,7 +169,7 @@ public class DataFormatModel {
 
     public String getDocLink() {
         if ("camel-core".equals(artifactId)) {
-            return "src/main/docs";
+            return coreOnly ? "src/main/docs" : "../camel-core/src/main/docs";
         } else {
             return artifactId + "/src/main/docs";
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/e269e10d/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
index 79067bf..137e55d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
@@ -23,6 +23,8 @@ import static org.apache.camel.maven.packaging.StringHelper.cutLastZeroDigit;
 
 public class LanguageModel {
 
+    private final boolean coreOnly;
+
     private String kind;
     private String name;
     private String modelName;
@@ -37,6 +39,14 @@ public class LanguageModel {
     private String version;
     private final List<LanguageOptionModel> languageOptions = new ArrayList<LanguageOptionModel>();
 
+    public LanguageModel() {
+        this(false);
+    }
+
+    public LanguageModel(boolean coreOnly) {
+        this.coreOnly = coreOnly;
+    }
+
     public String getKind() {
         return kind;
     }
@@ -159,7 +169,7 @@ public class LanguageModel {
 
     public String getDocLink() {
         if ("camel-core".equals(artifactId)) {
-            return "src/main/docs";
+            return coreOnly ? "src/main/docs" : "../camel-core/src/main/docs";
         } else {
             return artifactId + "/src/main/docs";
         }


Mime
View raw message