activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r412386 - /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
Date Wed, 07 Jun 2006 12:14:55 GMT
Author: jlim
Date: Wed Jun  7 05:14:54 2006
New Revision: 412386

URL: http://svn.apache.org/viewvc?rev=412386&view=rev
Log:
added patch to run broker using a URI
ie. mvn activemq-perf:broker -Durl=broker:(tcp://localhost:61616)?useJmx=false

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java?rev=412386&r1=412385&r2=412386&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
Wed Jun  7 05:14:54 2006
@@ -66,6 +66,13 @@
      */
     private File configFile;
 
+    /**
+     * Broker URL.
+     *
+     * @parameter expression="${url}"
+     */
+    private String url;
+
     public void execute()
             throws MojoExecutionException {
 
@@ -76,20 +83,30 @@
             out.mkdirs();
         }
 
-        File config;
-        if (configFile != null) {
-            config = configFile;
+
+        String[] args = new String[2];
+        if (url != null) {
+           args[0] = "start";
+           args[1] = url;
         } else {
-            config = new File(configDirectory + File.separator + configType + ".xml");
-        }
+            File config;
+            if (configFile != null) {
+                config = configFile;
+            } else {
 
-        try {
-            config = copy(config);
-        } catch (IOException e) {
-            throw new MojoExecutionException(e.getMessage());
+                config = new File(configDirectory + File.separator + configType + ".xml");
+            }
+
+            try {
+                config = copy(config);
+            } 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);
     }
 



Mime
View raw message