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 2008/10/21 15:41:00 UTC

svn commit: r706625 - in /activemq/camel/trunk: examples/camel-example-guice-jms/ tooling/maven/ tooling/maven/guice-maven-plugin/ tooling/maven/guice-maven-plugin/src/ tooling/maven/guice-maven-plugin/src/main/ tooling/maven/guice-maven-plugin/src/mai...

Author: jstrachan
Date: Tue Oct 21 06:40:59 2008
New Revision: 706625

URL: http://svn.apache.org/viewvc?rev=706625&view=rev
Log:
added an initial spike of CAMEL-1009 so you can easily run a Guice based camel program via 'mvn guice:run'

Added:
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/pom.xml   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt   (with props)
    activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties   (with props)
Modified:
    activemq/camel/trunk/examples/camel-example-guice-jms/pom.xml
    activemq/camel/trunk/tooling/maven/pom.xml

Modified: activemq/camel/trunk/examples/camel-example-guice-jms/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-guice-jms/pom.xml?rev=706625&r1=706624&r2=706625&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-guice-jms/pom.xml (original)
+++ activemq/camel/trunk/examples/camel-example-guice-jms/pom.xml Tue Oct 21 06:40:59 2008
@@ -74,11 +74,10 @@
 
   <build>
     <plugins>
-      <!-- TODO use guice plugin!! -->
-      <!-- Allows the routes to be run via 'mvn camel:run' -->
+      <!-- Allows the routes to be run via 'mvn guice:run' -->
       <plugin>
         <groupId>org.apache.camel</groupId>
