You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ch...@apache.org on 2007/08/07 23:33:12 UTC

svn commit: r563665 [11/11] - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/converter/jaxp/ camel-core/src/test/java/org/apache/camel/processor/ components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ componen...

Modified: activemq/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,23 +16,25 @@
  */
 package org.apache.camel.component.xmpp;
 
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 import junit.framework.Assert;
 import junit.framework.TestCase;
 import junit.textui.TestRunner;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.Processor;
 import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.converter.ObjectConverter;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.util.ProducerCache;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.jivesoftware.smack.packet.Message;
 
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+import org.jivesoftware.smack.packet.Message;
 
 /**
  * An integration test which requires a Jabber server to be running, by default on localhost.
@@ -46,7 +47,7 @@
 public class XmppRouteTest extends TestCase {
     protected static boolean enabled;
     protected static String xmppUrl;
-    private static final transient Log log = LogFactory.getLog(XmppRouteTest.class);
+    private static final transient Log LOG = LogFactory.getLog(XmppRouteTest.class);
     protected XmppExchange receivedExchange;
     protected CamelContext container = new DefaultCamelContext();
     protected CountDownLatch latch = new CountDownLatch(1);
@@ -100,11 +101,11 @@
 
         Assert.assertEquals("cheese header", 123, receivedMessage.getHeader("cheese"));
         Object body = receivedMessage.getBody();
-        XmppRouteTest.log.debug("Received body: " + body);
+        XmppRouteTest.LOG.debug("Received body: " + body);
         Message xmppMessage = receivedMessage.getXmppMessage();
         assertNotNull(xmppMessage);
 
-        XmppRouteTest.log.debug("Received XMPP message: " + xmppMessage.getBody());
+        XmppRouteTest.LOG.debug("Received XMPP message: " + xmppMessage.getBody());
         return body;
     }
 
@@ -114,7 +115,7 @@
             String uriPrefx = getUriPrefix();
             final String uri1 = uriPrefx + "a";
             final String uri2 = uriPrefx + "b";
-            log.info("Using URI " + uri1 + " and " + uri2);
+            LOG.info("Using URI " + uri1 + " and " + uri2);
 
             // lets add some routes
             container.addRoutes(new RouteBuilder() {
@@ -122,7 +123,7 @@
                     from(uri1).to(uri2);
                     from(uri2).process(new Processor() {
                         public void process(Exchange e) {
-                            log.info("Received exchange: " + e);
+                            LOG.info("Received exchange: " + e);
                             receivedExchange = (XmppExchange) e;
                             latch.countDown();
                         }

Modified: activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/MyActivities.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/MyActivities.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/MyActivities.java (original)
+++ activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/MyActivities.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -16,23 +16,25 @@
  */
 package org.apache.camel.example.bam;
 
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
 import org.apache.camel.bam.ActivityBuilder;
 import org.apache.camel.bam.ProcessBuilder;
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
-import static org.apache.camel.util.Time.seconds;
-import org.apache.camel.Processor;
-import org.apache.camel.Exchange;
-import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
 
