You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/06/15 18:58:40 UTC

svn commit: r547741 [1/2] - in /activemq/camel/trunk: ./ components/camel-spring/ components/camel-spring/src/main/java/org/apache/camel/spring/ components/camel-spring/src/test/resources/META-INF/spring/ examples/ examples/camel-example-spring/ exampl...

Author: jstrachan
Date: Fri Jun 15 09:58:36 2007
New Revision: 547741

URL: http://svn.apache.org/viewvc?view=rev&rev=547741
Log:
added a simple spring based example, together with an attempt to create a 'mvn camel:run' plugin for running spring camel rules

Added:
    activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/
    activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring/
    activemq/camel/trunk/examples/camel-example-spring/README.txt   (with props)
    activemq/camel/trunk/examples/camel-example-spring/pom.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring/src/
    activemq/camel/trunk/examples/camel-example-spring/src/main/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt   (with props)
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt   (with props)
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/
    activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml   (with props)
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml   (with props)
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java   (with props)
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt   (with props)
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/NOTICE.txt   (with props)
    activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/resources/META-INF/LICENSE.txt
      - copied unchanged from r547588, activemq/camel/trunk/components/camel-spring/src/main/resources/META-INF/LICENSE.txt
    activemq/camel/trunk/tooling/maven/pom.xml   (with props)
    activemq/camel/trunk/tooling/pom.xml   (with props)
Modified:
    activemq/camel/trunk/components/camel-spring/pom.xml
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
    activemq/camel/trunk/examples/pom.xml
    activemq/camel/trunk/pom.xml
    activemq/camel/trunk/tooling/maven/maven-html-to-docbook/pom.xml

Modified: activemq/camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/pom.xml?view=diff&rev=547741&r1=547740&r2=547741
==============================================================================
--- activemq/camel/trunk/components/camel-spring/pom.xml (original)
+++ activemq/camel/trunk/components/camel-spring/pom.xml Fri Jun 15 09:58:36 2007
@@ -107,6 +107,7 @@
           </dependency>
         </dependencies>
       </plugin>
+
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>
@@ -139,6 +140,22 @@
             </goals>
           </execution>
         </executions>
+      </plugin>
+
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>java</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <mainClass>org.apache.camel.spring.Main</mainClass>
+        </configuration>
       </plugin>
     </plugins>
   </build>

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java?view=diff&rev=547741&r1=547740&r2=547741
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java Fri Jun 15 09:58:36 2007
@@ -16,6 +16,11 @@
  */
 package org.apache.camel.spring;
 
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractApplicationContext;
+import org.apache.camel.impl.ServiceSupport;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedList;
@@ -29,17 +34,18 @@
  *
  * @version $Revision: $
  */
-public class Main {
-
-    private String applicationContextUri;
+public class Main extends ServiceSupport {
+    private String applicationContextUri = "META-INF/spring/*.xml";
 
+    private AbstractApplicationContext applicationContext;
     private List<Option> options = new ArrayList<Option>();
     private CountDownLatch latch = new CountDownLatch(1);
     private AtomicBoolean completed = new AtomicBoolean(false);
 
     public static void main(String[] args) {
         Main main = new Main();
-        main.run(args);
+        main.parseArguments(args);
+        main.run();
     }
 
     public Main() {
@@ -49,39 +55,27 @@
                 completed();
             }
         });
-    }
 
+        addOption(new ParameterOption("a", "applicationContext", "Sets the classpath based pring ApplicationContext", "applicationContext") {
+            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
+                setApplicationContextUri(parameter);
+            }
+        });
+    }
 
     /**
      * Runs this process with the given arguments
      */
