camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/8] camel git commit: Minor refactoring
Date Tue, 10 Feb 2015 10:02:16 GMT
Minor refactoring


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

Branch: refs/heads/master
Commit: da1036db1596a389c01c50550a6be1935c9d55af
Parents: 5279296
Author: nkukhar <kukhar.n@gmail.com>
Authored: Sun Feb 8 23:20:51 2015 -0800
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Feb 10 09:50:07 2015 +0100

----------------------------------------------------------------------
 components/camel-spring/pom.xml                  | 19 +++++++++++++++++--
 .../java/org/apache/camel/maven/DomParser.java   |  4 ----
 .../maven/EipDocumentationGeneratorMojo.java     |  8 +++-----
 .../org/apache/camel/maven/PackageHelper.java    |  5 +++--
 4 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/da1036db/components/camel-spring/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/pom.xml b/components/camel-spring/pom.xml
index e6e4ccc..4714cab 100644
--- a/components/camel-spring/pom.xml
+++ b/components/camel-spring/pom.xml
@@ -377,9 +377,24 @@
           </execution>
         </executions>
       </plugin>
-
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-eip-documentation-enricher-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>eip-documentation-enricher</id>
+            <phase>package</phase>
+            <goals>
+              <goal>eip-documentation-enricher</goal>
+            </goals>
+            <configuration>
+              <inputCamelSchemaFile>${project.build.directory}/schema/camel-spring.xsd</inputCamelSchemaFile>
+              <outputCamelSchemaFile>${project.build.directory}/schema/camel-spring.xsd</outputCamelSchemaFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
-
     <pluginManagement>
         <plugins>
             <plugin>

http://git-wip-us.apache.org/repos/asf/camel/blob/da1036db/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/DomParser.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/DomParser.java
b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/DomParser.java
index 4d447b9..6149421 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/DomParser.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/DomParser.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.maven;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.NodeList;
 
@@ -26,8 +24,6 @@ import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
 
 public class DomParser {
-  private final Logger logger = LoggerFactory.getLogger(DomParser.class);
-
 
   public NodeList findElementsAndTypes(Document document, XPath xPath) throws XPathExpressionException
{
     return  (NodeList) xPath.compile("/xs:schema/xs:element")

http://git-wip-us.apache.org/repos/asf/camel/blob/da1036db/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationGeneratorMojo.java
b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationGeneratorMojo.java
index 1a8b5d8..7a4a0c1 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationGeneratorMojo.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationGeneratorMojo.java
@@ -23,8 +23,6 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -48,7 +46,6 @@ import java.util.Map;
 @Mojo(name = "eip-documentation-enricher", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,
requiresProject = true,
     defaultPhase = LifecyclePhase.PACKAGE)
 public class EipDocumentationGeneratorMojo extends AbstractMojo {
-  private final Logger logger = LoggerFactory.getLogger(EipDocumentationGeneratorMojo.class);
 
   /**
    * Project's source directory as specified in the POM.
@@ -59,7 +56,6 @@ public class EipDocumentationGeneratorMojo extends AbstractMojo {
   @Parameter(required = true)
   File outputCamelSchemaFile;
 
-//  @Parameter(defaultValue = "${project.build.directory}/../../../..//camel-core")
   @Parameter(defaultValue = "${project.build.directory}/../../..//camel-core")
   File camelCoreDir;
 
@@ -97,7 +93,9 @@ public class EipDocumentationGeneratorMojo extends AbstractMojo {
       String type = item.getAttribute(Constants.TYPE_ATTRIBUTE_NAME);
       if (name != null && type != null) {
         type = type.replaceAll("tns:", "");
-        logger.debug("Putting attributes type:'{}', name:'{}'", name, type);
+        if (getLog().isDebugEnabled()) {
+          getLog().debug(String.format("Putting attributes type:'%s', name:'%s'", name, type));
+        }
         typeToNameMap.put(type, name);
       }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/da1036db/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/PackageHelper.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/PackageHelper.java
b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/PackageHelper.java
index c99ca10..67ec981 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/PackageHelper.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/PackageHelper.java
@@ -16,13 +16,14 @@
  */
 package org.apache.camel.maven;
 
-import java.io.*;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
 import java.nio.charset.Charset;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 public class PackageHelper {
   private PackageHelper() {


Mime
View raw message