+import static org.apache.camel.builder.xml.XPathBuilder.xpath;
+import static org.apache.camel.util.Time.seconds;
+
 /**
  * @version $Revision: $
  */
 // START SNIPPET: example
 public class MyActivities extends ProcessBuilder {
-    private static final Log log = LogFactory.getLog(MyActivities.class);
+    private static final Log LOG = LogFactory.getLog(MyActivities.class);
 
     protected MyActivities(JpaTemplate jpaTemplate, TransactionTemplate transactionTemplate) {
         super(jpaTemplate, transactionTemplate);
@@ -54,7 +56,7 @@
 
         from("seda:failures").process(new Processor() {
             public void process(Exchange exchange) throws Exception {
-                log.info("Failed process!: " + exchange + " with body: " + exchange.getIn().getBody());
+                LOG.info("Failed process!: " + exchange + " with body: " + exchange.getIn().getBody());
             }
         });
     }

Modified: activemq/camel/trunk/examples/camel-example-bam/src/test/java/org/apache/camel/example/bam/RunTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-bam/src/test/java/org/apache/camel/example/bam/RunTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-bam/src/test/java/org/apache/camel/example/bam/RunTest.java (original)
+++ activemq/camel/trunk/examples/camel-example-bam/src/test/java/org/apache/camel/example/bam/RunTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -27,11 +26,11 @@
 
 /**
  * An example entity bean which can be marshalled to/from XML
- *
+ * 
  * @version $Revision: 1.1 $
  */
 @Entity(name = "Customer")
-@XmlRootElement(name="customer")
+@XmlRootElement(name = "customer")
 @XmlAccessorType(XmlAccessType.FIELD)
 public class CustomerEntity {
     @XmlAttribute

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,22 +16,23 @@
  */
 package org.apache.camel.example.etl;
 
+import java.util.List;
+
 import org.apache.camel.Converter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.orm.jpa.JpaTemplate;
 
-import java.util.List;
+import org.springframework.orm.jpa.JpaTemplate;
 
 /**
  * A Message Transformer of an XML document to a Customer entity bean
- *
+ * 
  * @version $Revision: 1.1 $
  */
 // START SNIPPET: example
 @Converter
 public class CustomerTransformer {
-    private static final transient Log log = LogFactory.getLog(CustomerTransformer.class);
+    private static final transient Log LOG = LogFactory.getLog(CustomerTransformer.class);
     private JpaTemplate template;
 
     public CustomerTransformer(JpaTemplate template) {
@@ -40,7 +40,8 @@
     }
 
     /**
-     * A transformation method to convert a person document into a customer entity
+     * A transformation method to convert a person document into a customer
+     * entity
      */
     @Converter
     public CustomerEntity toCustomer(PersonDocument doc) {
@@ -53,7 +54,7 @@
         customer.setSurname(doc.getLastName());
         customer.setCity(doc.getCity());
 
-        log.debug("Created customer: " + customer);
+        LOG.debug("Created customer: " + customer);
         return customer;
     }
 
@@ -67,8 +68,7 @@
             answer.setUserName(user);
             template.persist(answer);
             return answer;
-        }
-        else {
+        } else {
             return list.get(0);
         }
     }

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,27 +16,25 @@
  */
 package org.apache.camel.example.etl;
 
-import static org.apache.camel.language.juel.JuelExpression.el;
 import org.apache.camel.component.file.FileComponent;
-import org.apache.camel.language.juel.JuelExpression;
 import org.apache.camel.spring.SpringRouteBuilder;
 
+import static org.apache.camel.language.juel.JuelExpression.el;
+
 /**
  * @version $Revision: 1.1 $
  */
 // START SNIPPET: example
 public class EtlRoutes extends SpringRouteBuilder {
     public void configure() throws Exception {
-        from("file:src/data?noop=true").
-                convertBodyTo(PersonDocument.class).
-                //intercept(transactionInterceptor()).
-                to("jpa:org.apache.camel.example.etl.CustomerEntity");
-
+        from("file:src/data?noop=true").convertBodyTo(PersonDocument.class)
+        //  .intercept(transactionInterceptor())
+            .to("jpa:org.apache.camel.example.etl.CustomerEntity");
 
         // the following will dump the database to files
-        from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false").
-        		setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml")).
-        		to("file:target/customers");
+        from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false")
+            .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
+            .to("file:target/customers");
     }
 }
 // END SNIPPET: example

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/examples/camel-example-etl/src/test/java/org/apache/camel/example/etl/RunTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/test/java/org/apache/camel/example/etl/RunTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/test/java/org/apache/camel/example/etl/RunTest.java (original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/test/java/org/apache/camel/example/etl/RunTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java (original)
+++ activemq/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -15,52 +14,52 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.example.jmstofile;
 
-import org.apache.camel.component.jms.JmsComponent;
 import javax.jms.ConnectionFactory;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.CamelTemplate;
 import org.apache.camel.CamelContext;
+import org.apache.camel.CamelTemplate;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jms.JmsComponent;
 import org.apache.camel.impl.DefaultCamelContext;
 
-
 /**
- * An example class for demonstrating some of the basics behind camel
- * 
- * This example will send some text messages on to a JMS Queue, consume them and 
+ * An example class for demonstrating some of the basics behind camel This
+ * example will send some text messages on to a JMS Queue, consume them and
  * persist them to disk
- *
- * @version $Revision: 529902 $
  * 
+ * @version $Revision: 529902 $
  */
-public class CamelJmsToFileExample {
+public final class CamelJmsToFileExample {
 
-    public static void main(String args[]) throws Exception{
+    private CamelJmsToFileExample() {        
+    }
+    
+    public static void main(String args[]) throws Exception {
         // START SNIPPET: e1
-        CamelContext context=new DefaultCamelContext();
+        CamelContext context = new DefaultCamelContext();
         // END SNIPPET: e1
         // Set up the ActiveMQ JMS Components
         // START SNIPPET: e2
-        ConnectionFactory connectionFactory=new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
+        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
         // note we can explicity name the component
-        context.addComponent("test-jms",JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
+        context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
         // END SNIPPET: e2
         // Add some configuration by hand ...
         // START SNIPPET: e3
-        context.addRoutes(new RouteBuilder(){
+        context.addRoutes(new RouteBuilder() {
 
-            public void configure(){
+            public void configure() {
                 from("test-jms:queue:test.queue").to("file://test");
                 // set up a listener on the file component
-                from("file://test").process(new Processor(){
+                from("file://test").process(new Processor() {
 
-                    public void process(Exchange e){
-                        System.out.println("Received exchange: "+e.getIn());
+                    public void process(Exchange e) {
+                        System.out.println("Received exchange: " + e.getIn());
                     }
                 });
             }
@@ -68,22 +67,26 @@
         // END SNIPPET: e3
         // Camel template - a handy class for kicking off exchanges
         // START SNIPPET: e4
-        CamelTemplate template =new CamelTemplate(context);
+        CamelTemplate template = new CamelTemplate(context);
         // END SNIPPET: e4
         // Now everything is set up - lets start the context
         context.start();
         // now send some test text to a component - for this case a JMS Queue
-        // The text get converted to JMS messages - and sent to the Queue test.queue
-        // The file component is listening for messages from the Queue test.queue, consumes
-        // them and stores them to disk. The content of each file will be the test test we sent here.
-        // The listener on the file component gets notfied when new files are found ...
+        // The text get converted to JMS messages - and sent to the Queue
+        // test.queue
+        // The file component is listening for messages from the Queue
+        // test.queue, consumes
+        // them and stores them to disk. The content of each file will be the
+        // test test we sent here.
+        // The listener on the file component gets notfied when new files are
+        // found ...
         // that's it!
         // START SNIPPET: e5
-        for(int i=0;i<10;i++){
-            template.sendBody("test-jms:queue:test.queue","Test Message: "+i);
+        for (int i = 0; i < 10; i++) {
+            template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
         }
         // END SNIPPET: e5
         Thread.sleep(1000);
         context.stop();
     }
-}
\ No newline at end of file
+}

Modified: 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=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java (original)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java (original)
+++ activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/tooling/archetypes/camel-jbi-service-unit/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-jbi-service-unit/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-jbi-service-unit/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java (original)
+++ activemq/camel/trunk/tooling/archetypes/camel-jbi-service-unit/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java (original)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: 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=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunCamelMojo.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -15,28 +14,7 @@
  * 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;
+package org.apache.camel.maven;
 
 import java.io.File;
 import java.lang.reflect.Method;
@@ -52,18 +30,37 @@
 import java.util.Properties;
 import java.util.Set;
 
+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.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 org.apache.maven.model.Dependency;
+import org.apache.maven.model.Exclusion;
+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.codehaus.mojo.exec.AbstractExecMojo;
+import org.codehaus.mojo.exec.ExecutableDependency;
+import org.codehaus.mojo.exec.Property;
+
 /**
- * Runs a CamelContext using any Spring XML configuration files found in <code>META-INF/spring/*.xml</code>
- * and starting up the context.
- *
- *
+ * 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="test-compile"
  */
-public class RunCamelMojo
-    extends AbstractExecMojo
-{
+public class RunCamelMojo extends AbstractExecMojo {
 
     // TODO
     // this code is based on a copy-and-paste of maven-exec-plugin
@@ -73,13 +70,13 @@
     // namely the main and the command line arguments..
 
     /**
-	 * The maven project.
-	 *
-	 * @parameter expression="${project}"
-	 * @required
-	 * @readonly
-	 */
-	protected MavenProject project;
+     * The maven project.
+     * 
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
 
     /**
      * @component
@@ -121,118 +118,138 @@
 
     /**
      * The main class to execute.
-     *
-     * @parameter expression="${camel.mainClass}" default-value="org.apache.camel.spring.Main"
+     * 
+     * @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.
-     *
+     * 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.
-     *
+     * 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"
+     * 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"
+     * 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.
-     *
+     * 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.
+     * 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
+     * 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;
+    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"
+    /**
+     * 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"
+     * 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;
@@ -241,571 +258,459 @@
 
     /**
      * Execute goal.
-     * @throws MojoExecutionException execution of the main class or one of the threads it generated failed.
+     * 
+     * @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." );
+    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 )
-        {
+        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 );
+        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 );
+                    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() );
+        }, 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 );
+        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 )
-        {
+        if (cleanupDaemonThreads) {
 
-            terminateThreads( threadGroup );
+            terminateThreads(threadGroup);
 
-            try
-            {
+            try {
                 threadGroup.destroy();
-            }
-            catch ( IllegalThreadStateException e )
-            {
-                getLog().warn( "Couldn't destroy threadgroup " + threadGroup, e );
+            } catch (IllegalThreadStateException e) {
+                getLog().warn("Couldn't destroy threadgroup " + threadGroup, e);
             }
         }
 
-
-        if ( originalSystemProperties != null )
-        {
-            System.setProperties( originalSystemProperties );
+        if (originalSystemProperties != null) {
+            System.setProperties(originalSystemProperties);
         }
 
-        synchronized ( threadGroup )
-        {
-            if ( threadGroup.uncaughtException != null )
-            {
-                throw new MojoExecutionException( null, threadGroup.uncaughtException );
+        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 );
+    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
+        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
-                {
+            synchronized (this) {
+                // only remember the first one
+                if (uncaughtException == null) {
+                    uncaughtException = throwable; // will be reported
+                    // eventually
+                } else {
                     doLog = true;
                 }
             }
-            if ( doLog )
-            {
-                getLog().warn( "an additional exception was thrown", throwable );
+            if (doLog) {
+                getLog().warn("an additional exception was thrown", throwable);
             }
         }
     }
 
-    private void joinNonDaemonThreads( ThreadGroup threadGroup )
-    {
+    private void joinNonDaemonThreads(ThreadGroup threadGroup) {
         boolean foundNonDaemon;
-        do
-        {
+        do {
             foundNonDaemon = false;
-            Collection threads = getActiveThreads( threadGroup );
-            for ( Iterator iter = threads.iterator(); iter.hasNext(); )
-            {
-                Thread thread = (Thread) iter.next();
-                if ( thread.isDaemon() )
-                {
+            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 );
+                foundNonDaemon = true; // try again; maybe more threads were
+                // created while we were busy
+                joinThread(thread, 0);
             }
-        } while ( foundNonDaemon );
+        } while (foundNonDaemon);
     }
 
-    private void joinThread( Thread thread, long timeoutMsecs )
-    {
-        try
-        {
-            getLog().debug( "joining on thread " + thread );
-            thread.join( timeoutMsecs );
+    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!
         }
-        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" );
+        // generally abnormal
+        if (thread.isAlive()) {
+            getLog().warn("thread " + thread + " was interrupted but is still alive after waiting at least " + timeoutMsecs + "msecs");
         }
     }
 
-    private void terminateThreads( ThreadGroup threadGroup )
-    {
+    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 );
+        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
+            // 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
+                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 );
+                long timeout = daemonThreadJoinTimeout - (System.currentTimeMillis() - startTime);
+                if (timeout > 0) {
+                    joinThread(thread, timeout);
                 }
-                if ( ! thread.isAlive() )
-                {
+                if (!thread.isAlive()) {
                     continue;
                 }
-                uncooperativeThreads.add( thread ); // ensure we don't process again
-                if ( stopUnresponsiveDaemonThreads )
-                {
-                    getLog().warn( "thread " + thread + " will be Thread.stop()'ed" );
+                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" );
+                } 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
-        {
+        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
+            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] );
+                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] );
+    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
+        // note: result should be modifiable
+        return result;
     }
 
     /**
      * Pass any given system properties to the java system properties.
      */
-    private void setSystemProperties()
-    {
-        if ( systemProperties != null )
-        {
+    private void setSystemProperties() {
+        if (systemProperties != null) {
             originalSystemProperties = System.getProperties();
-            for ( int i = 0; i < systemProperties.length; i++ )
-            {
+            for (int i = 0; i < systemProperties.length; i++) {
                 Property systemProperty = systemProperties[i];
                 String value = systemProperty.getValue();
-                System.setProperty( systemProperty.getKey(), value == null ? "" : value );
+                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
-    {
+    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() ] ) );
+        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.
-     *
+     * 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() )
-        {
+    private void addRelevantPluginDependenciesToClasspath(List path) throws MojoExecutionException {
+        if (hasCommandlineArgs()) {
             arguments = parseCommandlineArgs();
         }
 
-        try
-        {
+        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() );
+            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 );
+        } catch (MalformedURLException e) {
+            throw new MojoExecutionException("Error during setting up classpath", e);
         }
 
     }
 
     /**
-     * Add any relevant project dependencies to the classpath.
-     * Takes includeProjectDependencies into consideration.
-     *
+     * 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 );
+    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() );
+                // 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() );
+                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);
             }
-            catch ( MalformedURLException e )
-            {
-                throw new MojoExecutionException( "Error during setting up classpath", e );
-            }
-        }
-        else
-        {
-            getLog().debug( "Project Dependencies will be excluded." );
+        } else {
+            getLog().debug("Project Dependencies will be excluded.");
         }
 
     }
 
-    private Collection getSystemScopeDependencies() throws MojoExecutionException
-    {
+    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 );
+        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
-    {
+    private Collection getAllDependencies() throws MojoExecutionException {
         List artifacts = new ArrayList();
 
-        for ( Iterator dependencies = project.getDependencies().iterator(); dependencies.hasNext(); )
-        {
-            Dependency dependency = (Dependency) dependencies.next();
+        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 );
+            try {
+                versionRange = VersionRange.createFromVersionSpec(dependency.getVersion());
+            } catch (InvalidVersionSpecificationException e) {
+                throw new MojoExecutionException("unable to parse version", e);
             }
 
             String type = dependency.getType();
-            if ( type == null )
-            {
+            if (type == null) {
                 type = "jar"; //$NON-NLS-1$
             }
             String classifier = dependency.getClassifier();
             boolean optional = dependency.isOptional();
             String scope = dependency.getScope();
-            if ( scope == null )
-            {
+            if (scope == null) {
                 scope = Artifact.SCOPE_COMPILE;
             }
 
-            Artifact art = this.artifactFactory.createDependencyArtifact( groupId, artifactId, versionRange,
-                                                              type, classifier, scope, optional );
+            Artifact art = this.artifactFactory.createDependencyArtifact(groupId, artifactId, versionRange, type, classifier, scope, optional);
 
-            if ( scope.equalsIgnoreCase( Artifact.SCOPE_SYSTEM ) )
-            {
-                art.setFile( new File( dependency.getSystemPath() ) );
+            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$
+            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 );
+            ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions);
 
-            art.setDependencyFilter( newFilter );
+            art.setDependencyFilter(newFilter);
 
-            artifacts.add( art );
+            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.)
+     * 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
-    {
+    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." );
+        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 );
+                Artifact executablePomArtifact = this.getExecutablePomArtifact(executableArtifact);
+                relevantDependencies = this.resolveExecutableDependencies(executablePomArtifact);
             }
-        }
-        else
-        {
+        } else {
             relevantDependencies = Collections.EMPTY_SET;
-            getLog().debug( "Plugin Dependencies will be excluded." );
+            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" );
+    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)
+     * 
+     * @return an artifact which refers to the actual executable tool (not a
+     *         POM)
      * @throws MojoExecutionException
      */
-    private Artifact findExecutableArtifact()
-        throws MojoExecutionException
-    {
-        //ILimitedArtifactIdentifier execToolAssembly = this.getExecutableToolAssembly();
+    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 ) )
-            {
+        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() );
+        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
-    {
+    private Set resolveExecutableDependencies(Artifact executablePomArtifact) throws MojoExecutionException {
 
         Set executableDependencies;
-        try
-        {
-            MavenProject executableProject = this.projectBuilder.buildFromRepository( executablePomArtifact,
-                                                                                      this.remoteRepositories,
-                                                                                      this.localRepository );
+        try {
+            MavenProject executableProject = this.projectBuilder.buildFromRepository(executablePomArtifact, this.remoteRepositories, this.localRepository);
 
-            //get all of the dependencies for the executable project
+            // 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 );
+            // 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 );
+        } catch (Exception ex) {
+            throw new MojoExecutionException("Encountered problems resolving dependencies of the executable " + "in preparation for its execution.", ex);
         }
 
         return executableDependencies;
@@ -813,23 +718,19 @@
 
     /**
      * Stop program execution for nn millis.
-     *
-     * @param millis the number of millis-seconds to wait for,
-     *               <code>0</code> stops program forever.
+     * 
+     * @param millis the number of millis-seconds to wait for, <code>0</code>
+     *                stops program forever.
      */
-    private void waitFor( long millis )
-    {
+    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 );
+        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);
             }
         }
     }

Modified: activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/GenerateDocBookMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/GenerateDocBookMojo.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/GenerateDocBookMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/GenerateDocBookMojo.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,