-    public void run(String[] args) {
-        if (!parseArguments(args)) {
-            showOptions();
-            return;
-        }
+    public void run() {
         if (!completed.get()) {
-            start();
-            waitUntilCompleted();
-            stop();
-        }
-    }
-
-    protected void start() {
-        // TODO
-    }
-
-    protected void stop() {
-        // TODO
-    }
-
-    protected void waitUntilCompleted() {
-        while (!completed.get()) {
             try {
-                latch.await();
-            }
-            catch (InterruptedException e) {
-                // ignore
+                start();
+                waitUntilCompleted();
+                stop();
+            }
+            catch (Exception e) {
+                System.out.println("Failed: " + e);
+                e.printStackTrace();
             }
         }
     }
@@ -99,19 +93,21 @@
      */
     public void showOptions() {
         System.out.println("Apache Camel Runner takes the following options");
+        System.out.println();
 
         for (Option option : options) {
-            System.out.println("  -" + option.getAbbreviation() + " or -" + option.getFullName()
+            System.out.println("  " + option.getAbbreviation() + " or " + option.getFullName()
                     + " = " + option.getDescription());
         }
     }
 
-    public boolean parseArguments(String[] arguments) {
+    /**
+     * Parses the commandl ine arguments
+     */
+    public void parseArguments(String[] arguments) {
         LinkedList<String> args = new LinkedList<String>(Arrays.asList(arguments));
 
-        if (args.isEmpty()) {
-            return false;
-        }
+        boolean valid = true;
         while (!args.isEmpty()) {
             String arg = args.removeFirst();
 
@@ -124,32 +120,34 @@
             }
             if (!handled) {
                 System.out.println("Unknown option: " + arg);
-                return false;
+                System.out.println();
+                valid = false;
+                break;
             }
         }
-        return true;
-
+        if (!valid) {
+            showOptions();
+            completed();
+        }
     }
 
-
     public void addOption(Option option) {
         options.add(option);
     }
 
-
     public abstract class Option {
         private String abbreviation;
         private String fullName;
         private String description;
 
         protected Option(String abbreviation, String fullName, String description) {
-            this.abbreviation = abbreviation;
-            this.fullName = fullName;
+            this.abbreviation = "-" + abbreviation;
+            this.fullName = "-" + fullName;
             this.description = description;
         }
 
         public boolean processOption(String arg, LinkedList<String> remainingArgs) {
-            if (arg.equalsIgnoreCase(abbreviation) || fullName.startsWith(fullName)) {
+            if (arg.equalsIgnoreCase(abbreviation) || fullName.startsWith(arg)) {
                 doProcess(arg, remainingArgs);
                 return true;
             }
@@ -171,4 +169,74 @@
         protected abstract void doProcess(String arg, LinkedList<String> remainingArgs);
     }
 
+    public abstract class ParameterOption extends Option {
+        private String parameterName;
+
+        protected ParameterOption(String abbreviation, String fullName, String description, String parameterName) {
+            super(abbreviation, fullName, description);
+            this.parameterName = parameterName;
+        }
+
+        protected void doProcess(String arg, LinkedList<String> remainingArgs) {
+            if (remainingArgs.isEmpty()) {
+                System.err.println("Expected fileName for ");
+                showOptions();
+                completed();
+            }
+            else {
+                String parameter = remainingArgs.removeFirst();
+                doProcess(arg, parameter, remainingArgs);
+            }
+        }
+
+        protected abstract void doProcess(String arg, String parameter, LinkedList<String> remainingArgs);
+    }
+
+    // Properties
+    //-------------------------------------------------------------------------
+    public AbstractApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
+
+    public void setApplicationContext(AbstractApplicationContext applicationContext) {
+        this.applicationContext = applicationContext;
+    }
+
+    public String getApplicationContextUri() {
+        return applicationContextUri;
+    }
+
+    public void setApplicationContextUri(String applicationContextUri) {
+        this.applicationContextUri = applicationContextUri;
+    }
+
+    // Implementation methods
+    //-------------------------------------------------------------------------
+    protected void doStart() throws Exception {
+        if (applicationContext == null) {
+            applicationContext = createDefaultApplicationContext();
+        }
+        applicationContext.start();
+    }
+
+    protected AbstractApplicationContext createDefaultApplicationContext() {
+        return new ClassPathXmlApplicationContext(getApplicationContextUri());
+    }
+
+    protected void doStop() throws Exception {
+        if (applicationContext != null) {
+            applicationContext.close();
+        }
+    }
+
+    protected void waitUntilCompleted() {
+        while (!completed.get()) {
+            try {
+                latch.await();
+            }
+            catch (InterruptedException e) {
+                // ignore
+            }
+        }
+    }
 }

Added: activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml (added)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml Fri Jun 15 09:58:36 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!--
+
+  The default Application Context used by the org.apache.camel.spring.Main if there
+  is no /META-INF/sprint.xml
+
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://activemq.apache.org/camel/schema/camel-1.0.xsd http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd" packages="org.apache.camel.builder.RouteBuilder">
+  </camelContext>
+
+</beans>

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/examples/camel-example-spring/README.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/README.txt?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/README.txt (added)
+++ activemq/camel/trunk/examples/camel-example-spring/README.txt Fri Jun 15 09:58:36 2007
@@ -0,0 +1,23 @@
+Spring Example
+==============
+
+This example shows how to work with files and JMS, using Spring to boot up Camel
+and configure the routes.
+
+The example consumes messages from a queue and writes them to the file system.
+
+To run the example type
+  mvn camel:java
+
+For the latest & greatest documentation on how to use this example please see
+  http://activemq.apache.org/camel/spring-example.html
+
+If you hit any problems please talk to us on the Camel Forums
+  http://activemq.apache.org/camel/discussion-forums.html
+
+Please help us make Apache Camel better - we appreciate any feedback you may have.
+Enjoy!
+
+------------------------
+The Camel riders!
+

Propchange: activemq/camel/trunk/examples/camel-example-spring/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/pom.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring/pom.xml Fri Jun 15 09:58:36 2007
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-example-spring</artifactId>
+  <name>Camel :: Example :: Spring</name>
+  <description>An example showing how to work with Camel and Spring</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>apache-activemq</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: activemq/camel/trunk/examples/camel-example-spring/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java Fri Jun 15 09:58:36 2007
@@ -0,0 +1,40 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.example.spring;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * A simple example router from an ActiveMQ queue to a file system
+ *
+ * @version $Revision: 1.1 $
+ */
+public class MyRouteBuilder extends RouteBuilder {
+    public void configure() {
+        from("activemq:test.MyQueue").to("file://test");
+
+        // set up a listener on the file component
+        from("file://test").process(new Processor() {
+            public void process(Exchange e) {
+                System.out.println("Received exchange: " + e.getIn());
+            }
+        });
+    }
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt (added)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt Fri Jun 15 09:58:36 2007
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

Propchange: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt (added)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt Fri Jun 15 09:58:36 2007
@@ -0,0 +1,11 @@
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Apache Camel distribution.                    ==
+   =========================================================================
+
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Please read the different LICENSE files present in the licenses directory of
+   this distribution.

Propchange: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml Fri Jun 15 09:58:36 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!--
+
+  The default Application Context used by the org.apache.camel.spring.Main if there
+  is no /META-INF/sprint.xml
+
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://activemq.apache.org/camel/schema/camel-1.0.xsd http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd" packages="org.apache.camel.example.spring">
+  </camelContext>
+
+</beans>

Propchange: activemq/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/pom.xml?view=diff&rev=547741&r1=547740&r2=547741
==============================================================================
--- activemq/camel/trunk/examples/pom.xml (original)
+++ activemq/camel/trunk/examples/pom.xml Fri Jun 15 09:58:36 2007
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -15,10 +14,7 @@
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -35,6 +31,8 @@
 
   <modules>
     <module>camel-example-jms-file</module>
+    <module>camel-example-spring</module>
+    <!--<module>camel-example-osgi</module>-->
   </modules>
 
-</project>
+</project>
\ No newline at end of file

Modified: activemq/camel/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/pom.xml?view=diff&rev=547741&r1=547740&r2=547741
==============================================================================
--- activemq/camel/trunk/pom.xml (original)
+++ activemq/camel/trunk/pom.xml Fri Jun 15 09:58:36 2007
@@ -139,7 +139,7 @@
     <module>camel-core</module>
     <module>components</module>
     <module>examples</module>
-    <!-- <module>tooling</module> -->
+    <module>tooling</module>
   </modules>
 
   <scm>
@@ -504,7 +504,7 @@
 
   <build>
     <defaultGoal>install</defaultGoal>
-    
+
     <pluginManagement>
       <plugins>
         <plugin>
@@ -662,7 +662,7 @@
               <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
               <excludes>
                 <exclude>**/target/**/*</exclude>
-                
+
                 <!-- left around after creating the site -->
                 <exclude>**/cobertura.ser</exclude>
 
@@ -683,19 +683,19 @@
           </plugin>
         </plugins>
       </build>
-<!--
-      TODO this barfs
-      
-      <reporting>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>rat-maven-plugin</artifactId>
-            <version>1.0-alpha-1-SNAPSHOT</version>
-          </plugin>
-        </plugins>
-      </reporting>
--->
+      <!--
+            TODO this barfs
+
+            <reporting>
+              <plugins>
+                <plugin>
+                  <groupId>org.codehaus.mojo</groupId>
+                  <artifactId>rat-maven-plugin</artifactId>
+                  <version>1.0-alpha-1-SNAPSHOT</version>
+                </plugin>
+              </plugins>
+            </reporting>
+      -->
       <repositories>
         <repository>
           <releases>

Added: activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml (added)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml Fri Jun 15 09:58:36 2007
@@ -0,0 +1,61 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+   
+    http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>maven-plugins</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>Camel :: Maven Camel Plugin</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.mojo</groupId>
+      <artifactId>exec-maven-plugin</artifactId>
+      <version>1.1-beta-1</version>
+      <!--<version>1.0.2</version>-->
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-9</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: activemq/camel/trunk/tooling/maven/camel-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java (added)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java Fri Jun 15 09:58:36 2007
@@ -0,0 +1,826 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.maven; 
+
+import org.codehaus.mojo.exec.*;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.artifact.MavenMetadataSource;
+
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Exclusion;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * Runs a CamelContext using any Spring XML configuration files found in <code>META-INF/spring/*.xml</code>
+ * and starting up the context.
+ *
+ *
+ * @goal run
+ * @requiresDependencyResolution runtime
+ * @execute phase="validate"
+ */
+public class RunCamelMojo
+    extends AbstractExecMojo
+{
+
+    // TODO
+    // if we could avoid the mega-cut-n-paste it would really really help!
+    // ideally all I wanna do is auto-default 2 values!
+    
+
+    /**
+     * @component
+     */
+    private ArtifactResolver artifactResolver;
+
+    /**
+     * @component
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * @component
+     */
+    private ArtifactMetadataSource metadataSource;
+
+    /**
+     * @parameter expression="${localRepository}"
+     * @required
+     * @readonly
+     */
+    private ArtifactRepository localRepository;
+
+    /**
+     * @parameter expression="${project.remoteArtifactRepositories}"
+     */
+    private List remoteRepositories;
+
+    /**
+     * @component
+     */
+    private MavenProjectBuilder projectBuilder;
+
+    /**
+     * @parameter expression="${plugin.artifacts}"
+     * @readonly
+     */
+    private List pluginDependencies;
+
+    /**
+     * The main class to execute.
+     *
+     * @parameter expression="${camel.mainClass}" default-value="org.apache.camel.spring.Main"
+     * @required
+     */
+    private String mainClass;
+
+    /**
+     * The class arguments.
+     *
+     * @parameter expression="${camel.applicationContext}"
+     */
+    private String[] arguments;
+
+    /**
+     * A list of system properties to be passed. Note: as the execution is not forked, some system properties
+     * required by the JVM cannot be passed here. Use MAVEN_OPTS or the exec:exec instead. See the user guide for
+     * more information.
+     *
+     * @parameter
+     */
+    private Property[] systemProperties;
+
+    /**
+     * Deprecated; this is not needed anymore.
+     * Indicates if mojo should be kept running after the mainclass terminates.
+     * Usefull for serverlike apps with deamonthreads.
+     *
+     * @parameter expression="${camel.keepAlive}" default-value="false"
+     */
+    private boolean keepAlive;
+
+    /**
+     * Indicates if the project dependencies should be used when executing
+     * the main class.
+     *
+     * @parameter expression="${camel.includeProjectDependencies}" default-value="true"
+     */
+    private boolean includeProjectDependencies;
+
+    /**
+     * Indicates if this plugin's dependencies should be used when executing
+     * the main class.
+     * <p/>
+     * This is useful when project dependencies are not appropriate.  Using only
+     * the plugin dependencies can be particularly useful when the project is
+     * not a java project.  For example a mvn project using the csharp plugins
+     * only expects to see dotnet libraries as dependencies.
+     *
+     * @parameter expression="${camel.includePluginDependencies}" default-value="false"
+     */
+    private boolean includePluginDependencies;
+
+    /**
+     * If provided the ExecutableDependency identifies which of the plugin dependencies
+     * contains the executable class.  This will have the affect of only including
+     * plugin dependencies required by the identified ExecutableDependency.
+     * <p/>
+     * If includeProjectDependencies is set to <code>true</code>, all of the project dependencies
+     * will be included on the executable's classpath.  Whether a particular project
+     * dependency is a dependency of the identified ExecutableDependency will be
+     * irrelevant to its inclusion in the classpath.
+     *
+     * @parameter
+     * @optional
+     */
+    private ExecutableDependency executableDependency;
+
+    /**
+     * Wether to interrupt/join and possibly stop the daemon threads upon quitting. <br/> If this is <code>false</code>,
+     *  maven does nothing about the daemon threads.  When maven has no more work to do, the VM will normally terminate
+     *  any remaining daemon threads.
+     * <p>
+     * In certain cases (in particular if maven is embedded),
+     *  you might need to keep this enabled to make sure threads are properly cleaned up to ensure they don't interfere
+     * with subsequent activity.
+     * In that case, see {@link #daemonThreadJoinTimeout} and
+     * {@link #stopUnresponsiveDaemonThreads} for further tuning.
+     * </p>
+     * @parameter expression="${camel.cleanupDaemonThreads} default-value="true"
+     */
+     private boolean cleanupDaemonThreads;
+
+     /**
+     * This defines the number of milliseconds to wait for daemon threads to quit following their interruption.<br/>
+     * This is only taken into account if {@link #cleanupDaemonThreads} is <code>true</code>.
+     * A value &lt;=0 means to not timeout (i.e. wait indefinitely for threads to finish). Following a timeout, a
+     * warning will be logged.
+     * <p>Note: properly coded threads <i>should</i> terminate upon interruption but some threads may prove
+     * problematic:  as the VM does interrupt daemon threads, some code may not have been written to handle
+     * interruption properly. For example java.util.Timer is known to not handle interruptions in JDK &lt;= 1.6.
+     * So it is not possible for us to infinitely wait by default otherwise maven could hang. A  sensible default
+     * value has been chosen, but this default value <i>may change</i> in the future based on user feedback.</p>
+     * @parameter expression="${camel.daemonThreadJoinTimeout}" default-value="15000"
+     */
+    private long daemonThreadJoinTimeout;
+
+    /**
+     * Wether to call {@link Thread#stop()} following a timing out of waiting for an interrupted thread to finish.
+     * This is only taken into account if {@link #cleanupDaemonThreads} is <code>true</code>
+     * and the {@link #daemonThreadJoinTimeout} threshold has been reached for an uncooperative thread.
+     * If this is <code>false</code>, or if {@link Thread#stop()} fails to get the thread to stop, then
+     * a warning is logged and Maven will continue on while the affected threads (and related objects in memory)
+     * linger on.  Consider setting this to <code>true</code> if you are invoking problematic code that you can't fix.
+     * An example is {@link java.util.Timer} which doesn't respond to interruption.  To have <code>Timer</code>
+     * fixed, vote for <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6336543">this bug</a>.
+     * @parameter expression="${camel.stopUnresponsiveDaemonThreads} default-value="false"
+     */
+    private boolean stopUnresponsiveDaemonThreads;
+
+    /**
+     * Deprecated this is not needed anymore.
+     *
+     * @parameter expression="${camel.killAfter}" default-value="-1"
+     */
+    private long killAfter;
+
+    private Properties originalSystemProperties;
+
+    /**
+     * Execute goal.
+     * @throws MojoExecutionException execution of the main class or one of the threads it generated failed.
+     * @throws MojoFailureException something bad happened...
+     */
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( killAfter != -1 )
+        {
+            getLog().warn( "Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6." );
+        }
+
+        if ( null == arguments )
+        {
+            arguments = new String[0];
+        }
+
+        if ( getLog().isDebugEnabled() )
+        {
+            StringBuffer msg = new StringBuffer( "Invoking : " );
+            msg.append( mainClass );
+            msg.append( ".main(" );
+            for ( int i = 0; i < arguments.length; i++ )
+            {
+                if ( i > 0 )
+                {
+                    msg.append( ", " );
+                }
+                msg.append( arguments[i] );
+            }
+            msg.append( ")" );
+            getLog().debug(  msg );
+        }
+
+        IsolatedThreadGroup threadGroup = new IsolatedThreadGroup( mainClass /*name*/ );
+        Thread bootstrapThread = new Thread( threadGroup, new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    Method main = Thread.currentThread().getContextClassLoader().loadClass( mainClass )
+                        .getMethod( "main", new Class[]{ String[].class } );
+                    if ( ! main.isAccessible() )
+                    {
+                        getLog().debug( "Setting accessibility to true in order to invoke main()." );
+                        main.setAccessible( true );
+                    }
+                    main.invoke( main, new Object[]{arguments} );
+                }
+                catch ( Exception e )
+                {   // just pass it on
+                    Thread.currentThread().getThreadGroup().uncaughtException( Thread.currentThread(), e );
+                }
+            }
+        }, mainClass + ".main()" );
+        bootstrapThread.setContextClassLoader( getClassLoader() );
+        setSystemProperties();
+
+        bootstrapThread.start();
+        joinNonDaemonThreads( threadGroup );
+        // It's plausible that spontaneously a non-daemon thread might be created as we try and shut down,
+        // but it's too late since the termination condition (only daemon threads) has been triggered.
+        if ( keepAlive )
+        {
+            getLog().warn(
+                "Warning: keepAlive is now deprecated and obsolete. Do you need it? Please comment on MEXEC-6." );
+            waitFor( 0 );
+        }
+
+        if ( cleanupDaemonThreads )
+        {
+
+            terminateThreads( threadGroup );
+
+            try
+            {
+                threadGroup.destroy();
+            }
+            catch ( IllegalThreadStateException e )
+            {
+                getLog().warn( "Couldn't destroy threadgroup " + threadGroup, e );
+            }
+        }
+
+
+        if ( originalSystemProperties != null )
+        {
+            System.setProperties( originalSystemProperties );
+        }
+
+        synchronized ( threadGroup )
+        {
+            if ( threadGroup.uncaughtException != null )
+            {
+                throw new MojoExecutionException( null, threadGroup.uncaughtException );
+            }
+        }
+
+        registerSourceRoots();
+    }
+
+    class IsolatedThreadGroup extends ThreadGroup
+    {
+        Throwable uncaughtException; //synchronize access to this
+
+        public IsolatedThreadGroup( String name )
+        {
+            super( name );
+        }
+
+        public void uncaughtException( Thread thread, Throwable throwable )
+        {
+            if ( throwable instanceof ThreadDeath )
+            {
+                return; //harmless
+            }
+            boolean doLog = false;
+            synchronized ( this )
+            {
+                if ( uncaughtException == null ) // only remember the first one
+                {
+                    uncaughtException = throwable; // will be reported eventually
+                }
+                else
+                {
+                    doLog = true;
+                }
+            }
+            if ( doLog )
+            {
+                getLog().warn( "an additional exception was thrown", throwable );
+            }
+        }
+    }
+
+    private void joinNonDaemonThreads( ThreadGroup threadGroup )
+    {
+        boolean foundNonDaemon;
+        do
+        {
+            foundNonDaemon = false;
+            Collection threads = getActiveThreads( threadGroup );
+            for ( Iterator iter = threads.iterator(); iter.hasNext(); )
+            {
+                Thread thread = (Thread) iter.next();
+                if ( thread.isDaemon() )
+                {
+                    continue;
+                }
+                foundNonDaemon = true;   //try again; maybe more threads were created while we were busy
+                joinThread( thread, 0 );
+            }
+        } while ( foundNonDaemon );
+    }
+
+    private void joinThread( Thread thread, long timeoutMsecs )
+    {
+        try
+        {
+            getLog().debug( "joining on thread " + thread );
+            thread.join( timeoutMsecs );
+        }
+        catch ( InterruptedException e )
+        {
+            Thread.currentThread().interrupt();   // good practice if don't throw
+            getLog().warn( "interrupted while joining against thread " + thread, e );   // not expected!
+        }
+        if ( thread.isAlive() ) //generally abnormal
+        {
+            getLog().warn( "thread " + thread + " was interrupted but is still alive after waiting at least "
+                + timeoutMsecs + "msecs" );
+        }
+    }
+
+    private void terminateThreads( ThreadGroup threadGroup )
+    {
+        long startTime = System.currentTimeMillis();
+        Set uncooperativeThreads = new HashSet(); // these were not responsive to interruption
+        for ( Collection threads = getActiveThreads( threadGroup ); !threads.isEmpty();
+              threads = getActiveThreads( threadGroup ), threads.removeAll( uncooperativeThreads ) )
+        {
+            // Interrupt all threads we know about as of this instant (harmless if spuriously went dead (! isAlive())
+            //   or if something else interrupted it ( isInterrupted() ).
+            for ( Iterator iter = threads.iterator(); iter.hasNext(); )
+            {
+                Thread thread = (Thread) iter.next();
+                getLog().debug( "interrupting thread " + thread );
+                thread.interrupt();
+            }
+            // Now join with a timeout and call stop() (assuming flags are set right)
+            for ( Iterator iter = threads.iterator(); iter.hasNext(); )
+            {
+                Thread thread = (Thread) iter.next();
+                if ( ! thread.isAlive() )
+                {
+                    continue; //and, presumably it won't show up in getActiveThreads() next iteration
+                }
+                if ( daemonThreadJoinTimeout <= 0 )
+                {
+                    joinThread( thread, 0 ); //waits until not alive; no timeout
+                    continue;
+                }
+                long timeout = daemonThreadJoinTimeout
+                               - ( System.currentTimeMillis() - startTime );
+                if ( timeout > 0 )
+                {
+                    joinThread( thread, timeout );
+                }
+                if ( ! thread.isAlive() )
+                {
+                    continue;
+                }
+                uncooperativeThreads.add( thread ); // ensure we don't process again
+                if ( stopUnresponsiveDaemonThreads )
+                {
+                    getLog().warn( "thread " + thread + " will be Thread.stop()'ed" );
+                    thread.stop();
+                }
+                else
+                {
+                    getLog().warn( "thread " + thread + " will linger despite being asked to die via interruption" );
+                }
+            }
+        }
+        if ( ! uncooperativeThreads.isEmpty() )
+        {
+            getLog().warn( "NOTE: " + uncooperativeThreads.size() + " thread(s) did not finish despite being asked to "
+                + " via interruption. This is not a problem with exec:java, it is a problem with the running code."
+                + " Although not serious, it should be remedied." );
+        }
+        else
+        {
+            int activeCount = threadGroup.activeCount();
+            if ( activeCount != 0 )
+            {
+                // TODO this may be nothing; continue on anyway; perhaps don't even log in future
+                Thread[] threadsArray = new Thread[1];
+                threadGroup.enumerate( threadsArray );
+                getLog().debug( "strange; " + activeCount
+                        + " thread(s) still active in the group " + threadGroup + " such as " + threadsArray[0] );
+            }
+        }
+    }
+
+    private Collection getActiveThreads( ThreadGroup threadGroup )
+    {
+        Thread[] threads = new Thread[ threadGroup.activeCount() ];
+        int numThreads = threadGroup.enumerate( threads );
+        Collection result = new ArrayList( numThreads );
+        for ( int i = 0; i < threads.length && threads[i] != null; i++ )
+        {
+            result.add( threads[i] );
+        }
+        return result;//note: result should be modifiable
+    }
+
+    /**
+     * Pass any given system properties to the java system properties.
+     */
+    private void setSystemProperties()
+    {
+        if ( systemProperties != null )
+        {
+            originalSystemProperties = System.getProperties();
+            for ( int i = 0; i < systemProperties.length; i++ )
+            {
+                Property systemProperty = systemProperties[i];
+                String value = systemProperty.getValue();
+                System.setProperty( systemProperty.getKey(), value == null ? "" : value );
+            }
+        }
+    }
+
+    /**
+     * Set up a classloader for the execution of the main class.
+     *
+     * @return the classloader
+     * @throws MojoExecutionException
+     */
+    private ClassLoader getClassLoader()
+        throws MojoExecutionException
+    {
+        List classpathURLs = new ArrayList();
+        this.addRelevantPluginDependenciesToClasspath( classpathURLs );
+        this.addRelevantProjectDependenciesToClasspath( classpathURLs );
+        return new URLClassLoader( ( URL[] ) classpathURLs.toArray( new URL[ classpathURLs.size() ] ) );
+    }
+
+    /**
+     * Add any relevant project dependencies to the classpath.
+     * Indirectly takes includePluginDependencies and ExecutableDependency into consideration.
+     *
+     * @param path classpath of {@link java.net.URL} objects
+     * @throws MojoExecutionException
+     */
+    private void addRelevantPluginDependenciesToClasspath( List path )
+        throws MojoExecutionException
+    {
+        if ( hasCommandlineArgs() )
+        {
+            arguments = parseCommandlineArgs();
+        }
+
+        try
+        {
+            Iterator iter = this.determineRelevantPluginDependencies().iterator();
+            while ( iter.hasNext() )
+            {
+                Artifact classPathElement = (Artifact) iter.next();
+                getLog().debug(
+                    "Adding plugin dependency artifact: " + classPathElement.getArtifactId() + " to classpath" );
+                path.add( classPathElement.getFile().toURL() );
+            }
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new MojoExecutionException( "Error during setting up classpath", e );
+        }
+
+    }
+
+    /**
+     * Add any relevant project dependencies to the classpath.
+     * Takes includeProjectDependencies into consideration.
+     *
+     * @param path classpath of {@link java.net.URL} objects
+     * @throws MojoExecutionException
+     */
+    private void addRelevantProjectDependenciesToClasspath( List path )
+        throws MojoExecutionException
+    {
+        if ( this.includeProjectDependencies )
+        {
+            try
+            {
+                getLog().debug( "Project Dependencies will be included." );
+
+                URL mainClasses = new File( project.getBuild().getOutputDirectory() ).toURL();
+                getLog().debug( "Adding to classpath : " + mainClasses );
+                path.add( mainClasses );
+
+                URL testClasses = new File( project.getBuild().getTestOutputDirectory() ).toURL();
+                getLog().debug( "Adding to classpath : " + testClasses );
+                path.add( testClasses );
+
+                Set dependencies = project.getArtifacts();
+
+                // system scope dependencies are not returned by maven 2.0. See MEXEC-17
+                dependencies.addAll( getSystemScopeDependencies() );
+
+                Iterator iter = dependencies.iterator();
+                while ( iter.hasNext() )
+                {
+                    Artifact classPathElement = (Artifact) iter.next();
+                    getLog().debug(
+                        "Adding project dependency artifact: " + classPathElement.getArtifactId() + " to classpath" );
+                    path.add( classPathElement.getFile().toURL() );
+                }
+
+            }
+            catch ( MalformedURLException e )
+            {
+                throw new MojoExecutionException( "Error during setting up classpath", e );
+            }
+        }
+        else
+        {
+            getLog().debug( "Project Dependencies will be excluded." );
+        }
+
+    }
+
+    private Collection getSystemScopeDependencies() throws MojoExecutionException
+    {
+        List systemScopeArtifacts = new ArrayList();
+
+        for ( Iterator artifacts = getAllDependencies().iterator(); artifacts.hasNext(); )
+        {
+            Artifact artifact = (Artifact) artifacts.next();
+
+            if ( artifact.getScope().equals( Artifact.SCOPE_SYSTEM ) )
+            {
+                systemScopeArtifacts.add( artifact );
+            }
+        }
+        return systemScopeArtifacts;
+    }
+
+    // generic method to retrieve all the transitive dependencies
+    private Collection getAllDependencies() throws MojoExecutionException
+    {
+        List artifacts = new ArrayList();
+
+        for ( Iterator dependencies = project.getDependencies().iterator(); dependencies.hasNext(); )
+        {
+            Dependency dependency = (Dependency) dependencies.next();
+
+            String groupId = dependency.getGroupId();
+            String artifactId = dependency.getArtifactId();
+
+            VersionRange versionRange;
+            try
+            {
+                versionRange = VersionRange.createFromVersionSpec( dependency.getVersion() );
+            }
+            catch ( InvalidVersionSpecificationException e )
+            {
+                throw new MojoExecutionException( "unable to parse version", e );
+            }
+
+            String type = dependency.getType();
+            if ( type == null )
+            {
+                type = "jar"; //$NON-NLS-1$
+            }
+            String classifier = dependency.getClassifier();
+            boolean optional = dependency.isOptional();
+            String scope = dependency.getScope();
+            if ( scope == null )
+            {
+                scope = Artifact.SCOPE_COMPILE;
+            }
+
+            Artifact art = this.artifactFactory.createDependencyArtifact( groupId, artifactId, versionRange,
+                                                              type, classifier, scope, optional );
+
+            if ( scope.equalsIgnoreCase( Artifact.SCOPE_SYSTEM ) )
+            {
+                art.setFile( new File( dependency.getSystemPath() ) );
+            }
+
+            List exclusions = new ArrayList();
+            for ( Iterator j = dependency.getExclusions().iterator(); j.hasNext(); )
+            {
+                Exclusion e = (Exclusion) j.next();
+                exclusions.add( e.getGroupId() + ":" + e.getArtifactId() ); //$NON-NLS-1$
+            }
+
+            ArtifactFilter newFilter = new ExcludesArtifactFilter( exclusions );
+
+            art.setDependencyFilter( newFilter );
+
+            artifacts.add( art );
+        }
+
+        return artifacts;
+    }
+
+    /**
+     * Determine all plugin dependencies relevant to the executable.
+     * Takes includePlugins, and the executableDependency into consideration.
+     *
+     * @return a set of Artifact objects.
+     *         (Empty set is returned if there are no relevant plugin dependencies.)
+     * @throws MojoExecutionException
+     */
+    private Set determineRelevantPluginDependencies()
+        throws MojoExecutionException
+    {
+        Set relevantDependencies;
+        if ( this.includePluginDependencies )
+        {
+            if ( this.executableDependency == null )
+            {
+                getLog().debug( "All Plugin Dependencies will be included." );
+                relevantDependencies = new HashSet( this.pluginDependencies );
+            }
+            else
+            {
+                getLog().debug( "Selected plugin Dependencies will be included." );
+                Artifact executableArtifact = this.findExecutableArtifact();
+                Artifact executablePomArtifact = this.getExecutablePomArtifact( executableArtifact );
+                relevantDependencies = this.resolveExecutableDependencies( executablePomArtifact );
+            }
+        }
+        else
+        {
+            relevantDependencies = Collections.EMPTY_SET;
+            getLog().debug( "Plugin Dependencies will be excluded." );
+        }
+        return relevantDependencies;
+    }
+
+    /**
+     * Get the artifact which refers to the POM of the executable artifact.
+     *
+     * @param executableArtifact this artifact refers to the actual assembly.
+     * @return an artifact which refers to the POM of the executable artifact.
+     */
+    private Artifact getExecutablePomArtifact( Artifact executableArtifact )
+    {
+        return this.artifactFactory.createBuildArtifact( executableArtifact.getGroupId(),
+                                                         executableArtifact.getArtifactId(),
+                                                         executableArtifact.getVersion(), "pom" );
+    }
+
+    /**
+     * Examine the plugin dependencies to find the executable artifact.
+     *
+     * @return an artifact which refers to the actual executable tool (not a POM)
+     * @throws MojoExecutionException
+     */
+    private Artifact findExecutableArtifact()
+        throws MojoExecutionException
+    {
+        //ILimitedArtifactIdentifier execToolAssembly = this.getExecutableToolAssembly();
+
+        Artifact executableTool = null;
+        for ( Iterator iter = this.pluginDependencies.iterator(); iter.hasNext(); )
+        {
+            Artifact pluginDep = (Artifact) iter.next();
+            if ( this.executableDependency.matches( pluginDep ) )
+            {
+                executableTool = pluginDep;
+                break;
+            }
+        }
+
+        if ( executableTool == null )
+        {
+            throw new MojoExecutionException(
+                "No dependency of the plugin matches the specified executableDependency."
+                + "  Specified executableToolAssembly is: " + executableDependency.toString() );
+        }
+
+        return executableTool;
+    }
+
+    private Set resolveExecutableDependencies( Artifact executablePomArtifact )
+        throws MojoExecutionException
+    {
+
+        Set executableDependencies;
+        try
+        {
+            MavenProject executableProject = this.projectBuilder.buildFromRepository( executablePomArtifact,
+                                                                                      this.remoteRepositories,
+                                                                                      this.localRepository );
+
+            //get all of the dependencies for the executable project
+            List dependencies = executableProject.getDependencies();
+
+            //make Artifacts of all the dependencies
+            Set dependencyArtifacts =
+                MavenMetadataSource.createArtifacts( this.artifactFactory, dependencies, null, null, null );
+
+            //not forgetting the Artifact of the project itself
+            dependencyArtifacts.add( executableProject.getArtifact() );
+
+            //resolve all dependencies transitively to obtain a comprehensive list of assemblies
+            ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencyArtifacts,
+                                                                                    executablePomArtifact,
+                                                                                    Collections.EMPTY_MAP,
+                                                                                    this.localRepository,
+                                                                                    this.remoteRepositories,
+                                                                                    metadataSource, null,
+                                                                                    Collections.EMPTY_LIST );
+            executableDependencies = result.getArtifacts();
+
+        }
+        catch ( Exception ex )
+        {
+            throw new MojoExecutionException(
+                "Encountered problems resolving dependencies of the executable " + "in preparation for its execution.",
+                ex );
+        }
+
+        return executableDependencies;
+    }
+
+    /**
+     * Stop program execution for nn millis.
+     *
+     * @param millis the number of millis-seconds to wait for,
+     *               <code>0</code> stops program forever.
+     */
+    private void waitFor( long millis )
+    {
+        Object lock = new Object();
+        synchronized ( lock )
+        {
+            try
+            {
+                lock.wait( millis );
+            }
+            catch ( InterruptedException e )
+            {
+                Thread.currentThread().interrupt(); // good practice if don't throw
+                getLog().warn( "Spuriously interrupted while waiting for " + millis + "ms", e );
+            }
+        }
+    }
+
+}

Propchange: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt?view=auto&rev=547741
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt (added)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt Fri Jun 15 09:58:36 2007
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

Propchange: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/resources/META-INF/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native