mirror of https://github.com/apache/activemq.git
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:
parent
5f5bff613e
commit
d2db87cc0b
|
@ -22,12 +22,6 @@
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>incubator-activemq</groupId>
|
<groupId>incubator-activemq</groupId>
|
||||||
<artifactId>activemq-core</artifactId>
|
<artifactId>activemq-core</artifactId>
|
||||||
|
@ -38,6 +32,11 @@
|
||||||
<artifactId>activemq-console</artifactId>
|
<artifactId>activemq-console</artifactId>
|
||||||
<version>4.0-SNAPSHOT</version>
|
<version>4.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>incubator-activemq</groupId>
|
||||||
|
<artifactId>activeio-core</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.derby</groupId>
|
<groupId>org.apache.derby</groupId>
|
||||||
<artifactId>derby</artifactId>
|
<artifactId>derby</artifactId>
|
||||||
|
@ -48,6 +47,16 @@
|
||||||
<artifactId>derbynet</artifactId>
|
<artifactId>derbynet</artifactId>
|
||||||
<version>10.1.1.0</version>
|
<version>10.1.1.0</version>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
|
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
|
||||||
|
|
|
@ -16,16 +16,18 @@ package org.apache.activemq.maven;
|
||||||
* limitations under the License.
|
* 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.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
|
||||||
|
import javax.jms.JMSException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Goal which touches a timestamp file.
|
* Goal which touches a timestamp file.
|
||||||
*
|
*
|
||||||
* @goal consumer
|
* @goal consumer
|
||||||
* @phase process
|
* @phase process-sources
|
||||||
*/
|
*/
|
||||||
public class ConsumerMojo
|
public class ConsumerMojo
|
||||||
extends AbstractMojo {
|
extends AbstractMojo {
|
||||||
|
@ -64,6 +66,10 @@ public class ConsumerMojo
|
||||||
throws MojoExecutionException {
|
throws MojoExecutionException {
|
||||||
|
|
||||||
String[] args = {url, topic, subject, durable, maximumMessage};
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package org.apache.activemq.maven;
|
package org.apache.activemq.maven;
|
||||||
|
|
||||||
import org.apache.activemq.tool.ConsumerTool;
|
import org.apache.activemq.tool.JmsProducerClient;
|
||||||
import org.apache.activemq.tool.ProducerTool;
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
|
||||||
|
import javax.jms.JMSException;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2005 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +66,11 @@ public class ProducerMojo
|
||||||
public void execute()
|
public void execute()
|
||||||
throws MojoExecutionException {
|
throws MojoExecutionException {
|
||||||
|
|
||||||
String[] args = {url,topic,subject,durable,messageCount,messageSize};
|
String[] args = {url, topic, subject, durable, messageCount, messageSize};
|
||||||
ProducerTool.main(args);
|
try {
|
||||||
|
JmsProducerClient.main(args);
|
||||||
|
} catch (JMSException e) {
|
||||||
|
throw new MojoExecutionException("Error executing Producer: " + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue