Fix runtime and compiletime error.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@411641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Frederick G. Oconer 2006-06-05 02:36:25 +00:00
parent 5f5bff613e
commit d2db87cc0b
3 changed files with 33 additions and 13 deletions

View File

@ -22,12 +22,6 @@
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>incubator-activemq</groupId>
<artifactId>activemq-core</artifactId>
@ -38,6 +32,11 @@
<artifactId>activemq-console</artifactId>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>incubator-activemq</groupId>
<artifactId>activeio-core</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
@ -48,6 +47,16 @@
<artifactId>derbynet</artifactId>
<version>10.1.1.0</version>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>

View File

@ -16,16 +16,18 @@ package org.apache.activemq.maven;
* limitations under the License.
*/
import org.apache.activemq.tool.ConsumerTool;
import org.apache.activemq.tool.JmsConsumerClient;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import javax.jms.JMSException;
/**
* Goal which touches a timestamp file.
*
* @goal consumer
* @phase process
* @phase process-sources
*/
public class ConsumerMojo
extends AbstractMojo {
@ -64,6 +66,10 @@ public class ConsumerMojo
throws MojoExecutionException {
String[] args = {url, topic, subject, durable, maximumMessage};
ConsumerTool.main(args);
try {
JmsConsumerClient.main(args);
} catch (JMSException e) {
throw new MojoExecutionException("Error Executing Consumer: " + e.getMessage());
}
}
}

View File

@ -1,10 +1,11 @@
package org.apache.activemq.maven;
import org.apache.activemq.tool.ConsumerTool;
import org.apache.activemq.tool.ProducerTool;
import org.apache.activemq.tool.JmsProducerClient;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import javax.jms.JMSException;
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@ -65,7 +66,11 @@ public class ProducerMojo
public void execute()
throws MojoExecutionException {
String[] args = {url,topic,subject,durable,messageCount,messageSize};
ProducerTool.main(args);
String[] args = {url, topic, subject, durable, messageCount, messageSize};
try {
JmsProducerClient.main(args);
} catch (JMSException e) {
throw new MojoExecutionException("Error executing Producer: " + e.getMessage());
}
}
}