-        <artifactId>camel-maven-plugin</artifactId>
+        <artifactId>guice-maven-plugin</artifactId>
         <version>${pom.version}</version>
       </plugin>
 

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/pom.xml?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/pom.xml (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/pom.xml Tue Oct 21 06:40:59 2008
@@ -0,0 +1,97 @@
+<!--
+    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.5-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>guice-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>Camel :: Maven Guice Plugin</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-guice</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.mojo</groupId>
+      <artifactId>exec-maven-plugin</artifactId>
+      <version>1.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-48</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-api</artifactId>
+      <version>2.0.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-impl</artifactId>
+      <version>2.0.4.1</version>
+    </dependency>
+
+    <!-- add some logging to the classpath -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+    </dependency>
+
+    <!-- TODO: do we need all these? -->
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+    </dependency>
+	
+  </dependencies>
+</project>

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

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java Tue Oct 21 06:40:59 2008
@@ -0,0 +1,556 @@
+/**
+ * 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.guice.maven;
+
+import java.io.BufferedReader;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Runs a Camel using the
+ * <code>jndi.properties</code> file on the classpath to
+ * way to <a href="http://activemq.apache.org/camel/guice.html">bootstrap via Guice</a>
+ * then the DOT files are created, then they are converted from DOT files to another format such as PNG
+ *
+ * @version $Revision: $
+ * @goal dot
+ * @requiresDependencyResolution runtime
+ * @phase prepare-package
+ * @execute phase="test-compile"
+ * @see <a href="http://www.graphviz.org/">GraphViz</a>
+ */
+public class DotMojo extends AbstractMavenReport {
+    public static final String[] DEFAULT_GRAPHVIZ_OUTPUT_TYPES = {"png", "svg", "cmapx"};
+    /**
+     * Subdirectory for report.
+     */
+    protected static final String SUBDIRECTORY = "cameldoc";
+    //
+    // For running Camel embedded
+    // -------------------------------------------------------------------------
+    //
+    /**
+     * The duration to run the application for which by default is in
+     * milliseconds. A value <= 0 will run forever.
+     * Adding a s indicates seconds - eg "5s" means 5 seconds.
+     *
+     * @parameter expression="2s"
+     */
+    protected String duration;
+
+    /**
+     * Whether we should boot up camel with the META-INF/services/*.xml to
+     * generate the DOT file
+     *
+     * @parameter expression="true"
+     */
+    protected boolean runCamel;
+
+    /**
+     * The main class to execute.
+     *
+     * @parameter expression="${camel.mainClass}"
+     *            default-value="org.apache.camel.spring.Main"
+     * @required
+     */
+    private String mainClass;
+
+    /**
+     * Should we try run the DOT executable on the generated .DOT file to
+     * generate images
+     *
+     * @parameter expression="true"
+     */
+    protected boolean useDot;
+
+    /**
+     * The classpath based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.applicationContextUri}"
+     */
+    protected String applicationContextUri;
+
+    /**
+     * The filesystem based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.fileApplicationContextUri}"
+     */
+    protected String fileApplicationContextUri;
+
+
+    /**
+     * Reference to Maven 2 Project.
+     *
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    private MavenProject project;
+
+    /**
+     * Base output directory.
+     *
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File buildDirectory;
+
+    /**
+     * Base output directory for reports.
+     *
+     * @parameter default-value="${project.build.directory}/site/cameldoc"
+     * @required
+     */
+    private File outputDirectory;
+
+
+    /**
+     * In the case of multiple camel contexts, setting aggregate == true will
+     * aggregate all into a monolithic context, otherwise they will be processed
+     * independently.
+     *
+     * @parameter
+     */
+    private String aggregate;
+
+    /**
+     * GraphViz executable location; visualization (images) will be generated
+     * only if you install this program and set this property to the executable
+     * dot (dot.exe on Win).
+     *
+     * @parameter expression="dot"
+     */
+    private String executable;
+
+    /**
+     * Graphviz output types. Default is png. Possible values: png, jpg, gif,
+     * svg.
+     *
+     * @required
+     */
+    private String graphvizOutputType;
+
+    /**
+     * Graphviz output types. Possible values: png, jpg, gif, svg.
+     *
+     * @parameter
+     */
+    private String[] graphvizOutputTypes;
+
+    /**
+     * Doxia SiteRender.
+     *
+     * @component
+     */
+    private Renderer renderer;
+
+    private String indexHtmlContent;
+
+    /**
+     * @param locale report locale.
+     * @return report description.
+     * @see org.apache.maven.reporting.MavenReport#getDescription(java.util.Locale)
+     */
+    public String getDescription(final Locale locale) {
+        return getBundle(locale).getString("report.dot.description");
+    }
+
+    /**
+     * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale)
+     */
+    public String getName(final Locale locale) {
+        return getBundle(locale).getString("report.dot.name");
+    }
+
+    public String getOutputName() {
+        return SUBDIRECTORY + "/index";
+    }
+
+    public String getAggregate() {
+        return aggregate;
+    }
+
+    public void setAggregate(String aggregate) {
+        this.aggregate = aggregate;
+    }
+
+    public boolean isUseDot() {
+        return useDot;
+    }
+
+    public void setUseDot(boolean useDot) {
+        this.useDot = useDot;
+    }
+
+    public void execute() throws MojoExecutionException {
+        this.execute(this.buildDirectory, Locale.getDefault());
+        try {
+            writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
+        } catch (IOException e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        }
+    }
+
+    protected void executeReport(final Locale locale) throws MavenReportException {
+        try {
+            this.execute(this.outputDirectory, locale);
+
+            Sink kitchenSink = getSink();
+            if (kitchenSink != null) {
+                kitchenSink.rawText(indexHtmlContent);
+            } else {
+                writeIndexHtmlFile(outputDirectory, "index.html", indexHtmlContent);
+            }
+        } catch (Exception e) {
+            final MavenReportException ex = new MavenReportException(e.getMessage());
+            ex.initCause(e.getCause());
+            throw ex;
+        }
+    }
+
+    /**
+     * Executes DOT generator.
+     *
+     * @param outputDir report output directory.
+     * @param locale report locale.
+     * @throws org.apache.maven.plugin.MojoExecutionException if there were any execution errors.
+     */
+    protected void execute(final File outputDir, final Locale locale) throws MojoExecutionException {
+
+        try {
+            runCamelEmbedded(outputDir);
+        } catch (DependencyResolutionRequiredException e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        }
+        outputDir.mkdirs();
+
+        List<File> files = new ArrayList<File>();
+        appendFiles(files, outputDirectory);
+
+        if (graphvizOutputTypes == null) {
+            if (graphvizOutputType == null) {
+                graphvizOutputTypes = DEFAULT_GRAPHVIZ_OUTPUT_TYPES;
+            } else {
+                graphvizOutputTypes = new String[] {graphvizOutputType};
+            }
+        }
+        try {
+            Set<String> contextNames = new HashSet<String>();
+            for (File file : files) {
+                String contextName = file.getParentFile().getName();
+                contextNames.add(contextName);
+            }
+
+            boolean multipleCamelContexts = contextNames.size() > 1;
+            int size = files.size();
+            for (int i = 0; i < size; i++) {
+                File file = files.get(i);
+                String contextName = null;
+                if (multipleCamelContexts) {
+                    contextName = file.getParentFile().getName();
+                }
+
+                getLog().info("Generating contextName: " + contextName + " file: " + file + "");
+
+                generate(i, file, contextName);
+            }
+
+            if (multipleCamelContexts) {
+                // lets generate an index page which lists each indiviual
+                // CamelContext file
+                StringWriter buffer = new StringWriter();
+                PrintWriter out = new PrintWriter(buffer);
+
+                out.println("<h1>Camel Contexts</h1>");
+                out.println();
+
+                out.println("<ul>");
+                for (String contextName : contextNames) {
+                    out.print("  <li><a href='");
+                    out.print(contextName);
+                    out.print("/routes.html'>");
+                    out.print(contextName);
+                    out.println("</a></li>");
+                }
+                out.println("</ul>");
+                indexHtmlContent = buffer.toString();
+            }
+        } catch (CommandLineException e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        } catch (IOException e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        }
+    }
+
+    private void generate(int index, File file, String contextName) throws CommandLineException,
+        MojoExecutionException, IOException {
+
+        StringWriter buffer = new StringWriter();
+        PrintWriter out = new PrintWriter(buffer);
+        printHtmlHeader(out, contextName);
+        printHtmlFileHeader(out, file);
+        for (int j = 0; j < graphvizOutputTypes.length; j++) {
+            String format = graphvizOutputTypes[j];
+            String generated = convertFile(file, format);
+
+            if (format.equals("cmapx") && generated != null) {
+                // lets include the generated file inside the html
+                addFileToBuffer(out, new File(generated));
+            }
+        }
+        printHtmlFileFooter(out, file);
+        printHtmlFooter(out);
+
+        String content = buffer.toString();
+        String name = file.getName();
+        if (name.equalsIgnoreCase("routes.dot") || index == 0) {
+            indexHtmlContent = content;
+        }
+        int idx = name.lastIndexOf(".");
+        if (idx >= 0) {
+            name = name.substring(0, idx);
+            name += ".html";
+        }
+        writeIndexHtmlFile(file.getParentFile(), name, content);
+    }
+
+    protected void runCamelEmbedded(File outputDir) throws DependencyResolutionRequiredException {
+        if (runCamel) {
+            // default path, but can be overridden by configuration
+            if (applicationContextUri != null) {
+                getLog().info("Running Camel embedded to load Spring XML files from classpath: " + applicationContextUri);
+            } else if (fileApplicationContextUri != null) {
+                getLog().info("Running Camel embedded to load Spring XML files from file path: " + fileApplicationContextUri);
+            } else {
+                getLog().info("Running Camel embedded to load Spring XML files from default path: META-INF/spring/*.xml");
+            }
+
+            List list = project.getTestClasspathElements();
+            getLog().debug("Using classpath: " + list);
+
+            EmbeddedMojo mojo = new EmbeddedMojo();
+            mojo.setClasspathElements(list);
+            mojo.setDotEnabled(true);
+            mojo.setMainClass(mainClass);
+            if ("true".equals(getAggregate())) {
+                mojo.setDotAggregationEnabled(true);
+            }
+            mojo.setOutputDirectory(outputDirectory.getAbsolutePath());
+            mojo.setDuration(duration);
+            mojo.setLog(getLog());
+            mojo.setPluginContext(getPluginContext());
+            mojo.setApplicationContextUri(applicationContextUri);
+            mojo.setFileApplicationContextUri(fileApplicationContextUri);
+            try {
+                mojo.executeWithoutWrapping();
+            } catch (Exception e) {
+                getLog().error("Failed to run Camel embedded: " + e, e);
+            }
+        }
+    }
+
+    protected void writeIndexHtmlFile(File dir, String fileName, String content) throws IOException {
+        // File dir = outputDirectory;
+        dir.mkdirs();
+        File html = new File(dir, fileName);
+        PrintWriter out = null;
+        try {
+            out = new PrintWriter(new FileWriter(html));
+            out.println("<html>");
+            out.println("<head>");
+            out.println("</head>");
+            out.println("<body>");
+            out.println();
+            if (content == null) {
+                out.write("<p>No EIP diagrams available</p>");
+            } else {
+                out.write(content);
+            }
+            out.println("</body>");
+            out.println("</html>");
+        } finally {
+            String description = "Failed to close html output file";
+            close(out, description);
+        }
+    }
+
+    protected void printHtmlHeader(PrintWriter out, String contextName) {
+        if (contextName != null) {
+            out.println("<h1>EIP Patterns for CamelContext: " + contextName + "</h1>");
+        } else {
+            out.println("<h1>Camel EIP Patterns</h1>");
+        }
+        out.println();
+    }
+
+    protected void printHtmlFileHeader(PrintWriter out, File file) {
+        out.println("<p>");
+        out.println("  <img src='" + removeFileExtension(file.getName()) + ".png' usemap='#CamelRoutes'>");
+    }
+
+    protected void printHtmlFileFooter(PrintWriter out, File file) {
+        out.println("  </img>");
+        out.println("</p>");
+        out.println();
+    }
+
+    protected void printHtmlFooter(PrintWriter out) {
+        out.println();
+    }
+
+    protected void close(Closeable closeable, String description) {
+        if (closeable != null) {
+            try {
+                closeable.close();
+            } catch (IOException e) {
+                getLog().warn(description + ": " + e);
+            }
+        }
+    }
+
+    protected String convertFile(File file, String format) throws CommandLineException {
+        Log log = getLog();
+        if (!useDot) {
+            log.info("DOT generation disabled");
+            return null;
+        }
+        if (this.executable == null || this.executable.length() == 0) {
+            log.warn("Parameter <executable/> was not set in the pom.xml.  Skipping conversion.");
+            return null;
+        }
+
+        String generatedFileName = removeFileExtension(file.getAbsolutePath()) + "." + format;
+        Commandline cl = new Commandline();
+        cl.setExecutable(executable);
+        cl.createArgument().setValue("-T" + format);
+        cl.createArgument().setValue("-o");
+        cl.createArgument().setValue(generatedFileName);
+        cl.createArgument().setValue(file.getAbsolutePath());
+
+        log.debug("executing: " + cl.toString());
+
+        CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
+        CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
+
+        int exitCode = CommandLineUtils.executeCommandLine(cl, stdout, stderr);
+
+        String output = stdout.getOutput();
+        if (output.length() > 0) {
+            log.debug(output);
+        }
+        String errOutput = stderr.getOutput();
+        if (errOutput.length() > 0) {
+            log.warn(errOutput);
+        }
+        return generatedFileName;
+    }
+
+    protected String removeFileExtension(String name) {
+        int idx = name.lastIndexOf(".");
+        if (idx > 0) {
+            return name.substring(0, idx);
+        } else {
+            return name;
+        }
+    }
+
+    private void appendFiles(List<File> output, File file) {
+        if (file.isDirectory()) {
+            appendDirectory(output, file);
+        } else {
+            if (isValid(file)) {
+                output.add(file);
+            }
+        }
+    }
+
+    private void appendDirectory(List<File> output, File dir) {
+        File[] files = dir.listFiles();
+        for (File file : files) {
+            appendFiles(output, file);
+        }
+    }
+
+    private boolean isValid(File file) {
+        String name = file.getName().toLowerCase();
+        return name.endsWith(".dot");
+    }
+
+    private void addFileToBuffer(PrintWriter out, File file) throws MojoExecutionException {
+        BufferedReader reader = null;
+        try {
+            reader = new BufferedReader(new FileReader(file));
+            while (true) {
+                String line = reader.readLine();
+                if (line == null) {
+                    break;
+                } else {
+                    out.println(line);
+                }
+            }
+        } catch (IOException e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        } finally {
+            close(reader, "cmapx file");
+        }
+    }
+
+    /**
+     * Gets resource bundle for given locale.
+     *
+     * @param locale locale
+     * @return resource bundle
+     */
+    protected ResourceBundle getBundle(final Locale locale) {
+        return ResourceBundle.getBundle("camel-maven-plugin", locale, this.getClass().getClassLoader());
+    }
+
+    protected Renderer getSiteRenderer() {
+        return this.renderer;
+    }
+
+    protected String getOutputDirectory() {
+        return this.outputDirectory.getAbsolutePath();
+    }
+
+    protected MavenProject getProject() {
+        return this.project;
+    }
+}
\ No newline at end of file

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

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java Tue Oct 21 06:40:59 2008
@@ -0,0 +1,271 @@
+/**
+ * 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.guice.maven;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.codehaus.mojo.exec.AbstractExecMojo;
+
+/**
+ * Runs a CamelContext using any Spring XML configuration files found in
+ * <code>META-INF/spring/*.xml</code> and <code>camel-*.xml</code>
+ * and starting up the context; then generating
+ * the DOT file before closing the context down.
+ *
+ * @goal embedded
+ * @requiresDependencyResolution runtime
+ * @execute phase="test-compile"
+ */
+public class EmbeddedMojo extends AbstractExecMojo {
+
+    /**
+     * The duration to run the application for which by default is in milliseconds.
+     * A value <= 0 will run forever.
+     * Adding a s indicates seconds - eg "5s" means 5 seconds.
+     *
+     * @parameter expression="-1"
+     * @readonly
+     */
+    protected String duration;
+
+    /**
+     * The DOT File name used to generate the DOT diagram of the route definitions
+     *
+     * @parameter expression="${project.build.directory}/site/cameldoc/routes.dot"
+     * @readonly
+     */
+    protected String outputDirectory;
+
+    /**
+     * Allows the DOT file generation to be disabled
+     *
+     * @parameter expression="true"
+     * @readonly
+     */
+    protected boolean dotEnabled;
+
+    /**
+     * Allows the routes from multiple contexts to be aggregated into one DOT file (in addition to the individual files)
+     *
+     * @parameter expression="false"
+     * @readonly
+     */
+    protected boolean dotAggregationEnabled;
+
+    /**
+     * The classpath based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.applicationContextUri}"
+     */
+    protected String applicationContextUri;
+
+    /**
+     * The filesystem based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.fileApplicationContextUri}"
+     */
+    protected String fileApplicationContextUri;
+
+    /**
+     * Project classpath.
+     *
+     * @parameter expression="${project.testClasspathElements}"
+     * @required
+     * @readonly
+     */
+    private List classpathElements;
+
+    /**
+     * The main class to execute.
+     *
+     * @parameter expression="${camel.mainClass}"
+     *            default-value="org.apache.camel.spring.Main"
+     * @required
+     */
+    private String mainClass;
+
+    /**
+     * This method will run the mojo
+     */
+    public void execute() throws MojoExecutionException {
+        try {
+            executeWithoutWrapping();
+        } catch (Exception e) {
+            throw new MojoExecutionException("Failed: " + e, e);
+        }
+    }
+
+    public void executeWithoutWrapping() throws MalformedURLException, ClassNotFoundException,
+        NoSuchMethodException, IllegalAccessException, MojoExecutionException {
+        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
+        try {
+            ClassLoader newLoader = createClassLoader(null);
+            Thread.currentThread().setContextClassLoader(newLoader);
+            runCamel(newLoader);
+        } finally {
+            Thread.currentThread().setContextClassLoader(oldClassLoader);
+        }
+    }
+
+    // Properties
+    //-------------------------------------------------------------------------
+
+    /**
+     * Getter for property output directory.
+     *
+     * @return The value of output directory.
+     */
+    public String getOutputDirectory() {
+        return outputDirectory;
+    }
+
+    /**
+     * Setter for the output directory.
+     *
+     * @param inOutputDirectory The value of output directory.
+     */
+    public void setOutputDirectory(String inOutputDirectory) {
+        this.outputDirectory = inOutputDirectory;
+    }
+
+    public List getClasspathElements() {
+        return classpathElements;
+    }
+
+    public void setClasspathElements(List classpathElements) {
+        this.classpathElements = classpathElements;
+    }
+
+    public boolean isDotEnabled() {
+        return dotEnabled;
+    }
+
+    public void setDotEnabled(boolean dotEnabled) {
+        this.dotEnabled = dotEnabled;
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public void setDuration(String duration) {
+        this.duration = duration;
+    }
+
+    public boolean isDotAggregationEnabled() {
+        return dotAggregationEnabled;
+    }
+
+    public void setDotAggregationEnabled(boolean dotAggregationEnabled) {
+        this.dotAggregationEnabled = dotAggregationEnabled;
+    }
+
+    public String getApplicationContextUri() {
+        return applicationContextUri;
+    }
+
+    public void setApplicationContextUri(String applicationContextUri) {
+        this.applicationContextUri = applicationContextUri;
+    }
+
+    public String getFileApplicationContextUri() {
+        return fileApplicationContextUri;
+    }
+
+    public void setFileApplicationContextUri(String fileApplicationContextUri) {
+        this.fileApplicationContextUri = fileApplicationContextUri;
+    }
+
+    public String getMainClass() {
+        return mainClass;
+    }
+
+    public void setMainClass(String mainClass) {
+        this.mainClass = mainClass;
+    }
+
+    // Implementation methods
+    //-------------------------------------------------------------------------
+
+    protected void runCamel(ClassLoader newLoader) throws ClassNotFoundException, NoSuchMethodException,
+        IllegalAccessException, MojoExecutionException {
+
+        getLog().debug("Running Camel in: " + newLoader);
+        Class<?> type = newLoader.loadClass(mainClass);
+        Method method = type.getMethod("main", String[].class);
+        String[] arguments = createArguments();
+        getLog().debug("Starting the Camel Main with arguments: " + Arrays.asList(arguments));
+
+        try {
+            method.invoke(null, new Object[] {arguments});
+        } catch (InvocationTargetException e) {
+            Throwable t = e.getTargetException();
+            throw new MojoExecutionException("Failed: " + t, t);
+        }
+    }
+
+    protected String[] createArguments() {
+
+        ArrayList<String> args = new ArrayList<String>(5);
+        if (isDotEnabled()) {
+            args.add("-outdir");
+            args.add(getOutputDirectory());
+        }
+
+        if (isDotAggregationEnabled()) {
+            args.add("-aggregate-dot");
+            args.add("true");
+        }
+
+        if (applicationContextUri != null) {
+            args.add("-applicationContext");
+            args.add(applicationContextUri);
+        } else if (fileApplicationContextUri != null) {
+            args.add("-fileApplicationContext");
+            args.add(fileApplicationContextUri);
+        }
+
+        args.add("-duration");
+        args.add(getDuration());
+
+        return (String[]) args.toArray(new String[0]);
+    }
+
+    public ClassLoader createClassLoader(ClassLoader parent) throws MalformedURLException {
+        getLog().debug("Using classpath: " + classpathElements);
+
+        int size = classpathElements.size();
+        URL[] urls = new URL[size];
+        for (int i = 0; i < size; i++) {
+            String name = (String) classpathElements.get(i);
+            File file = new File(name);
+            urls[i] = file.toURL();
+            getLog().debug("URL: " + urls[i]);
+        }
+        URLClassLoader loader = new URLClassLoader(urls, parent);
+        return loader;
+    }
+}
\ No newline at end of file

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

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java Tue Oct 21 06:40:59 2008
@@ -0,0 +1,835 @@
+/**
+ * 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.guice.maven;
+
+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.Arrays;
+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;
+
+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 Camel using the
+ * <code>jndi.properties</code> file on the classpath as the
+ * way to <a href="http://activemq.apache.org/camel/guice.html">bootstrap Camel using Guice</a>
+ *
+ * @goal run
+ * @requiresDependencyResolution runtime
+ * @execute phase="test-compile"
+ */
+public class RunMojo extends AbstractExecMojo {
+
+    // TODO
+    // this code is based on a copy-and-paste of maven-exec-plugin
+    //
+    // If we could avoid the mega-cut-n-paste it would really really help!
+    // ideally all I wanna do is auto-default 2 values!
+    // namely the main and the command line arguments..
+
+    /**
+     * The maven project.
+     *
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
+
+    /**
+     * The duration to run the application for which by default is in
+     * milliseconds. A value <= 0 will run forever.
+     * Adding a s indicates seconds - eg "5s" means 5 seconds.
+     *
+     * @parameter expression="-1"
+     *
+     */
+    protected String duration;
+
+    /**
+     * The DOT output directory name used to generate the DOT diagram of the
+     * route definitions
+     *
+     * @parameter expression="${project.build.directory}/site/cameldoc"
+     * @readonly
+     */
+    protected String dotDir;
+
+    /**
+     * Allows the DOT file generation to be disabled
+     *
+     * @parameter expression="true"
+     * @readonly
+     */
+    protected boolean dotEnabled;
+
+    /**
+     * @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;
+
+    /**
+     * Whether to enable the debugger or not
+     *
+     * @parameter expression="${camel.debug}"
+     *            default-value="false"
+     * @required
+     */
+    private boolean debug;
+
+    /**
+     * Whether to enable the tracer or not
+     *
+     * @parameter expression="${camel.trace}"
+     *            default-value="false"
+     * @required
+     */
+    private boolean trace;
+
+    /**
+     * Output all routes to the specified XML file
+     *
+     * @parameter expression="${camel.routesOutputFile}"
+     */
+    private String routesOutputFile;
+
+    /**
+     * The main class to execute.
+     *
+     * @parameter expression="${camel.mainClass}"
+     *            default-value="org.apache.camel.guice.Main"
+     * @required
+     */
+    private String mainClass;
+
+    /**
+     * The class arguments.
+     *
+     * @parameter expression="${camel.arguments}"
+     */
+    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 org.apache.maven.plugin.MojoExecutionException execution of the main class or one of the
+     *                 threads it generated failed.
+     * @throws org.apache.maven.plugin.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.");
+        }
+
+        // lets create the command line arguments to pass in...
+        List<String> args = new ArrayList<String>();
+        if (dotDir != null && dotEnabled) {
+            args.add("-o");
+            args.add(dotDir);
+        }
+        if (debug) {
+            args.add("-x");
+        }
+        if (trace) {
+            args.add("-t");
+        }
+
+        if (routesOutputFile != null) {
+            args.add("-output");
+            args.add(routesOutputFile);
+        }
+
+        args.add("-d");
+        args.add(duration);
+        if (arguments != null) {
+            args.addAll(Arrays.asList(arguments));
+        }
+        arguments = new String[args.size()];
+        args.toArray(arguments);
+
+        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) {
+                // 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);
+            }
+        }
+    }
+
+    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!
+        }
+        // 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) {
+        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]);
+        }
+        // note: result should be modifiable
+        return result;
+    }
+
+    /**
+     * 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 org.apache.maven.plugin.MojoExecutionException
+     */
+    private ClassLoader getClassLoader() throws MojoExecutionException {
+        List classpathURLs = new ArrayList();
+        this.addRelevantPluginDependenciesToClasspath(classpathURLs);
+        this.addRelevantProjectDependenciesToClasspath(classpathURLs);
+
+        getLog().info("Classpath = " + 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 org.apache.maven.plugin.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 org.apache.maven.plugin.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);
+
+                Set dependencies = project.getArtifacts();
+
+                // system scope dependencies are not returned by maven 2.0. See
+                // MEXEC-17
+                dependencies.addAll(getAllNonTestScopedDependencies());
+
+                Iterator iter = dependencies.iterator();
+                while (iter.hasNext()) {
+                    Artifact classPathElement = (Artifact)iter.next();
+                    getLog().debug("Adding project dependency artifact: " + classPathElement.getArtifactId()
+                                       + " to classpath");
+                    File file = classPathElement.getFile();
+                    if (file != null) {
+                        path.add(file.toURL());
+                    }
+                }
+
+            } catch (MalformedURLException e) {
+                throw new MojoExecutionException("Error during setting up classpath", e);
+            }
+        } else {
+            getLog().debug("Project Dependencies will be excluded.");
+        }
+
+    }
+
+    private Collection getAllNonTestScopedDependencies() throws MojoExecutionException {
+        List answer = new ArrayList();
+
+        for (Iterator artifacts = getAllDependencies().iterator(); artifacts.hasNext();) {
+            Artifact artifact = (Artifact)artifacts.next();
+
+            // do not add test artifacts
+            if (!artifact.getScope().equals(Artifact.SCOPE_TEST)) {
+                answer.add(artifact);
+            }
+        }
+        return answer;
+    }
+
+    // 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";
+            }
+            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());
+            }
+
+            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 org.apache.maven.plugin.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 org.apache.maven.plugin.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);
+            }
+        }
+    }
+
+}
\ No newline at end of file

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

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt Tue Oct 21 06:40:59 2008
@@ -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/guice-maven-plugin/src/main/resources/META-INF/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt Tue Oct 21 06:40:59 2008
@@ -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/tooling/maven/guice-maven-plugin/src/main/resources/META-INF/NOTICE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties?rev=706625&view=auto
==============================================================================
--- activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties (added)
+++ activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties Tue Oct 21 06:40:59 2008
@@ -0,0 +1,33 @@
+# 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.
+
+report.dot.name = Camel EIP Diagram
+report.dot.description = This report generates a graphical diagram of all the Enterprise Integration Patterns in this project
+report.dot.header=Dot Report
+
+report.converters.name = Camel TypeConverter(s)
+report.converters.description = This report generates a list of available type converters.
+report.converters.report.title = Apache Camel TypeConverters
+report.converters.report.header = TypeConverter(s)
+report.converters.report.table.caption = TypeConverter Table
+report.converters.report.table.head1 = From
+report.converters.report.table.head2 = To
+report.converters.report.table.head3 = Method
+report.converters.report.table.head4 = Class
+report.converters.report.table.head5 = Type
+report.converters.report.intro = List of available TypeConverters for on-the-fly transformation of Messages into another required format. 
+report.converters.report.seealso = See also: 

Propchange: activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/resources/guice-maven-plugin.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/maven/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/pom.xml?rev=706625&r1=706624&r2=706625&view=diff
==============================================================================
--- activemq/camel/trunk/tooling/maven/pom.xml (original)
+++ activemq/camel/trunk/tooling/maven/pom.xml Tue Oct 21 06:40:59 2008
@@ -33,6 +33,7 @@
 
   <modules>
     <module>camel-maven-plugin</module>
+    <module>guice-maven-plugin</module>
     <module>maven-html-to-pdf</module>
   </modules>