camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] 01/04: Add camel-as2 to maven tooling for component docs
Date Wed, 06 Jun 2018 07:27:28 GMT
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 845ae9560d31edaebb22b36da9ecbe85b249ec29
Author: Claus Ibsen <claus.ibsen@gmail.com>
AuthorDate: Wed Jun 6 08:45:30 2018 +0200

    Add camel-as2 to maven tooling for component docs
---
 .../org/apache/camel/maven/packaging/PackageHelper.java     |  5 +++--
 .../camel/maven/packaging/PrepareCatalogKarafMojo.java      | 13 +++++++++----
 .../apache/camel/maven/packaging/PrepareCatalogMojo.java    | 11 ++++++++---
 .../camel/maven/packaging/PrepareCatalogSpringBootMojo.java | 13 +++++++++----
 .../apache/camel/maven/packaging/model/ComponentModel.java  |  4 +++-
 5 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
index 3174f1b..4bdc8f7 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
@@ -167,11 +167,12 @@ public final class PackageHelper {
             String name = pathname.getName();
             boolean special = "camel-core-osgi".equals(name)
                 || "camel-core-xml".equals(name)
-                || "camel-box".equals(name)
                 || "camel-http-common".equals(name)
                 || "camel-jetty".equals(name)
                 || "camel-jetty-common".equals(name);
-            boolean special2 = "camel-linkedin".equals(name)
+            boolean special2 = "camel-as2".equals(name)
+                || "camel-box".equals(name)
+                || "camel-linkedin".equals(name)
                 || "camel-olingo2".equals(name)
                 || "camel-olingo4".equals(name)
                 || "camel-salesforce".equals(name);
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
index 8a57af4..3529522 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
@@ -154,8 +154,12 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
                             continue;
                         }
 
-                        // special for camel-salesforce which is in a sub dir
-                        if ("camel-salesforce".equals(dir.getName())) {
+                        // special for some components which is in a sub dir
+                        if ("camel-as2".equals(dir.getName())) {
+                            target = new File(dir, "camel-as2-component/target/classes");
+                        } else if ("camel-box".equals(dir.getName())) {
+                            target = new File(dir, "camel-box-component/target/classes");
+                        } else if ("camel-salesforce".equals(dir.getName())) {
                             target = new File(dir, "camel-salesforce-component/target/classes");
                         } else if ("camel-linkedin".equals(dir.getName())) {
                             target = new File(dir, "camel-linkedin-component/target/classes");
@@ -379,11 +383,12 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
                     // (camel-jetty is a placeholder, as camel-jetty9 is the actual component)
                     boolean special = "camel-core-osgi".equals(dir.getName())
                         || "camel-core-xml".equals(dir.getName())
-                        || "camel-box".equals(dir.getName())
                         || "camel-http-common".equals(dir.getName())
                         || "camel-jetty".equals(dir.getName())
                         || "camel-jetty-common".equals(dir.getName());
-                    boolean special2 = "camel-linkedin".equals(dir.getName())
+                    boolean special2 = "camel-as2".equals(dir.getName())
+                        || "camel-box".equals(dir.getName())
+                        || "camel-linkedin".equals(dir.getName())
                         || "camel-olingo2".equals(dir.getName())
                         || "camel-olingo4".equals(dir.getName())
                         || "camel-servicenow".equals(dir.getName())
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
index d12b84f..357a5b1 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
@@ -343,7 +343,9 @@ public class PrepareCatalogMojo extends AbstractMojo {
                         File target = new File(dir, "target/classes");
 
                         // special for these as they are in sub dir
-                        if ("camel-salesforce".equals(dir.getName())) {
+                        if ("camel-as2".equals(dir.getName())) {
+                            target = new File(dir, "camel-as2-component/target/classes");
+                        } else if ("camel-salesforce".equals(dir.getName())) {
                             target = new File(dir, "camel-salesforce-component/target/classes");
                         } else if ("camel-linkedin".equals(dir.getName())) {
                             target = new File(dir, "camel-linkedin-component/target/classes");
@@ -794,7 +796,8 @@ public class PrepareCatalogMojo extends AbstractMojo {
                         || "camel-http-common".equals(dir.getName())
                         || "camel-jetty".equals(dir.getName())
                         || "camel-jetty-common".equals(dir.getName());
-                    boolean special2 = "camel-linkedin".equals(dir.getName())
+                    boolean special2 = "camel-as2".equals(dir.getName())
+                        || "camel-linkedin".equals(dir.getName())
                         || "camel-olingo2".equals(dir.getName())
                         || "camel-olingo4".equals(dir.getName())
                         || "camel-servicenow".equals(dir.getName())
@@ -964,7 +967,9 @@ public class PrepareCatalogMojo extends AbstractMojo {
                         File target = new File(dir, "src/main/docs");
 
                         // special for these as they are in sub dir
-                        if ("camel-salesforce".equals(dir.getName())) {
+                        if ("camel-as3".equals(dir.getName())) {
+                            target = new File(dir, "camel-as2-component/src/main/docs");
+                        } else if ("camel-salesforce".equals(dir.getName())) {
                             target = new File(dir, "camel-salesforce-component/src/main/docs");
                         } else if ("camel-linkedin".equals(dir.getName())) {
                             target = new File(dir, "camel-linkedin-component/src/main/docs");
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
index 94ff4b9..9bdbb73 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
@@ -150,8 +150,12 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
                             continue;
                         }
 
-                        // special for camel-salesforce which is in a sub dir
-                        if ("camel-salesforce".equals(dir.getName())) {
+                        // special for some which is in a sub dir
+                        if ("camel-as2".equals(dir.getName())) {
+                            target = new File(dir, "camel-as2-component/target/classes");
+                        } else if ("camel-box".equals(dir.getName())) {
+                            target = new File(dir, "camel-box-component/target/classes");
+                        } else if ("camel-salesforce".equals(dir.getName())) {
                             target = new File(dir, "camel-salesforce-component/target/classes");
                         } else if ("camel-linkedin".equals(dir.getName())) {
                             target = new File(dir, "camel-linkedin-component/target/classes");
@@ -409,11 +413,12 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
                     // (camel-jetty is a placeholder, as camel-jetty9 is the actual component)
                     boolean special = "camel-core-osgi".equals(dir.getName())
                         || "camel-core-xml".equals(dir.getName())
-                        || "camel-box".equals(dir.getName())
                         || "camel-http-common".equals(dir.getName())
                         || "camel-jetty".equals(dir.getName())
                         || "camel-jetty-common".equals(dir.getName());
-                    boolean special2 = "camel-linkedin".equals(dir.getName())
+                    boolean special2 = "camel-as2".equals(dir.getName())
+                        || "camel-box".equals(dir.getName())
+                        || "camel-linkedin".equals(dir.getName())
                         || "camel-olingo2".equals(dir.getName())
                         || "camel-olingo4".equals(dir.getName())
                         || "camel-servicenow".equals(dir.getName())
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
index a182dae..eb2018d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
@@ -228,7 +228,9 @@ public class ComponentModel {
 
     public String getDocLink() {
         // special for these components
-        if ("camel-box".equals(artifactId)) {
+        if ("camel-as2".equals(artifactId)) {
+            return "camel-as2/camel-as2-component/src/main/docs";
+        } else if ("camel-box".equals(artifactId)) {
             return "camel-box/camel-box-component/src/main/docs";
         } else if ("camel-linkedin".equals(artifactId)) {
             return "camel-linkedin/camel-linkedin-component/src/main/docs";

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

Mime
View raw message