option to remove the web server on the install
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4de929c3 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4de929c3 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4de929c3 Branch: refs/heads/master Commit: 4de929c3e1293afc9b5005f959e3b0a24483eec7 Parents: 14cb3a0 Author: Clebert Suconic <clebertsuco...@apache.org> Authored: Wed May 20 16:58:53 2015 -0400 Committer: Clebert Suconic <clebertsuco...@apache.org> Committed: Wed May 20 22:42:42 2015 -0400 ---------------------------------------------------------------------- .../activemq/artemis/cli/commands/Create.java | 26 ++++++++++++++++++++ .../cli/commands/etc/bootstrap-web-settings.txt | 4 +++ .../artemis/cli/commands/etc/bootstrap.xml | 5 +--- .../artemis/test/StreamClassPathTest.java | 1 + 4 files changed, 32 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4de929c3/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java ---------------------------------------------------------------------- diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java index 9fae68b..ca36024 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java @@ -80,6 +80,7 @@ public class Create extends InputAbstract public static final String ETC_CLUSTER_SECURITY_SETTINGS_TXT = "etc/cluster-security-settings.txt"; public static final String ETC_CLUSTER_SETTINGS_TXT = "etc/cluster-settings.txt"; public static final String ETC_CONNECTOR_SETTINGS_TXT = "etc/connector-settings.txt"; + public static final String ETC_BOOTSTRAP_WEB_SETTINGS_TXT = "etc/bootstrap-web-settings.txt"; @Arguments(description = "The instance directory to hold the broker's configuration and data", required = true) File directory; @@ -132,10 +133,23 @@ public class Create extends InputAbstract @Option(name = "--role", description = "The name for the role created (Default: amq)") String role; + @Option(name = "--no-web", description = "This will remove the web server definition from bootstrap.xml") + boolean noWeb; + boolean IS_WINDOWS; boolean IS_CYGWIN; + public boolean isNoWeb() + { + return noWeb; + } + + public void setNoWeb(boolean noWeb) + { + this.noWeb = noWeb; + } + public int getPortOffset() { return portOffset; @@ -500,6 +514,18 @@ public class Create extends InputAbstract filters.put("${bootstrap.guest}", ""); } + + if (noWeb) + { + filters.put("${bootstrap-web-settings}", ""); + } + else + { + filters.put("${bootstrap-web-settings}", applyFilters(readTextFile(ETC_BOOTSTRAP_WEB_SETTINGS_TXT), filters)); + } + + + write(ETC_BOOTSTRAP_XML, filters, false); write(ETC_BROKER_XML, filters, false); write(ETC_ARTEMIS_ROLES_PROPERTIES, filters, false); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4de929c3/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt ---------------------------------------------------------------------- diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt new file mode 100644 index 0000000..790cda3 --- /dev/null +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt @@ -0,0 +1,4 @@ + <!-- The web server is only bound to loalhost by default --> + <web bind="http://localhost:${http.port}" path="web"> + <app url="jolokia" war="jolokia-war-1.2.3.war"/> + </web> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4de929c3/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap.xml ---------------------------------------------------------------------- diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap.xml index b4164d8..be51734 100644 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap.xml +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap.xml @@ -25,10 +25,7 @@ <server configuration="file:${artemis.instance}/etc/broker.xml"/> - <!-- The web server is only bound to loalhost by default --> - <web bind="http://localhost:${http.port}" path="web"> - <app url="jolokia" war="jolokia-war-1.2.3.war"/> - </web> +${bootstrap-web-settings} </broker> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4de929c3/artemis-cli/src/test/java/org/apache/activemq/artemis/test/StreamClassPathTest.java ---------------------------------------------------------------------- diff --git a/artemis-cli/src/test/java/org/apache/activemq/artemis/test/StreamClassPathTest.java b/artemis-cli/src/test/java/org/apache/activemq/artemis/test/StreamClassPathTest.java index c9f7771..8a6764c 100644 --- a/artemis-cli/src/test/java/org/apache/activemq/artemis/test/StreamClassPathTest.java +++ b/artemis-cli/src/test/java/org/apache/activemq/artemis/test/StreamClassPathTest.java @@ -48,6 +48,7 @@ public class StreamClassPathTest openStream(Create.ETC_CLUSTER_SECURITY_SETTINGS_TXT); openStream(Create.ETC_CLUSTER_SETTINGS_TXT); openStream(Create.ETC_CONNECTOR_SETTINGS_TXT); + openStream(Create.ETC_BOOTSTRAP_WEB_SETTINGS_TXT); }