svn commit: r566723 - in /activemq/camel/trunk: examples/ examples/camel-example-spring/ tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r566723 - in /activemq/camel/trunk: examples/ examples/camel-example-spring/ tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/

jstrachan-2
Author: jstrachan
Date: Thu Aug 16 07:06:39 2007
New Revision: 566723

URL: http://svn.apache.org/viewvc?view=rev&rev=566723
Log:
log an error, rather than failing, if the camel:embedded fails to start during the 'mvn site' report generation. Also enabled reports by default on the examples

Modified:
    activemq/camel/trunk/examples/camel-example-spring/pom.xml
    activemq/camel/trunk/examples/pom.xml
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java

Modified: activemq/camel/trunk/examples/camel-example-spring/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/pom.xml?view=diff&rev=566723&r1=566722&r2=566723
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/pom.xml (original)
+++ activemq/camel/trunk/examples/camel-example-spring/pom.xml Thu Aug 16 07:06:39 2007
@@ -62,14 +62,4 @@
     </plugins>
 
   </build>
-
-  <reporting>
-    <plugins>
-      <!-- lets generate nice PNG / SVG diagrams from our routes -->
-      <plugin>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </reporting>
 </project>

Modified: activemq/camel/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/pom.xml?view=diff&rev=566723&r1=566722&r2=566723
==============================================================================
--- activemq/camel/trunk/examples/pom.xml (original)
+++ activemq/camel/trunk/examples/pom.xml Thu Aug 16 07:06:39 2007
@@ -95,4 +95,14 @@
     </profile>
   </profiles>
 
+
+  <reporting>
+    <plugins>
+      <!-- lets generate nice PNG / SVG diagrams from our routes -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>

Modified: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java?view=diff&rev=566723&r1=566722&r2=566723
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java Thu Aug 16 07:06:39 2007
@@ -254,7 +254,7 @@
         }
     }
 
-    protected void runCamelEmbedded(File outputDir) throws DependencyResolutionRequiredException, MojoExecutionException {
+    protected void runCamelEmbedded(File outputDir) throws DependencyResolutionRequiredException {
         if (runCamel) {
             getLog().info("Running Camel embedded to load META-INF/spring/*.xml files");
 
@@ -269,7 +269,12 @@
             mojo.setLog(getLog());
             mojo.setOutputDirectory(outputDir);
             mojo.setPluginContext(getPluginContext());
-            mojo.execute();
+            try {
+                mojo.executeWithoutWrapping();
+            }
+            catch (Exception e) {
+                getLog().error("Failed to run Camel embedded: " + e, e);
+            }
         }
     }
 

Modified: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java?view=diff&rev=566723&r1=566722&r2=566723
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java Thu Aug 16 07:06:39 2007
@@ -80,14 +80,20 @@
      * This method will run the mojo
      */
     public void execute() throws MojoExecutionException {
+        try {
+            executeWithoutWrapping();
+        }
+        catch (Exception e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        }
+    }
+
+    public void executeWithoutWrapping() throws MalformedURLException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, MojoExecutionException {
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
             ClassLoader newLoader = createClassLoader(oldClassLoader);
             Thread.currentThread().setContextClassLoader(newLoader);
             runCamel(newLoader);
-        }
-        catch (Exception e) {
-            throw new MojoExecutionException("Failed: " + e, e);
         }
         finally {
             Thread.currentThread().setContextClassLoader(oldClassLoader);