You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2015/05/04 17:30:40 UTC

[09/11] activemq-artemis git commit: Moving artemis-tools to artemis-cli and improving the tooling

Moving artemis-tools to artemis-cli and improving the tooling

Artemis tools is now part of the cli
Bootstrap was renamed to CLI


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ea3370b3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ea3370b3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ea3370b3

Branch: refs/heads/master
Commit: ea3370b38cec67b25b32d8bb5a9a5c000573da6f
Parents: dc58e43
Author: Clebert Suconic <cl...@apache.org>
Authored: Sun May 3 11:40:36 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Sun May 3 12:42:19 2015 -0400

----------------------------------------------------------------------
 artemis-bootstrap/pom.xml                       |  146 ---
 .../org/apache/activemq/artemis/cli/banner.txt  |    8 -
 .../apache/activemq/artemis/cli/Artemis.java    |   92 --
 .../artemis/cli/ConfigurationException.java     |   25 -
 .../activemq/artemis/cli/commands/Action.java   |   24 -
 .../artemis/cli/commands/ActionContext.java     |   41 -
 .../activemq/artemis/cli/commands/Create.java   |  368 ------
 .../artemis/cli/commands/HelpAction.java        |   30 -
 .../activemq/artemis/cli/commands/Run.java      |  152 ---
 .../activemq/artemis/cli/commands/Stop.java     |   62 -
 .../artemis/components/ExternalComponent.java   |   25 -
 .../artemis/factory/BasicSecurityHandler.java   |   54 -
 .../activemq/artemis/factory/BrokerFactory.java |   92 --
 .../artemis/factory/BrokerFactoryHandler.java   |   26 -
 .../activemq/artemis/factory/BrokerHandler.java |   26 -
 .../artemis/factory/FileBrokerHandler.java      |   31 -
 .../artemis/factory/SecurityHandler.java        |   25 -
 .../artemis/factory/SecurityManagerFactory.java |   42 -
 .../factory/XmlBrokerFactoryHandler.java        |   38 -
 .../activemq/artemis/integration/Broker.java    |   26 -
 .../artemis/integration/FileBroker.java         |  118 --
 .../bootstrap/ActiveMQBootstrapBundle.java      |   32 -
 .../bootstrap/ActiveMQBootstrapLogger.java      |   71 --
 .../artemis/broker/security/basic-security      |   17 -
 .../apache/activemq/artemis/broker/server/file  |   17 -
 .../org/apache/activemq/artemis/broker/xml      |   17 -
 .../activemq/artemis/cli/commands/bin/artemis   |  119 --
 .../artemis/cli/commands/bin/artemis-service    |  154 ---
 .../cli/commands/bin/artemis-service.xml        |   59 -
 .../artemis/cli/commands/bin/artemis.cmd        |   76 --
 .../cli/commands/etc/artemis-roles.properties   |   17 -
 .../cli/commands/etc/artemis-users.properties   |   17 -
 .../artemis/cli/commands/etc/artemis.profile    |   27 -
 .../cli/commands/etc/artemis.profile.cmd        |   27 -
 .../artemis/cli/commands/etc/bootstrap.xml      |   34 -
 .../artemis/cli/commands/etc/broker.xml         |   81 --
 .../cli/commands/etc/cluster-settings.txt       |   25 -
 .../artemis/cli/commands/etc/logging.properties |   51 -
 .../cli/commands/etc/replicated-settings.txt    |    6 -
 .../cli/commands/etc/shared-store-settings.txt  |    6 -
 .../activemq/artemis/test/FileBrokerTest.java   |   81 --
 .../resources/activemq-configuration-nojms.xml  |   73 --
 artemis-bootstrap/src/test/resources/broker.xml |   77 --
 artemis-cli/pom.xml                             |  146 +++
 .../org/apache/activemq/artemis/cli/banner.txt  |    8 +
 .../apache/activemq/artemis/cli/Artemis.java    |  102 ++
 .../artemis/cli/ConfigurationException.java     |   25 +
 .../activemq/artemis/cli/commands/Action.java   |   24 +
 .../artemis/cli/commands/ActionContext.java     |   41 +
 .../activemq/artemis/cli/commands/Create.java   |  368 ++++++
 .../artemis/cli/commands/HelpAction.java        |   30 +
 .../activemq/artemis/cli/commands/Run.java      |  152 +++
 .../activemq/artemis/cli/commands/Stop.java     |   62 +
 .../cli/commands/tools/DecodeJournal.java       |  393 ++++++
 .../cli/commands/tools/EncodeJournal.java       |  229 ++++
 .../artemis/cli/commands/tools/HelpData.java    |   40 +
 .../artemis/cli/commands/tools/PrintData.java   |  379 ++++++
 .../cli/commands/tools/XmlDataConstants.java    |  123 ++
 .../cli/commands/tools/XmlDataExporter.java     | 1125 ++++++++++++++++++
 .../cli/commands/tools/XmlDataImporter.java     | 1093 +++++++++++++++++
 .../artemis/components/ExternalComponent.java   |   25 +
 .../artemis/factory/BasicSecurityHandler.java   |   54 +
 .../activemq/artemis/factory/BrokerFactory.java |   92 ++
 .../artemis/factory/BrokerFactoryHandler.java   |   26 +
 .../activemq/artemis/factory/BrokerHandler.java |   26 +
 .../artemis/factory/FileBrokerHandler.java      |   31 +
 .../artemis/factory/SecurityHandler.java        |   25 +
 .../artemis/factory/SecurityManagerFactory.java |   42 +
 .../factory/XmlBrokerFactoryHandler.java        |   38 +
 .../activemq/artemis/integration/Broker.java    |   26 +
 .../artemis/integration/FileBroker.java         |  118 ++
 .../bootstrap/ActiveMQBootstrapBundle.java      |   32 +
 .../bootstrap/ActiveMQBootstrapLogger.java      |   71 ++
 .../artemis/broker/security/basic-security      |   17 +
 .../apache/activemq/artemis/broker/server/file  |   17 +
 .../org/apache/activemq/artemis/broker/xml      |   17 +
 .../activemq/artemis/cli/commands/bin/artemis   |  119 ++
 .../artemis/cli/commands/bin/artemis-service    |  154 +++
 .../cli/commands/bin/artemis-service.xml        |   59 +
 .../artemis/cli/commands/bin/artemis.cmd        |   76 ++
 .../cli/commands/etc/artemis-roles.properties   |   17 +
 .../cli/commands/etc/artemis-users.properties   |   17 +
 .../artemis/cli/commands/etc/artemis.profile    |   27 +
 .../cli/commands/etc/artemis.profile.cmd        |   27 +
 .../artemis/cli/commands/etc/bootstrap.xml      |   34 +
 .../artemis/cli/commands/etc/broker.xml         |   81 ++
 .../cli/commands/etc/cluster-settings.txt       |   25 +
 .../artemis/cli/commands/etc/logging.properties |   51 +
 .../cli/commands/etc/replicated-settings.txt    |    6 +
 .../cli/commands/etc/shared-store-settings.txt  |    6 +
 .../activemq/artemis/test/FileBrokerTest.java   |   81 ++
 artemis-cli/src/test/resources/broker-nojms.xml |   73 ++
 artemis-cli/src/test/resources/broker.xml       |   77 ++
 artemis-distribution/pom.xml                    |    8 +-
 artemis-distribution/src/main/assembly/dep.xml  |    3 +-
 .../impl/journal/DescribeJournal.java           |   28 +-
 artemis-tools/pom.xml                           |   90 --
 .../artemis/tools/ActiveMQToolsLogger.java      |   44 -
 .../apache/activemq/artemis/tools/DataTool.java |  231 ----
 .../activemq/artemis/tools/ExportJournal.java   |  224 ----
 .../activemq/artemis/tools/ImportJournal.java   |  412 -------
 .../org/apache/activemq/artemis/tools/Main.java |  127 --
 .../activemq/artemis/tools/PrintData.java       |   84 --
 .../activemq/artemis/tools/PrintPages.java      |  311 -----
 .../activemq/artemis/tools/TransferQueue.java   |  242 ----
 .../artemis/tools/XmlDataConstants.java         |  123 --
 .../activemq/artemis/tools/XmlDataExporter.java | 1122 -----------------
 .../activemq/artemis/tools/XmlDataImporter.java | 1076 -----------------
 artemis-web/pom.xml                             |    2 +-
 docs/user-manual/en/tools.md                    |  189 +--
 pom.xml                                         |   15 +-
 tests/extra-tests/pom.xml                       |    2 +-
 tests/integration-tests/pom.xml                 |    4 +-
 .../journal/NIOJournalCompactTest.java          |    3 -
 .../persistence/ExportFormatTest.java           |   17 +-
 .../persistence/XmlImportExportTest.java        |  201 ++--
 .../integration/tools/TransferMessageTest.java  |  433 -------
 tests/jms-tests/pom.xml                         |    2 +-
 tests/joram-tests/pom.xml                       |    2 +-
 tests/performance-tests/pom.xml                 |    2 +-
 tests/soak-tests/pom.xml                        |    2 +-
 tests/stress-tests/pom.xml                      |    2 +-
 .../journal/XmlImportExportStressTest.java      |   25 +-
 tests/timing-tests/pom.xml                      |    2 +-
 tests/unit-tests/pom.xml                        |    4 +-
 .../core/journal/impl/JournalImplTestBase.java  |   18 +-
 126 files changed, 6192 insertions(+), 7320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/pom.xml b/artemis-bootstrap/pom.xml
deleted file mode 100644
index 9868d6e..0000000
--- a/artemis-bootstrap/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>artemis-pom</artifactId>
-      <version>1.0.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>artemis-bootstrap</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis Bootstrap</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-server</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-server</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-dto</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.logging</groupId>
-         <artifactId>jboss-logging-processor</artifactId>
-         <scope>provided</scope>
-         <optional>true</optional>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.logging</groupId>
-         <artifactId>jboss-logging</artifactId>
-      </dependency>
-      <dependency>
-         <groupId>io.airlift</groupId>
-         <artifactId>airline</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>com.sun.winsw</groupId>
-        <artifactId>winsw</artifactId>
-        <version>1.9</version>
-        <classifier>bin</classifier>
-        <type>exe</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-amqp-protocol</artifactId>
-         <version>${project.version}</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-stomp-protocol</artifactId>
-         <version>${project.version}</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-openwire-protocol</artifactId>
-         <version>${project.version}</version>
-         <scope>test</scope>
-      </dependency>
-   </dependencies>
-
-   <build>
-     <resources>
-       <resource>
-         <directory>${project.basedir}/src/main/resources</directory>
-         <includes>
-           <include>**/*</include>
-         </includes>
-       </resource>
-       <resource>
-         <directory>${project.basedir}/src/main/filtered-resources</directory>
-         <filtering>true</filtering>
-         <includes>
-           <include>**/*</include>
-         </includes>
-       </resource>
-     </resources>
-
-     <plugins>
-       <plugin>
-         <groupId>org.apache.maven.plugins</groupId>
-         <artifactId>maven-dependency-plugin</artifactId>
-         <version>2.2</version>
-         <executions>
-           <execution>
-             <id>unpack</id>
-             <phase>process-resources</phase>
-             <goals>
-               <goal>copy</goal>
-             </goals>
-             <configuration>
-               <artifactItems>
-                 <artifactItem>
-                   <groupId>com.sun.winsw</groupId>
-                   <artifactId>winsw</artifactId>
-                   <version>1.9</version>
-                   <classifier>bin</classifier>
-                   <type>exe</type>
-                   <outputDirectory>${basedir}/target/classes/org/apache/activemq/cli/commands/bin</outputDirectory>
-                   <destFileName>activemq-service.exe</destFileName>
-                 </artifactItem>
-               </artifactItems>
-             </configuration>
-           </execution>
-         </executions>
-       </plugin>
-     </plugins>
-   </build>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/filtered-resources/org/apache/activemq/artemis/cli/banner.txt
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/filtered-resources/org/apache/activemq/artemis/cli/banner.txt b/artemis-bootstrap/src/main/filtered-resources/org/apache/activemq/artemis/cli/banner.txt
deleted file mode 100644
index 7b6aade..0000000
--- a/artemis-bootstrap/src/main/filtered-resources/org/apache/activemq/artemis/cli/banner.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-     _        _               _
-    / \  ____| |_  ___ __  __(_) _____
-   / _ \|  _ \ __|/ _ \  \/  | |/  __/
-  / ___ \ | \/ |_/  __/ |\/| | |\___ \
- /_/   \_\|   \__\____|_|  |_|_|/___ /
- Apache ActiveMQ Artemis ${project.version}
-
-

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/Artemis.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
deleted file mode 100644
index 1b747c5..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli;
-
-import io.airlift.command.Cli;
-import io.airlift.command.ParseArgumentsUnexpectedException;
-import org.apache.activemq.artemis.cli.commands.Action;
-import org.apache.activemq.artemis.cli.commands.ActionContext;
-import org.apache.activemq.artemis.cli.commands.Create;
-import org.apache.activemq.artemis.cli.commands.HelpAction;
-import org.apache.activemq.artemis.cli.commands.Run;
-import org.apache.activemq.artemis.cli.commands.Stop;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class Artemis
-{
-
-   public static void main(String[] args) throws Exception
-   {
-      String instance = System.getProperty("artemis.instance");
-      Cli.CliBuilder<Action> builder = Cli.<Action>builder("artemis")
-         .withDescription("ActiveMQ Artemis Command Line")
-         .withCommand(HelpAction.class)
-         .withDefaultCommand(HelpAction.class);
-
-      if (instance != null)
-      {
-         builder = builder
-            .withCommand(Run.class)
-            .withCommand(Stop.class);
-      }
-      else
-      {
-         builder = builder
-            .withCommand(Create.class);
-      }
-
-
-      Cli<Action> parser = builder.build();
-      try
-      {
-         parser.parse(args).execute(ActionContext.system());
-      }
-      catch (ParseArgumentsUnexpectedException e)
-      {
-         System.err.println(e.getMessage());
-         System.out.println();
-         parser.parse("help").execute(ActionContext.system());
-      }
-      catch (ConfigurationException configException)
-      {
-         System.err.println(configException.getMessage());
-         System.out.println();
-         System.out.println("Configuration should be specified as 'scheme:location'. Default configuration is 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'");
-      }
-
-   }
-
-   public static void printBanner() throws Exception
-   {
-      copy(Artemis.class.getResourceAsStream("banner.txt"), System.out);
-   }
-
-   private static long copy(InputStream in, OutputStream out) throws Exception
-   {
-      byte[] buffer = new byte[1024];
-      int len = in.read(buffer);
-      while (len != -1)
-      {
-         out.write(buffer, 0, len);
-         len = in.read(buffer);
-      }
-      return len;
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/ConfigurationException.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/ConfigurationException.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/ConfigurationException.java
deleted file mode 100644
index 2e8f9d9..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/ConfigurationException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli;
-
-public class ConfigurationException extends Exception
-{
-   public ConfigurationException(String message)
-   {
-      super(message);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Action.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Action.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Action.java
deleted file mode 100644
index f2f0426..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Action.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli.commands;
-
-public interface Action
-{
-
-   Object execute(ActionContext context) throws Exception;
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/ActionContext.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/ActionContext.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/ActionContext.java
deleted file mode 100644
index a7ac12a..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/ActionContext.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli.commands;
-
-import java.io.InputStream;
-import java.io.PrintStream;
-
-public class ActionContext
-{
-
-   public ActionContext(InputStream in, PrintStream out, PrintStream err)
-   {
-      this.in = in;
-      this.out = out;
-      this.err = err;
-   }
-
-   InputStream in;
-   PrintStream out;
-   PrintStream err;
-
-   public static ActionContext system()
-   {
-      return new ActionContext(System.in, System.out, System.err);
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
deleted file mode 100644
index be1d03a..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ /dev/null
@@ -1,368 +0,0 @@
-package org.apache.activemq.artemis.cli.commands;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.file.Files;
-import java.nio.file.attribute.PosixFilePermission;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import io.airlift.command.Arguments;
-import io.airlift.command.Command;
-import io.airlift.command.Option;
-
-import static java.nio.file.attribute.PosixFilePermission.GROUP_EXECUTE;
-import static java.nio.file.attribute.PosixFilePermission.GROUP_READ;
-import static java.nio.file.attribute.PosixFilePermission.GROUP_WRITE;
-import static java.nio.file.attribute.PosixFilePermission.OTHERS_EXECUTE;
-import static java.nio.file.attribute.PosixFilePermission.OTHERS_READ;
-import static java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE;
-import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
-import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
-
-/**
- * CLI action that creates a broker instance directory.
- */
-@Command(name = "create", description = "creates a new broker instance")
-public class Create implements Action
-{
-   @Arguments(description = "The instance directory to hold the broker's configuration and data", required = true)
-   File directory;
-
-   @Option(name = "--host", description = "The host name of the broker")
-   String host;
-
-   @Option(name = "--force", description = "Overwrite configuration at destination directory")
-   boolean force;
-
-   @Option(name = "--home", description = "Directory where ActiveMQ Artemis is installed")
-   File home;
-
-   @Option(name = "--with-ssl", description = "Generate an SSL enabled configuration")
-   boolean with_ssl = true;
-
-   @Option(name = "--clustered", description = "Enable clustering")
-   boolean clustered = false;
-
-   @Option(name = "--replicated", description = "Enable broker replication")
-   boolean replicated = false;
-
-   @Option(name = "--shared-store", description = "Enable broker shared store")
-   boolean sharedStore = false;
-
-   @Option(name = "--encoding", description = "The encoding that text files should use")
-   String encoding = "UTF-8";
-
-   ActionContext context;
-   boolean IS_WINDOWS;
-   boolean IS_CYGWIN;
-
-   @Override
-   public Object execute(ActionContext context) throws Exception
-   {
-      try
-      {
-         return run(context);
-      }
-      catch (Throwable e)
-      {
-         e.printStackTrace(context.err);
-         return e;
-      }
-   }
-
-   public Object run(ActionContext context) throws Exception
-   {
-      this.context = context;
-      IS_WINDOWS = System.getProperty("os.name").toLowerCase().trim().startsWith("win");
-      IS_CYGWIN = IS_WINDOWS && System.getenv("OSTYPE") == "cygwin";
-
-      if (clustered & sharedStore)
-      {
-
-      }
-
-      context.out.println(String.format("Creating ActiveMQ Artemis instance at: %s", directory.getCanonicalPath()));
-      if (host == null)
-      {
-         host = directory.getName();
-      }
-
-      HashMap<String, String> filters = new HashMap<String, String>();
-      String replicatedSettings = "";
-      if (replicated)
-      {
-         clustered = true;
-         replicatedSettings = readTextFile("etc/replicated-settings.txt");
-      }
-      filters.put("${replicated.settings}", replicatedSettings);
-
-      String sharedStoreSettings = "";
-      if (sharedStore)
-      {
-         clustered = true;
-         sharedStoreSettings = readTextFile("etc/shared-store-settings.txt");
-      }
-      filters.put("${hared-store.settings}", sharedStoreSettings);
-
-      String clusterSettings = "";
-      if (clustered)
-      {
-         clusterSettings = readTextFile("etc/cluster-settings.txt");
-      }
-      filters.put("${cluster.settings}", clusterSettings);
-
-
-      filters.put("${user}", System.getProperty("user.name", ""));
-      filters.put("${host}", host);
-      if (home != null)
-      {
-         filters.put("${home}", path(home, false));
-      }
-      filters.put("${artemis.home}", path(System.getProperty("artemis.home"), false));
-      filters.put("${artemis.instance}", path(directory, false));
-      filters.put("${java.home}", path(System.getProperty("java.home"), false));
-
-      new File(directory, "bin").mkdirs();
-      new File(directory, "etc").mkdirs();
-      new File(directory, "log").mkdirs();
-      new File(directory, "tmp").mkdirs();
-      new File(directory, "data").mkdirs();
-
-
-      if (IS_WINDOWS)
-      {
-         write("bin/artemis.cmd", null, false);
-         write("bin/artemis-service.exe");
-         write("bin/artemis-service.xml", filters, false);
-         write("etc/artemis.profile.cmd", filters, false);
-      }
-
-      if (!IS_WINDOWS || IS_CYGWIN)
-      {
-         write("bin/artemis", null, true);
-         makeExec("bin/artemis");
-         write("bin/artemis-service", null, true);
-         makeExec("bin/artemis-service");
-         write("etc/artemis.profile", filters, true);
-         makeExec("etc/artemis.profile");
-      }
-
-      write("etc/logging.properties", null, false);
-      write("etc/bootstrap.xml", null, false);
-      write("etc/broker.xml", filters, false);
-      write("etc/artemis-roles.properties", null, false);
-      write("etc/artemis-users.properties", null, false);
-
-      context.out.println("");
-      context.out.println("You can now start the broker by executing:  ");
-      context.out.println("");
-      context.out.println(String.format("   \"%s\" run", path(new File(directory, "bin/artemis"), true)));
-
-      File service = new File(directory, "bin/artemis-service");
-      context.out.println("");
-
-      if (!IS_WINDOWS || IS_CYGWIN)
-      {
-
-         // Does it look like we are on a System V init system?
-         if (new File("/etc/init.d/").isDirectory())
-         {
-            context.out.println("Or you can setup the broker as system service and run it in the background:");
-            context.out.println("");
-            context.out.println("   sudo ln -s \"%s\" /etc/init.d/".format(service.getCanonicalPath()));
-            context.out.println("   /etc/init.d/artemis-service start");
-            context.out.println("");
-
-         }
-         else
-         {
-
-            context.out.println("Or you can run the broker in the background using:");
-            context.out.println("");
-            context.out.println(String.format("   \"%s\" start", path(service, true)));
-            context.out.println("");
-         }
-
-      }
-      if (IS_WINDOWS)
-      {
-
-         context.out.println("Or you can setup the broker as Windows service and run it in the background:");
-         context.out.println("");
-         context.out.println(String.format("   \"%s\" install", path(service, true)));
-         context.out.println(String.format("   \"%s\" start", path(service, true)));
-         context.out.println("");
-
-      }
-
-      return null;
-   }
-
-   private void makeExec(String path) throws IOException
-   {
-      try
-      {
-         File file = new File(directory, path);
-         Files.setPosixFilePermissions(file.toPath(), new HashSet<PosixFilePermission>(Arrays.asList(
-            OWNER_READ, OWNER_WRITE, OWNER_EXECUTE,
-            GROUP_READ, GROUP_WRITE, GROUP_EXECUTE,
-            OTHERS_READ, OTHERS_EXECUTE
-         )));
-      }
-      catch (Throwable ignore)
-      {
-         // Our best effort was not good enough :)
-      }
-   }
-
-   String path(String value, boolean unixPaths) throws IOException
-   {
-      return path(new File(value), unixPaths);
-   }
-
-   private String path(File value, boolean unixPaths) throws IOException
-   {
-      if (unixPaths && IS_CYGWIN)
-      {
-//        import scala.sys.process._
-//        Seq("cygpath", value.getCanonicalPath).!!.trim
-         return value.getCanonicalPath();
-      }
-      else
-      {
-         return value.getCanonicalPath();
-      }
-   }
-
-   private void write(String source, HashMap<String, String> filters, boolean unixTarget) throws IOException
-   {
-      write(source, new File(directory, source), filters, unixTarget);
-   }
-
-   private void write(String source, File target, HashMap<String, String> filters, boolean unixTarget) throws IOException
-   {
-      if (target.exists() && !force)
-      {
-         throw new RuntimeException(String.format("The file '%s' already exists.  Use --force to overwrite.", target));
-      }
-
-      String content = readTextFile(source);
-
-      if (filters != null)
-      {
-         for (Map.Entry<String, String> entry : filters.entrySet())
-         {
-            content = replace(content, entry.getKey(), entry.getValue());
-         }
-      }
-
-      // and then writing out in the new target encoding..  Let's also replace \n with the values
-      // that is correct for the current platform.
-      String separator = unixTarget && IS_CYGWIN ? "\n" : System.getProperty("line.separator");
-      content = content.replaceAll("\\r?\\n", Matcher.quoteReplacement(separator));
-      ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes(encoding));
-
-      try (FileOutputStream fout = new FileOutputStream(target))
-      {
-         copy(in, fout);
-      }
-   }
-
-   private String readTextFile(String source) throws IOException
-   {
-      ByteArrayOutputStream out = new ByteArrayOutputStream();
-      try (InputStream in = this.getClass().getResourceAsStream(source))
-      {
-         copy(in, out);
-      }
-      return new String(out.toByteArray(), "UTF-8");
-   }
-
-   private void write(String source) throws IOException
-   {
-      File target = new File(directory, source);
-      if (target.exists() && !force)
-      {
-         throw new RuntimeException(String.format("The file '%s' already exists.  Use --force to overwrite.", target));
-      }
-      try (FileOutputStream fout = new FileOutputStream(target))
-      {
-         try (InputStream in = this.getClass().getResourceAsStream(source))
-         {
-            copy(in, fout);
-         }
-      }
-   }
-
-   private boolean canLoad(String name)
-   {
-      try
-      {
-         this.getClass().getClassLoader().loadClass(name);
-         return true;
-      }
-      catch (Throwable e)
-      {
-         return false;
-      }
-   }
-
-   private String replace(String content, String key, String value)
-   {
-      return content.replaceAll(Pattern.quote(key), Matcher.quoteReplacement(value));
-   }
-
-   private int system(File wd, String... command) throws IOException, InterruptedException
-   {
-      Process process = Runtime.getRuntime().exec(command, null, wd);
-      process.getOutputStream().close();
-      drain(command[0], process.getInputStream(), context.out);
-      drain(command[0], process.getErrorStream(), context.err);
-      process.waitFor();
-      return process.exitValue();
-   }
-
-   private void drain(String threadName, final InputStream is, final OutputStream os)
-   {
-      new Thread(threadName)
-      {
-         {
-            setDaemon(true);
-         }
-
-         @Override
-         public void run()
-         {
-            try
-            {
-               copy(is, os);
-            }
-            catch (Throwable e)
-            {
-            }
-         }
-      }.start();
-   }
-
-   private void copy(InputStream is, OutputStream os) throws IOException
-   {
-      byte[] buffer = new byte[1024 * 4];
-      int c = is.read(buffer);
-      while (c >= 0)
-      {
-         os.write(buffer, 0, c);
-         c = is.read(buffer);
-      }
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/HelpAction.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/HelpAction.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/HelpAction.java
deleted file mode 100644
index a5d467c..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/HelpAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli.commands;
-
-import io.airlift.command.Help;
-
-public class HelpAction extends Help implements Action
-{
-
-   @Override
-   public Object execute(ActionContext context) throws Exception
-   {
-      super.run();
-      return null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
deleted file mode 100644
index 360ed3b..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli.commands;
-
-import io.airlift.command.Arguments;
-import io.airlift.command.Command;
-
-import org.apache.activemq.artemis.cli.Artemis;
-import org.apache.activemq.artemis.components.ExternalComponent;
-import org.apache.activemq.artemis.core.server.ActiveMQComponent;
-import org.apache.activemq.artemis.dto.BrokerDTO;
-import org.apache.activemq.artemis.dto.ComponentDTO;
-import org.apache.activemq.artemis.factory.BrokerFactory;
-import org.apache.activemq.artemis.factory.SecurityManagerFactory;
-import org.apache.activemq.artemis.integration.Broker;
-import org.apache.activemq.artemis.integration.bootstrap.ActiveMQBootstrapLogger;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Timer;
-import java.util.TimerTask;
-
-@Command(name = "run", description = "runs the broker instance")
-public class Run implements Action
-{
-
-   @Arguments(description = "Broker Configuration URI, default 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'")
-   String configuration;
-   private ArrayList<ActiveMQComponent> components = new ArrayList<>();
-
-   private Broker server;
-
-   static String fixupFileURI(String value)
-   {
-      if (value != null && value.startsWith("file:"))
-      {
-         value = value.substring("file:".length());
-         value = new File(value).toURI().toString();
-      }
-      return value;
-   }
-
-   @Override
-   public Object execute(ActionContext context) throws Exception
-   {
-
-      Artemis.printBanner();
-
-      /* We use File URI for locating files.  The ARTEMIS_HOME variable is used to determine file paths.  For Windows
-      the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator).  For this
-      reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
-      String activemqInstance = System.getProperty("artemis.instance").replace("\\", "/");
-      System.setProperty("artemis.instance", activemqInstance);
-
-      if (configuration == null)
-      {
-         File xmlFile = new File(new File(new File(activemqInstance), "etc"), "bootstrap.xml");
-         configuration = "xml:" + xmlFile.toURI().toString().substring("file:".length());
-      }
-
-      // To support Windows paths as explained above.
-      System.out.println("Loading configuration file: " + configuration);
-
-      BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
-
-      String fileName = new URI(fixupFileURI(broker.server.configuration)).getSchemeSpecificPart();
-
-      addShutdownHook(new File(fileName).getParentFile());
-
-      ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);
-
-      server = BrokerFactory.createServer(broker.server, security);
-
-      server.start();
-
-      if (broker.web != null)
-      {
-         broker.components.add(broker.web);
-      }
-
-      for (ComponentDTO componentDTO : broker.components)
-      {
-         Class clazz = this.getClass().getClassLoader().loadClass(componentDTO.componentClassName);
-         ExternalComponent component = (ExternalComponent)clazz.newInstance();
-         component.configure(componentDTO, activemqInstance);
-         component.start();
-         components.add(component);
-      }
-
-      return null;
-   }
-
-   /**
-    * Add a simple shutdown hook to stop the server.
-    * @param configurationDir
-    */
-   private void addShutdownHook(File configurationDir)
-   {
-      final File file = new File(configurationDir,"STOP_ME");
-      if (file.exists())
-      {
-         if (!file.delete())
-         {
-            ActiveMQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath());
-         }
-      }
-      final Timer timer = new Timer("ActiveMQ Artemis Server Shutdown Timer", true);
-      timer.scheduleAtFixedRate(new TimerTask()
-      {
-         @Override
-         public void run()
-         {
-            if (file.exists())
-            {
-               try
-               {
-                  try
-                  {
-                     //TODO stop components
-                     server.stop();
-                  }
-                  catch (Exception e)
-                  {
-                     e.printStackTrace();
-                  }
-                  timer.cancel();
-               }
-               finally
-               {
-                  Runtime.getRuntime().exit(0);
-               }
-            }
-         }
-      }, 500, 500);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
deleted file mode 100644
index 90cddb3..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.cli.commands;
-
-import io.airlift.command.Arguments;
-import io.airlift.command.Command;
-import org.apache.activemq.artemis.dto.BrokerDTO;
-import org.apache.activemq.artemis.factory.BrokerFactory;
-
-import java.io.File;
-import java.net.URI;
-
-@Command(name = "stop", description = "stops the broker instance")
-public class Stop implements Action
-{
-   @Arguments(description = "Broker Configuration URI, default 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'")
-   String configuration;
-
-   @Override
-   public Object execute(ActionContext context) throws Exception
-   {
-      /* We use File URI for locating files.  The ARTEMIS_HOME variable is used to determine file paths.  For Windows
-      the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator).  For this
-      reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
-      String activemqHome = System.getProperty("artemis.instance").replace("\\", "/");
-      System.setProperty("artemis.instance", activemqHome);
-
-      if (configuration == null)
-      {
-         configuration = "xml:" + activemqHome + "/etc/bootstrap.xml";
-      }
-
-      // To support Windows paths as explained above.
-      configuration = configuration.replace("\\", "/");
-
-      BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
-
-      String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();
-
-      File file = new File(fileName).getParentFile();
-
-      File stopFile = new File(file, "STOP_ME");
-
-      stopFile.createNewFile();
-
-      return null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/components/ExternalComponent.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/components/ExternalComponent.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/components/ExternalComponent.java
deleted file mode 100644
index 9317c1b..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/components/ExternalComponent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.components;
-
-import org.apache.activemq.artemis.core.server.ActiveMQComponent;
-import org.apache.activemq.artemis.dto.ComponentDTO;
-
-public interface ExternalComponent extends ActiveMQComponent
-{
-   void configure(ComponentDTO config, String activemqHome) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BasicSecurityHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BasicSecurityHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BasicSecurityHandler.java
deleted file mode 100644
index adb0850..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BasicSecurityHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import java.io.File;
-
-import org.apache.activemq.artemis.core.config.impl.FileSecurityConfiguration;
-import org.apache.activemq.artemis.dto.BasicSecurityDTO;
-import org.apache.activemq.artemis.dto.SecurityDTO;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
-
-public class BasicSecurityHandler implements SecurityHandler
-{
-
-
-   static String fixupFileURI(String value)
-   {
-      if (value != null && value.startsWith("file:"))
-      {
-         value = value.substring("file:".length());
-         value = new File(value).toURI().toString();
-      }
-      return value;
-   }
-
-   @Override
-   public ActiveMQSecurityManager createSecurityManager(SecurityDTO security) throws Exception
-   {
-      BasicSecurityDTO fileSecurity = (BasicSecurityDTO) security;
-      String home = System.getProperty("activemq.home");
-      FileSecurityConfiguration securityConfiguration = new FileSecurityConfiguration(fixupFileURI(fileSecurity.users),
-                                                                                      fixupFileURI(fileSecurity.roles),
-                                                                                      fileSecurity.defaultUser,
-                                                                                      fileSecurity.maskPassword,
-                                                                                      fileSecurity.passwordCodec);
-      securityConfiguration.start();
-      return new ActiveMQSecurityManagerImpl(securityConfiguration);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactory.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactory.java
deleted file mode 100644
index 06ad977..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactory.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.cli.ConfigurationException;
-import org.apache.activemq.artemis.dto.BrokerDTO;
-import org.apache.activemq.artemis.dto.ServerDTO;
-import org.apache.activemq.artemis.integration.Broker;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-import org.apache.activemq.artemis.utils.FactoryFinder;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-public class BrokerFactory
-{
-
-   public static BrokerDTO createBrokerConfiguration(URI configURI) throws Exception
-   {
-      if (configURI.getScheme() == null)
-      {
-         throw new ConfigurationException("Invalid configuration URI, no scheme specified: " + configURI);
-      }
-
-      BrokerFactoryHandler factory = null;
-      try
-      {
-         FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/artemis/broker/");
-         factory = (BrokerFactoryHandler) finder.newInstance(configURI.getScheme());
-      }
-      catch (IOException ioe)
-      {
-         throw new ConfigurationException("Invalid configuration URI, can't find configuration scheme: " + configURI.getScheme());
-      }
-
-
-      return factory.createBroker(configURI);
-   }
-
-   public static BrokerDTO createBrokerConfiguration(String configuration) throws Exception
-   {
-      return createBrokerConfiguration(new URI(configuration));
-   }
-
-   static String fixupFileURI(String value)
-   {
-      if (value != null && value.startsWith("file:"))
-      {
-         value = value.substring("file:".length());
-         value = new File(value).toURI().toString();
-      }
-      return value;
-   }
-
-   public static Broker createServer(ServerDTO brokerDTO, ActiveMQSecurityManager security) throws Exception
-   {
-      if (brokerDTO.configuration != null)
-      {
-         BrokerHandler handler;
-         URI configURI = new URI(fixupFileURI(brokerDTO.configuration));
-
-         try
-         {
-            FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/artemis/broker/server/");
-            handler = (BrokerHandler) finder.newInstance(configURI.getScheme());
-         }
-         catch (IOException ioe)
-         {
-            throw new ConfigurationException("Invalid configuration URI, can't find configuration scheme: " + configURI.getScheme());
-         }
-
-         return handler.createServer(brokerDTO, security);
-      }
-      return null;
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactoryHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactoryHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactoryHandler.java
deleted file mode 100644
index 5ac0d73..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerFactoryHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.dto.BrokerDTO;
-
-import java.net.URI;
-
-public interface BrokerFactoryHandler
-{
-   BrokerDTO createBroker(URI brokerURI) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerHandler.java
deleted file mode 100644
index bd51f39..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/BrokerHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.dto.ServerDTO;
-import org.apache.activemq.artemis.integration.Broker;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-
-public interface BrokerHandler
-{
-   Broker createServer(ServerDTO brokerDTO, ActiveMQSecurityManager security);
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/FileBrokerHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/FileBrokerHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/FileBrokerHandler.java
deleted file mode 100644
index ce0590f..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/FileBrokerHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.dto.ServerDTO;
-import org.apache.activemq.artemis.integration.Broker;
-import org.apache.activemq.artemis.integration.FileBroker;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-
-public class FileBrokerHandler implements BrokerHandler
-{
-   @Override
-   public Broker createServer(ServerDTO brokerDTO, ActiveMQSecurityManager security)
-   {
-      return new FileBroker(brokerDTO, security);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityHandler.java
deleted file mode 100644
index d157d7b..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.dto.SecurityDTO;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-
-public interface SecurityHandler
-{
-   ActiveMQSecurityManager createSecurityManager(SecurityDTO securityDTO) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityManagerFactory.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityManagerFactory.java
deleted file mode 100644
index d7fd588..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/SecurityManagerFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.dto.SecurityDTO;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-import org.apache.activemq.artemis.utils.FactoryFinder;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-public class SecurityManagerFactory
-{
-
-   public static ActiveMQSecurityManager create(SecurityDTO config) throws Exception
-   {
-      if (config != null)
-      {
-         FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/artemis/broker/security/");
-         SecurityHandler securityHandler = (SecurityHandler)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name());
-         return securityHandler.createSecurityManager(config);
-      }
-      else
-      {
-         throw new Exception("No security manager configured!");
-      }
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/XmlBrokerFactoryHandler.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/XmlBrokerFactoryHandler.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/XmlBrokerFactoryHandler.java
deleted file mode 100644
index d600f79..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/factory/XmlBrokerFactoryHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.factory;
-
-import org.apache.activemq.artemis.cli.ConfigurationException;
-import org.apache.activemq.artemis.dto.BrokerDTO;
-import org.apache.activemq.artemis.dto.XmlUtil;
-
-import java.io.File;
-import java.net.URI;
-
-public class XmlBrokerFactoryHandler implements BrokerFactoryHandler
-{
-   @Override
-   public BrokerDTO createBroker(URI brokerURI) throws Exception
-   {
-      File file = new File(brokerURI.getSchemeSpecificPart());
-      if (!file.exists())
-      {
-         throw new ConfigurationException("Invalid configuration URI, can't find file: " + file.getName());
-      }
-      return XmlUtil.decode(BrokerDTO.class, file);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/Broker.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/Broker.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/Broker.java
deleted file mode 100644
index 8fb5794..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/Broker.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.integration;
-
-import org.apache.activemq.artemis.core.server.ActiveMQComponent;
-
-/**
- * A Broker os a set of ActiveMQComponents that create a Server, for instance core and jms.
- */
-public interface Broker extends ActiveMQComponent
-{
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
deleted file mode 100644
index 4bf2df2..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.integration;
-
-import org.apache.activemq.artemis.core.config.FileDeploymentManager;
-import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
-import org.apache.activemq.artemis.core.server.ActiveMQComponent;
-import org.apache.activemq.artemis.dto.ServerDTO;
-import org.apache.activemq.artemis.integration.bootstrap.ActiveMQBootstrapLogger;
-import org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.Map;
-
-public class FileBroker implements Broker
-{
-   private final String configurationUrl;
-
-   private boolean started;
-
-   private final ActiveMQSecurityManager securityManager;
-
-   private Map<String, ActiveMQComponent> components;
-
-   public FileBroker(ServerDTO broker, ActiveMQSecurityManager security)
-   {
-      this.securityManager = security;
-      this.configurationUrl = broker.configuration;
-   }
-
-
-   public synchronized void start() throws Exception
-   {
-      if (started)
-      {
-         return;
-      }
-
-      //todo if we start to pullout more configs from the main config then we should pull out the configuration objects from factories if available
-      FileConfiguration configuration = new FileConfiguration();
-      FileJMSConfiguration jmsConfiguration = new FileJMSConfiguration();
-
-      FileDeploymentManager fileDeploymentManager = new FileDeploymentManager(configurationUrl);
-      fileDeploymentManager.addDeployable(configuration).addDeployable(jmsConfiguration);
-      fileDeploymentManager.readConfiguration();
-
-      components = fileDeploymentManager.buildService(securityManager, ManagementFactory.getPlatformMBeanServer());
-
-      ArrayList<ActiveMQComponent> componentsByStartOrder = getComponentsByStartOrder(components);
-      ActiveMQBootstrapLogger.LOGGER.serverStarting();
-      for (ActiveMQComponent component : componentsByStartOrder)
-      {
-         component.start();
-      }
-      started = true;
-
-
-   }
-
-   @Override
-   public void stop() throws Exception
-   {
-      if (!started)
-      {
-         return;
-      }
-      ActiveMQComponent[] mqComponents = new ActiveMQComponent[components.size()];
-      components.values().toArray(mqComponents);
-      for (int i = mqComponents.length - 1; i >= 0; i--)
-      {
-         mqComponents[i].stop();
-      }
-      started = false;
-   }
-
-   @Override
-   public boolean isStarted()
-   {
-      return started;
-   }
-
-   public Map<String, ActiveMQComponent> getComponents()
-   {
-      return components;
-   }
-
-   /*
-   * this makes sure the components are started in the correct order. Its simple at the mo as e only have core and jms but
-   * will need impproving if we get more.
-   * */
-   public ArrayList<ActiveMQComponent> getComponentsByStartOrder(Map<String, ActiveMQComponent> components)
-   {
-      ArrayList<ActiveMQComponent> activeMQComponents = new ArrayList<ActiveMQComponent>();
-      ActiveMQComponent jmsComponent = components.get("jms");
-      if (jmsComponent != null)
-      {
-         activeMQComponents.add(jmsComponent);
-      }
-      activeMQComponents.add(components.get("core"));
-      return activeMQComponents;
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapBundle.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapBundle.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapBundle.java
deleted file mode 100644
index 4254e8a..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapBundle.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.integration.bootstrap;
-
-
-import org.jboss.logging.annotations.MessageBundle;
-
-/**
- * Logger Code 10
- *
- * each message id must be 6 digits long starting with 10, the 3rd digit should be 9
- *
- * so 109000 to 109999
- */
-@MessageBundle(projectCode = "AMQ")
-public class ActiveMQBootstrapBundle
-{
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java b/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
deleted file mode 100644
index c1bea17..0000000
--- a/artemis-bootstrap/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.integration.bootstrap;
-
-import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Logger;
-import org.jboss.logging.annotations.Cause;
-import org.jboss.logging.annotations.LogMessage;
-import org.jboss.logging.annotations.Message;
-import org.jboss.logging.annotations.MessageLogger;
-
-/**
- * Logger Code 10
- *
- * each message id must be 6 digits long starting with 10, the 3rd digit donates the level so
- *
- * INF0  1
- * WARN  2
- * DEBUG 3
- * ERROR 4
- * TRACE 5
- * FATAL 6
- *
- * so an INFO message would be 101000 to 101999
- */
-@MessageLogger(projectCode = "AMQ")
-public interface ActiveMQBootstrapLogger extends BasicLogger
-{
-   /**
-    * The default logger.
-    */
-   ActiveMQBootstrapLogger LOGGER = Logger.getMessageLogger(ActiveMQBootstrapLogger.class, ActiveMQBootstrapLogger.class.getPackage().getName());
-
-   @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 101000, value = "Starting ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT)
-   void serverStarting();
-
-   @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 101001, value = "Stopping ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT)
-   void serverStopping();
-
-   @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 101002, value = "Starting Naming server on {0}:{1,number,#} (rmi {2}:{3,number,#})", format = Message.Format.MESSAGE_FORMAT)
-   void startedNamingService(String bindAddress, int port, String rmiBindAddress, int rmiPort);
-
-   @LogMessage(level = Logger.Level.WARN)
-   @Message(id = 102000, value = "Error during undeployment: {0}", format = Message.Format.MESSAGE_FORMAT)
-   void errorDuringUndeployment(@Cause Throwable t, String name);
-
-   @LogMessage(level = Logger.Level.ERROR)
-   @Message(id = 104000, value = "Failed to delete file {0}", format = Message.Format.MESSAGE_FORMAT)
-   void errorDeletingFile(String name);
-
-   @LogMessage(level = Logger.Level.ERROR)
-   @Message(id = 104001, value = "Failed to start server", format = Message.Format.MESSAGE_FORMAT)
-   void errorStartingServer(@Cause Exception e);
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/security/basic-security
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/security/basic-security b/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/security/basic-security
deleted file mode 100644
index 8418fe9..0000000
--- a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/security/basic-security
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-class=org.apache.activemq.artemis.factory.BasicSecurityHandler

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/server/file
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/server/file b/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/server/file
deleted file mode 100644
index 26ec4fb..0000000
--- a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/server/file
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-class=org.apache.activemq.artemis.factory.FileBrokerHandler

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/xml
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/xml b/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/xml
deleted file mode 100644
index 28251ef..0000000
--- a/artemis-bootstrap/src/main/resources/META-INF/services/org/apache/activemq/artemis/broker/xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-class=org.apache.activemq.artemis.factory.XmlBrokerFactoryHandler

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ea3370b3/artemis-bootstrap/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
----------------------------------------------------------------------
diff --git a/artemis-bootstrap/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis b/artemis-bootstrap/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
deleted file mode 100755
index c5e973e..0000000
--- a/artemis-bootstrap/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-if [ -z "$ARTEMIS_INSTANCE" ] ; then
-
-  ## resolve links - $0 may be a link to ActiveMQ's home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ARTEMIS_INSTANCE=`dirname "$PRG"`
-  cd "$saveddir"
-
-  # make it fully qualified
-  ARTEMIS_INSTANCE=`cd "$ARTEMIS_INSTANCE/.." && pwd`
-fi
-
-# Set Defaults Properties
-ARTEMIS_LOGGING_CONF="file:$ARTEMIS_INSTANCE/etc/logging.properties"
-ARTEMIS_DATA_DIR="$ARTEMIS_INSTANCE/data"
-ARTEMIS_LOG_MANAGER=org.jboss.logmanager.LogManager
-JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M"
-
-# Load Profile Data
-. "$ARTEMIS_INSTANCE/etc/artemis.profile"
-
-CLASSPATH="$ARTEMIS_HOME/lib/artemis-boot.jar"
-
-# OS specific support.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true
-    OSTYPE=cygwin
-    export OSTYPE
-    ;;
-  Darwin*) darwin=true
-    if [ -z "$JAVA_HOME" ] ; then
-     JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-    fi
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ARTEMIS_INSTANCE" ] &&
-    ARTEMIS_INSTANCE=`cygpath --unix "$ARTEMIS_INSTANCE"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-if $cygwin ; then
-  JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
-  ARTEMIS_HOME=`cygpath --windows "$ARTEMIS_HOME"`
-  CLASSPATH=`cygpath --windows "$CLASSPATH"`
-fi
-
-exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
-    -classpath "$CLASSPATH" \
-    -Dartemis.home="$ARTEMIS_HOME" \
-    -Dartemis.instance="$ARTEMIS_INSTANCE" \
-    -Djava.library.path="$ARTEMIS_HOME/bin/lib/linux-i686:$ARTEMIS_HOME/bin/lib/linux-x86_64" \
-    -Djava.io.tmpdir="$ARTEMIS_INSTANCE/tmp" \
-    -Ddata.dir="$ARTEMIS_DATA_DIR" \
-    -Djava.util.logging.manager="$ARTEMIS_LOG_MANAGER" \
-    -Dlogging.configuration="$ARTEMIS_LOGGING_CONF" \
-    $DEBUG_ARGS \
-    org.apache.activemq.artemis.boot.Artemis $@