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:
Jonas B. Lim 2006-06-07 12:14:54 +00:00
parent 51eed37625
commit 741cdeec2b
1 changed files with 27 additions and 10 deletions

View File

@ -66,6 +66,13 @@ public class ServerMojo
*/
private File configFile;
/**
* Broker URL.
*
* @parameter expression="${url}"
*/
private String url;
public void execute()
throws MojoExecutionException {
@ -76,10 +83,17 @@ public class ServerMojo
out.mkdirs();
}
String[] args = new String[2];
if (url != null) {
args[0] = "start";
args[1] = url;
} else {
File config;
if (configFile != null) {
config = configFile;
} else {
config = new File(configDirectory + File.separator + configType + ".xml");
}
@ -88,8 +102,11 @@ public class ServerMojo
} catch (IOException e) {
throw new MojoExecutionException(e.getMessage());
}
args[0] = "start";
args[1] = "xbean:" + (config.toURI()).toString();
}
String[] args = {"start", "xbean:" + (config.toURI()).toString()};
Main.main(args);
}