org.apache.camel.guice.maven
Class EmbeddedMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.exec.AbstractExecMojo
          extended by org.apache.camel.guice.maven.EmbeddedMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class EmbeddedMojo
extends org.codehaus.mojo.exec.AbstractExecMojo

Runs a Camel using the jndi.properties file on the classpath to way to bootstrap via Guice


Field Summary
protected  boolean dotAggregationEnabled
          Allows the routes from multiple contexts to be aggregated into one DOT file (in addition to the individual files)
protected  boolean dotEnabled
          Allows the DOT file generation to be disabled
protected  String duration
          The duration to run the application for which by default is in milliseconds.
protected  String outputDirectory
          The DOT File name used to generate the DOT diagram of the route definitions
 
Fields inherited from class org.codehaus.mojo.exec.AbstractExecMojo
classpathScope, project
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EmbeddedMojo()
           
 
Method Summary
protected  String[] createArguments()
           
 ClassLoader createClassLoader(ClassLoader parent)
           
 void execute()
          This method will run the mojo
 void executeWithoutWrapping()
           
 List getClasspathElements()
           
 String getDuration()
           
 String getMainClass()
           
 String getOutputDirectory()
          Getter for property output directory.
 boolean isDotAggregationEnabled()
           
 boolean isDotEnabled()
           
protected  void runCamel(ClassLoader newLoader)
           
 void setClasspathElements(List classpathElements)
           
 void setDotAggregationEnabled(boolean dotAggregationEnabled)
           
 void setDotEnabled(boolean dotEnabled)
           
 void setDuration(String duration)
           
 void setMainClass(String mainClass)
           
 void setOutputDirectory(String inOutputDirectory)
          Setter for the output directory.
 
Methods inherited from class org.codehaus.mojo.exec.AbstractExecMojo
collectProjectArtifactsAndClasspath, hasCommandlineArgs, parseCommandlineArgs, registerSourceRoots
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

duration

protected String duration
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.


outputDirectory

protected String outputDirectory
The DOT File name used to generate the DOT diagram of the route definitions


dotEnabled

protected boolean dotEnabled
Allows the DOT file generation to be disabled


dotAggregationEnabled

protected boolean dotAggregationEnabled
Allows the routes from multiple contexts to be aggregated into one DOT file (in addition to the individual files)

Constructor Detail

EmbeddedMojo

public EmbeddedMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
This method will run the mojo

Throws:
org.apache.maven.plugin.MojoExecutionException

executeWithoutWrapping

public void executeWithoutWrapping()
                            throws MalformedURLException,
                                   ClassNotFoundException,
                                   NoSuchMethodException,
                                   IllegalAccessException,
                                   org.apache.maven.plugin.MojoExecutionException
Throws:
MalformedURLException
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
org.apache.maven.plugin.MojoExecutionException

getOutputDirectory

public String getOutputDirectory()
Getter for property output directory.

Returns:
The value of output directory.

setOutputDirectory

public void setOutputDirectory(String inOutputDirectory)
Setter for the output directory.

Parameters:
inOutputDirectory - The value of output directory.

getClasspathElements

public List getClasspathElements()

setClasspathElements

public void setClasspathElements(List classpathElements)

isDotEnabled

public boolean isDotEnabled()

setDotEnabled

public void setDotEnabled(boolean dotEnabled)

getDuration

public String getDuration()

setDuration

public void setDuration(String duration)

isDotAggregationEnabled

public boolean isDotAggregationEnabled()

setDotAggregationEnabled

public void setDotAggregationEnabled(boolean dotAggregationEnabled)

getMainClass

public String getMainClass()

setMainClass

public void setMainClass(String mainClass)

runCamel

protected void runCamel(ClassLoader newLoader)
                 throws ClassNotFoundException,
                        NoSuchMethodException,
                        IllegalAccessException,
                        org.apache.maven.plugin.MojoExecutionException
Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
org.apache.maven.plugin.MojoExecutionException

createArguments

protected String[] createArguments()

createClassLoader

public ClassLoader createClassLoader(ClassLoader parent)
                              throws MalformedURLException
Throws:
MalformedURLException


Apache CAMEL