Author: jstrachan
Date: Tue Oct 21 07:10:21 2008
New Revision: 706635
URL: http://svn.apache.org/viewvc?rev=706635&view=rev
Log:
a few more fixes for CAMEL-1009
Modified:
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
Modified:
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=706635&r1=706634&r2=706635&view=diff
==============================================================================
---
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
(original)
+++
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/DotMojo.java
Tue Oct 21 07:10:21 2008
@@ -76,7 +76,7 @@
protected String duration;
/**
- * Whether we should boot up camel with the META-INF/services/*.xml to
+ * Whether we should boot up camel with the jndi.properties file to
* generate the DOT file
*
* @parameter expression="true"
@@ -87,7 +87,7 @@
* The main class to execute.
*
* @parameter expression="${camel.mainClass}"
- * default-value="org.apache.camel.spring.Main"
+ * default-value="org.apache.camel.guice.Main"
* @required
*/
private String mainClass;
@@ -101,21 +101,6 @@
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}"
@@ -353,14 +338,7 @@
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");
- }
+ getLog().info("Running Camel embedded to load jndi.properties file
from the classpath");
List list = project.getTestClasspathElements();
getLog().debug("Using classpath: " + list);
@@ -376,8 +354,6 @@
mojo.setDuration(duration);
mojo.setLog(getLog());
mojo.setPluginContext(getPluginContext());
- mojo.setApplicationContextUri(applicationContextUri);
- mojo.setFileApplicationContextUri(fileApplicationContextUri);
try {
mojo.executeWithoutWrapping();
} catch (Exception e) {
Modified:
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=706635&r1=706634&r2=706635&view=diff
==============================================================================
---
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
(original)
+++
activemq/camel/trunk/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
Tue Oct 21 07:10:21 2008
@@ -30,10 +30,9 @@
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.
+ * 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>
*
* @goal embedded
* @requiresDependencyResolution runtime
@@ -76,20 +75,6 @@
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}"
@@ -102,7 +87,7 @@
* The main class to execute.
*
* @parameter expression="${camel.mainClass}"
- * default-value="org.apache.camel.spring.Main"
+ * default-value="org.apache.camel.guice.Main"
* @required
*/
private String mainClass;
@@ -183,22 +168,6 @@
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;
}
@@ -240,18 +209,10 @@
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]);
+ return args.toArray(new String[0]);
}
public ClassLoader createClassLoader(ClassLoader parent) throws
MalformedURLException {