mirror of https://github.com/apache/activemq.git
added patch to run broker using a URI
ie. mvn activemq-perf:broker -Durl=broker:(tcp://localhost:61616)?useJmx=false git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@412386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51eed37625
commit
741cdeec2b
|
@ -66,6 +66,13 @@ public class ServerMojo
|
||||||
*/
|
*/
|
||||||
private File configFile;
|
private File configFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Broker URL.
|
||||||
|
*
|
||||||
|
* @parameter expression="${url}"
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
public void execute()
|
public void execute()
|
||||||
throws MojoExecutionException {
|
throws MojoExecutionException {
|
||||||
|
|
||||||
|
@ -76,10 +83,17 @@ public class ServerMojo
|
||||||
out.mkdirs();
|
out.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String[] args = new String[2];
|
||||||
|
if (url != null) {
|
||||||
|
args[0] = "start";
|
||||||
|
args[1] = url;
|
||||||
|
} else {
|
||||||
File config;
|
File config;
|
||||||
if (configFile != null) {
|
if (configFile != null) {
|
||||||
config = configFile;
|
config = configFile;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
config = new File(configDirectory + File.separator + configType + ".xml");
|
config = new File(configDirectory + File.separator + configType + ".xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,8 +102,11 @@ public class ServerMojo
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new MojoExecutionException(e.getMessage());
|
throw new MojoExecutionException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
args[0] = "start";
|
||||||
|
args[1] = "xbean:" + (config.toURI()).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String[] args = {"start", "xbean:" + (config.toURI()).toString()};
|
|
||||||
Main.main(args);
|
Main.main(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue