added examples to release profile

Also gave them all a profile so they wouldn't actually run during the build.

fixed some of the comilation errors in the Rest example module


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

Branch: refs/heads/master
Commit: 8db56b73b8770854b12f7993e804c507fee34f21
Parents: 3c99562
Author: Andy Taylor <[email protected]>
Authored: Sat Mar 7 16:51:01 2015 +0000
Committer: Andy Taylor <[email protected]>
Committed: Sun Mar 8 13:34:02 2015 +0000

----------------------------------------------------------------------
 distribution/activemq/pom.xml                   |   2 +-
 .../src/main/resources/examples/index.html      |   3 +-
 docs/user-manual/en/examples.md                 |   2 +-
 examples/core/perf/pom.xml                      |   3 -
 examples/core/pom.xml                           |  12 +
 examples/core/vertx-connector/pom.xml           |   6 +-
 examples/jms/README.md                          |   4 +-
 examples/jms/aerogear/pom.xml                   | 199 ++++----
 examples/jms/applet/applet.html                 |  36 --
 examples/jms/applet/pom.xml                     | 144 ------
 examples/jms/applet/readme.html                 |  40 --
 .../activemq/jms/example/AppletExample.java     | 294 -----------
 .../jms/example/HttpStaticFileServer.java       |  81 ---
 .../example/HttpStaticFileServerHandler.java    | 189 -------
 .../HttpStaticFileServerPipelineFactory.java    |  68 ---
 .../activemq/server0/activemq-configuration.xml |  61 ---
 .../activemq/server0/activemq-roles.properties  |  17 -
 .../activemq/server0/activemq-users.properties  |  17 -
 examples/jms/application-layer-failover/pom.xml | 215 ++++----
 .../jms/application-layer-failover/readme.html  |   2 +-
 examples/jms/bridge/pom.xml                     | 217 ++++----
 examples/jms/bridge/readme.html                 |   2 +-
 examples/jms/browser/pom.xml                    | 163 +++---
 examples/jms/browser/readme.html                |   2 +-
 examples/jms/client-kickoff/pom.xml             | 203 ++++----
 examples/jms/client-kickoff/readme.html         |   2 +-
 .../jms/client-side-failoverlistener/pom.xml    | 247 ++++-----
 .../client-side-failoverlistener/readme.html    |   2 +-
 examples/jms/client-side-load-balancing/pom.xml | 287 +++++------
 .../jms/client-side-load-balancing/readme.html  |   2 +-
 .../jms/clustered-durable-subscription/pom.xml  | 237 ++++-----
 .../clustered-durable-subscription/readme.html  |   2 +-
 examples/jms/clustered-grouping/pom.xml         | 313 ++++++------
 examples/jms/clustered-grouping/readme.html     |   2 +-
 examples/jms/clustered-jgroups/pom.xml          | 233 ++++-----
 examples/jms/clustered-queue/pom.xml            | 225 +++++----
 examples/jms/clustered-queue/readme.html        |   2 +-
 examples/jms/clustered-standalone/pom.xml       | 285 +++++------
 examples/jms/clustered-standalone/readme.html   |   2 +-
 examples/jms/clustered-static-discovery/pom.xml | 297 +++++------
 .../jms/clustered-static-discovery/readme.html  |   2 +-
 examples/jms/clustered-static-oneway/pom.xml    | 257 +++++-----
 .../jms/clustered-static-oneway/readme.html     |   2 +-
 examples/jms/clustered-topic/pom.xml            | 253 +++++-----
 examples/jms/clustered-topic/readme.html        |   2 +-
 .../jms/colocated-failover-scale-down/pom.xml   | 237 ++++-----
 .../colocated-failover-scale-down/readme.html   |   2 +-
 examples/jms/colocated-failover/pom.xml         | 237 ++++-----
 examples/jms/colocated-failover/readme.html     |   2 +-
 examples/jms/consumer-rate-limit/pom.xml        | 167 +++---
 examples/jms/consumer-rate-limit/readme.html    |   2 +-
 examples/jms/dead-letter/pom.xml                | 167 +++---
 examples/jms/dead-letter/readme.html            |   2 +-
 examples/jms/delayed-redelivery/pom.xml         | 163 +++---
 examples/jms/delayed-redelivery/readme.html     |   2 +-
 examples/jms/divert/pom.xml                     | 217 ++++----
 examples/jms/divert/readme.html                 |   2 +-
 examples/jms/durable-subscription/pom.xml       | 167 +++---
 examples/jms/durable-subscription/readme.html   |   2 +-
 examples/jms/embedded-simple/pom.xml            | 141 +++---
 examples/jms/embedded-simple/readme.html        |   2 +-
 examples/jms/embedded/pom.xml                   | 143 +++---
 examples/jms/embedded/readme.html               |   2 +-
 examples/jms/expiry/pom.xml                     | 167 +++---
 examples/jms/expiry/readme.html                 |   2 +-
 examples/jms/ha-policy-autobackup/pom.xml       | 237 ++++-----
 examples/jms/http-transport/pom.xml             | 167 +++---
 examples/jms/http-transport/readme.html         |   2 +-
 .../jms/instantiate-connection-factory/pom.xml  | 167 +++---
 .../instantiate-connection-factory/readme.html  |   2 +-
 examples/jms/interceptor/pom.xml                | 167 +++---
 examples/jms/interceptor/readme.html            |   2 +-
 examples/jms/jms-auto-closeable/pom.xml         | 161 +++---
 examples/jms/jms-auto-closeable/readme.html     |   2 +-
 examples/jms/jms-bridge/pom.xml                 | 217 ++++----
 examples/jms/jms-bridge/readme.html             |   2 +-
 examples/jms/jms-completion-listener/pom.xml    | 161 +++---
 .../jms/jms-completion-listener/readme.html     |   2 +-
 examples/jms/jms-context/pom.xml                | 161 +++---
 examples/jms/jms-context/readme.html            |   2 +-
 examples/jms/jms-shared-consumer/pom.xml        | 167 +++---
 examples/jms/jms-shared-consumer/readme.html    |   2 +-
 examples/jms/jmx/pom.xml                        | 197 ++++----
 examples/jms/jmx/readme.html                    |   2 +-
 examples/jms/large-message/pom.xml              | 173 +++----
 examples/jms/large-message/readme.html          |   2 +-
 examples/jms/last-value-queue/pom.xml           | 161 +++---
 examples/jms/last-value-queue/readme.html       |   2 +-
 examples/jms/management-notifications/pom.xml   | 161 +++---
 .../jms/management-notifications/readme.html    |   2 +-
 examples/jms/management/pom.xml                 | 161 +++---
 examples/jms/management/readme.html             |   2 +-
 examples/jms/message-counters/pom.xml           | 197 ++++----
 examples/jms/message-counters/readme.html       |   2 +-
 examples/jms/message-group/pom.xml              | 161 +++---
 examples/jms/message-group/readme.html          |   2 +-
 examples/jms/message-group2/pom.xml             | 161 +++---
 examples/jms/message-group2/readme.html         |   2 +-
 examples/jms/message-priority/pom.xml           | 161 +++---
 examples/jms/message-priority/readme.html       |   2 +-
 examples/jms/multiple-failover-failback/pom.xml | 303 +++++------
 examples/jms/multiple-failover/pom.xml          | 303 +++++------
 examples/jms/no-consumer-buffering/pom.xml      | 161 +++---
 examples/jms/no-consumer-buffering/readme.html  |   2 +-
 examples/jms/non-transaction-failover/pom.xml   | 245 ++++-----
 .../jms/non-transaction-failover/readme.html    |   2 +-
 examples/jms/openwire/pom.xml                   | 175 +++----
 examples/jms/openwire/readme.html               |   2 +-
 examples/jms/paging/pom.xml                     | 161 +++---
 examples/jms/paging/readme.html                 |   2 +-
 examples/jms/perf/pom.xml                       |  10 +-
 examples/jms/perf/readme.html                   |   2 +-
 examples/jms/pom.xml                            | 103 +++-
 examples/jms/pre-acknowledge/pom.xml            | 167 +++---
 examples/jms/pre-acknowledge/readme.html        |   2 +-
 examples/jms/producer-rate-limit/pom.xml        | 161 +++---
 examples/jms/producer-rate-limit/readme.html    |   2 +-
 examples/jms/proton-cpp/pom.xml                 |   5 +-
 examples/jms/proton-cpp/readme.html             |   4 +-
 examples/jms/proton-j/pom.xml                   | 177 +++----
 examples/jms/proton-j/readme.html               |   2 +-
 examples/jms/proton-ruby/pom.xml                | 143 +++---
 examples/jms/proton-ruby/readme.html            |   2 +-
 .../jms/queue-message-redistribution/pom.xml    | 253 +++++-----
 .../queue-message-redistribution/readme.html    |   2 +-
 examples/jms/queue-requestor/pom.xml            | 161 +++---
 examples/jms/queue-requestor/readme.html        |   2 +-
 examples/jms/queue-selector/pom.xml             | 161 +++---
 examples/jms/queue-selector/readme.html         |   2 +-
 examples/jms/queue/pom.xml                      | 163 +++---
 examples/jms/queue/readme.html                  |   2 +-
 examples/jms/reattach-node/pom.xml              | 171 ++++---
 examples/jms/reattach-node/readme.html          |   2 +-
 examples/jms/replicated-failback-static/pom.xml | 245 ++++-----
 .../jms/replicated-failback-static/readme.html  |   2 +-
 examples/jms/replicated-failback/pom.xml        | 245 ++++-----
 examples/jms/replicated-failback/readme.html    |   2 +-
 .../jms/replicated-multiple-failover/pom.xml    | 303 +++++------
 .../replicated-multiple-failover/readme.html    |   2 +-
 .../jms/replicated-transaction-failover/pom.xml | 245 ++++-----
 .../replicated-transaction-failover/readme.html |   2 +-
 examples/jms/request-reply/pom.xml              | 161 +++---
 examples/jms/request-reply/readme.html          |   2 +-
 examples/jms/rest/dup-send/pom.xml              | 150 +++---
 examples/jms/rest/javascript-chat/pom.xml       | 178 +++----
 .../messaging/test/AutoAckTopicTest.java        |   3 +-
 examples/jms/rest/jms-to-rest/pom.xml           | 150 +++---
 .../jms-to-rest/src/main/java/JmsHelper.java    |   6 +-
 examples/jms/rest/pom.xml                       |   2 +-
 examples/jms/rest/push/pom.xml                  | 162 +++---
 .../jms/rest/push/src/main/java/JmsHelper.java  |   6 +-
 examples/jms/scale-down/pom.xml                 | 229 ++++-----
 examples/jms/scale-down/readme.html             |   2 +-
 examples/jms/scheduled-message/pom.xml          | 161 +++---
 examples/jms/scheduled-message/readme.html      |   2 +-
 examples/jms/security/pom.xml                   | 161 +++---
 examples/jms/security/readme.html               |   2 +-
 examples/jms/send-acknowledgements/pom.xml      | 161 +++---
 examples/jms/send-acknowledgements/readme.html  |   2 +-
 examples/jms/spring-integration/pom.xml         | 121 ++---
 examples/jms/spring-integration/readme.html     |   2 +-
 examples/jms/ssl-enabled/pom.xml                | 161 +++---
 examples/jms/ssl-enabled/readme.html            |   2 +-
 examples/jms/static-selector-jms/pom.xml        | 168 ++++---
 examples/jms/static-selector-jms/readme.html    |   2 +-
 examples/jms/static-selector/pom.xml            | 161 +++---
 examples/jms/static-selector/readme.html        |   2 +-
 examples/jms/stomp-websockets/pom.xml           | 187 +++----
 examples/jms/stomp-websockets/readme.html       |   2 +-
 examples/jms/stomp/pom.xml                      | 171 ++++---
 examples/jms/stomp/readme.html                  |   2 +-
 examples/jms/stomp1.1/pom.xml                   | 171 ++++---
 examples/jms/stomp1.1/readme.html               |   2 +-
 examples/jms/stomp1.2/pom.xml                   | 171 ++++---
 examples/jms/stomp1.2/readme.html               |   2 +-
 examples/jms/stop-server-failover/pom.xml       | 253 +++++-----
 examples/jms/stop-server-failover/readme.html   |   2 +-
 examples/jms/symmetric-cluster/pom.xml          | 503 +++++++++----------
 examples/jms/symmetric-cluster/readme.html      |   2 +-
 examples/jms/temp-queue/pom.xml                 | 161 +++---
 examples/jms/temp-queue/readme.html             |   2 +-
 examples/jms/topic-hierarchies/pom.xml          | 161 +++---
 examples/jms/topic-hierarchies/readme.html      |   2 +-
 examples/jms/topic-selector-example1/pom.xml    | 161 +++---
 .../jms/topic-selector-example1/readme.html     |   2 +-
 examples/jms/topic-selector-example2/pom.xml    | 161 +++---
 .../jms/topic-selector-example2/readme.html     |   2 +-
 examples/jms/topic/pom.xml                      | 168 ++++---
 examples/jms/topic/readme.html                  |   2 +-
 examples/jms/transaction-failover/pom.xml       | 245 ++++-----
 examples/jms/transaction-failover/readme.html   |   2 +-
 examples/jms/transactional/pom.xml              | 161 +++---
 examples/jms/transactional/readme.html          |   2 +-
 examples/jms/xa-heuristic/pom.xml               | 197 ++++----
 examples/jms/xa-heuristic/readme.html           |   2 +-
 examples/jms/xa-receive/pom.xml                 | 161 +++---
 examples/jms/xa-receive/readme.html             |   2 +-
 examples/jms/xa-send/pom.xml                    | 161 +++---
 examples/jms/xa-send/readme.html                |   2 +-
 examples/pom.xml                                |   1 +
 examples/soak/normal/pom.xml                    |   5 +-
 examples/soak/pom.xml                           |   2 +-
 pom.xml                                         |   2 +-
 203 files changed, 9360 insertions(+), 9769 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/distribution/activemq/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/pom.xml b/distribution/activemq/pom.xml
index 2423ad2..91f5906 100644
--- a/distribution/activemq/pom.xml
+++ b/distribution/activemq/pom.xml
@@ -176,7 +176,7 @@
             <dependency>
                 <groupId>org.apache.activemq</groupId>
                 <artifactId>activemq-website</artifactId>
-                <version>6.0.1-SNAPSHOT</version>
+                <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
          </dependencies>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/distribution/activemq/src/main/resources/examples/index.html
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/examples/index.html 
b/distribution/activemq/src/main/resources/examples/index.html
index a33ca69..6e1abf8 100644
--- a/distribution/activemq/src/main/resources/examples/index.html
+++ b/distribution/activemq/src/main/resources/examples/index.html
@@ -20,7 +20,7 @@ under the License.
 <h1>Apache ActiveMQ Examples</h1>
 <h2>JMS Examples</h2>
 <p>Each example has its own instructions as to how they can be run, but for 
most of them it is as simple as running
-    <code>mvn verify</code> from the example directory. This will start a 
broker with the correct configuration, run the
+    <code>mvn verify -Pexample</code> from the example directory. This will 
start a broker with the correct configuration, run the
 example and then stop the server so you will need to make sure there is not a 
broker already running</p>
 <p>If you want to run an example against an already running broker then 
firstly you will need to start the broker to use
 the examples configuration. An example configuration is provided which by 
default to run the queue example, to run this
@@ -31,7 +31,6 @@ directory for the journal, to avoid problems it is best to 
delete this directory
 set the <code>ACTIVEMQ_DATA_DIR</code> environment property in 
<code>activemq.conf</code>to use a different location</p>
    <ol>
        <li><a href="./jms/aerogear/readme.html">AeroGear Example</a></li>
-       <li><a href="./jms/applet/readme.html">Applet Example</a></li>
        <li><a 
href="./jms/application-layer-failover/readme.html">Application-Layer Failover 
Example</a></li>
        <li><a href="./jms/bridge/readme.html">Core Bridge Example</a></li>
        <li><a href="./jms/browser/readme.html">JMS QueueBrowser 
Example</a></li>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/docs/user-manual/en/examples.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/examples.md b/docs/user-manual/en/examples.md
index 8a73f04..1725d09 100644
--- a/docs/user-manual/en/examples.md
+++ b/docs/user-manual/en/examples.md
@@ -17,7 +17,7 @@ JMS Examples
 ============
 
 To run a JMS example, simply `cd` into the appropriate example directory
-and type `mvn verify` (For details please read the readme.html in each
+and type `mvn verify -Pexample` (For details please read the readme.html in 
each
 example directory).
 
 Here's a listing of the examples with a brief description.

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/core/perf/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/perf/pom.xml b/examples/core/perf/pom.xml
index 1ef4dcc..461ec4f 100644
--- a/examples/core/perf/pom.xml
+++ b/examples/core/perf/pom.xml
@@ -62,9 +62,6 @@ under the License.
    <profiles>
       <profile>
          <id>default</id>
-         <activation>
-            <activeByDefault>true</activeByDefault>
-         </activation>
          <build>
             <plugins>
                <plugin>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/core/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/pom.xml b/examples/core/pom.xml
index 024fd70..81021a0 100644
--- a/examples/core/pom.xml
+++ b/examples/core/pom.xml
@@ -36,4 +36,16 @@ under the License.
       <udp-address>231.7.7.7</udp-address>
    </properties>
 
+   <profiles>
+      <profile>
+         <id>release</id>
+         <modules>
+            <module>embedded</module>
+            <module>embedded-remote</module>
+            <module>perf</module>
+            <module>vertx-connector</module>
+         </modules>
+      </profile>
+   </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/core/vertx-connector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/vertx-connector/pom.xml 
b/examples/core/vertx-connector/pom.xml
index 8c500f1..923fff1 100644
--- a/examples/core/vertx-connector/pom.xml
+++ b/examples/core/vertx-connector/pom.xml
@@ -84,7 +84,9 @@ under the License.
     </dependency>
 
    </dependencies>
-
+   <profiles>
+      <profile>
+         <id>example</id>
          <build>
             <plugins>
                <plugin>
@@ -180,6 +182,8 @@ under the License.
                </plugin>
             </plugins>
          </build>
+      </profile>
+   </profiles>
 
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/README.md
----------------------------------------------------------------------
diff --git a/examples/jms/README.md b/examples/jms/README.md
index c2f9c94..356fa6e 100644
--- a/examples/jms/README.md
+++ b/examples/jms/README.md
@@ -4,13 +4,13 @@ Running the ActiveMQ Examples
 To run an individual example firstly cd into the example directory and run
 
 ```
-mvn verify
+mvn verify -Pexample
 ```
 
 If you are running against an un released version, i.e. from master branch, 
you will have to run `mvn install` on the root
 pom.xml and the example/activemq-jms-examples-common/pom.xml first.
 
-If you want to run all the examples (except those that need to be run 
standalone) you can run `mvn verify` in the examples
+If you want to run all the examples (except those that need to be run 
standalone) you can run `mvn verify -Pexample` in the examples
 directory but before you do you will need to up the memory used by running:
 
 ```

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/aerogear/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/aerogear/pom.xml b/examples/jms/aerogear/pom.xml
index c9cf4c9..2281449 100644
--- a/examples/jms/aerogear/pom.xml
+++ b/examples/jms/aerogear/pom.xml
@@ -50,104 +50,109 @@ under the License.
       </dependency>
    </dependencies>
 
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     <systemProperties>
-                        <property>
-                           <name>data.dir</name>
-                           <value>${basedir}/target/</value>
-                        </property>
-                        <property>
-                           <name>endpoint</name>
-                           <value>${endpoint}</value>
-                        </property>
-                        <property>
-                           <name>applicationid</name>
-                           <value>${applicationid}</value>
-                        </property>
-                        <property>
-                           <name>mastersecret</name>
-                           <value>${mastersecret}</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
+   <profiles>
+      <profile>
+         <id>example</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>org.apache.activemq</groupId>
+                  <artifactId>activemq-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           <systemProperties>
+                              <property>
+                                 <name>data.dir</name>
+                                 <value>${basedir}/target/</value>
+                              </property>
+                              <property>
+                                 <name>endpoint</name>
+                                 <value>${endpoint}</value>
+                              </property>
+                              <property>
+                                 <name>applicationid</name>
+                                 <value>${applicationid}</value>
+                              </property>
+                              <property>
+                                 <name>mastersecret</name>
+                                 <value>${mastersecret}</value>
+                              </property>
+                           </systemProperties>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>runClient</id>
+                        <goals>
+                           <goal>runClient</goal>
+                        </goals>
+                        <configuration>
+                           
<clientClass>org.apache.activemq.jms.example.AerogearExample</clientClass>
+                           <args>
+                              <param>tcp://localhost:61616</param>
+                           </args>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>stop</goal>
+                        </goals>
+                     </execution>
+                  </executions>
+                  <dependencies>
+                     <dependency>
+                        <groupId>org.apache.activemq.examples.jms</groupId>
+                        <artifactId>activemq-jms-aerogear-example</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-core-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-aerogear-integration</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>io.netty</groupId>
+                        <artifactId>netty-all</artifactId>
+                        <version>${netty.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-jms_2.0_spec</artifactId>
+                     </dependency>
+                  </dependencies>
                   <configuration>
-                     
<clientClass>org.apache.activemq.jms.example.AerogearExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:61616</param>
-                     </args>
+                     <waitOnStart>false</waitOnStart>
+                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>activemq-jms-aerogear-example</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-core-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-aerogear-integration</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>io.netty</groupId>
-                  <artifactId>netty-all</artifactId>
-                  <version>${netty.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.geronimo.specs</groupId>
-                  <artifactId>geronimo-jms_2.0_spec</artifactId>
-               </dependency>
-            </dependencies>
-            <configuration>
-               <waitOnStart>false</waitOnStart>
-               
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/applet.html
----------------------------------------------------------------------
diff --git a/examples/jms/applet/applet.html b/examples/jms/applet/applet.html
deleted file mode 100644
index c3793d7..0000000
--- a/examples/jms/applet/applet.html
+++ /dev/null
@@ -1,36 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Applet Example</title>
-  </head>
-  <body>
-     <h1>ActiveMQ Applet Example</h1>
-     
-     <p>The Applet will connect to ActiveMQ server running on localhost and
-     publishes messages on a topic <code>exampleTopic</code> when "Send" is 
pressed.</p>
-     <p>The Applet is also a MessageListener and will display messages 
received from the topic</p>
-     
-     <applet code="org.apache.activemq.jms.example.AppletExample.class"
-             codebase="build/classes/"
-             
archive="activemq-core-client.jar,activemq-jms-client.jar,geronimo-jms_2.0_spec.jar,netty.jar"
-             width="640" height="480"></applet>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/applet/pom.xml b/examples/jms/applet/pom.xml
deleted file mode 100644
index c09ec62..0000000
--- a/examples/jms/applet/pom.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.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.examples.jms</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>6.0.1-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>activemq-jms-applet-example</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ6 JMS Applet Example</name>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>activemq-jms-examples-common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>io.netty</groupId>
-         <artifactId>netty-all</artifactId>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>start0</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     
<clientClass>org.apache.activemq.jms.example.AppletExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:61616</param>
-                     </args>
-                     <systemProperties>
-                        <property>
-                           <name>exampleConfigDir</name>
-                           <value>${basedir}/target/classes/activemq</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop0</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>activemq-jms-applet-example</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-core-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>io.netty</groupId>
-                  <artifactId>netty-all</artifactId>
-                  <version>${netty.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.geronimo.specs</groupId>
-                  <artifactId>geronimo-jms_2.0_spec</artifactId>
-                  <version>${geronimo.jms.2.spec.version}</version>
-               </dependency>
-            </dependencies>
-            <configuration>
-               <waitOnStart>false</waitOnStart>
-               <systemProperties>
-                  <property>
-                     <name>data.dir</name>
-                     <value>${basedir}/target/</value>
-                  </property>
-               </systemProperties>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/applet/readme.html b/examples/jms/applet/readme.html
deleted file mode 100644
index 24dd014..0000000
--- a/examples/jms/applet/readme.html
+++ /dev/null
@@ -1,40 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Applet Example</title>
-    <link rel="stylesheet" type="text/css" href="../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
-    <script type="text/javascript" src="../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>Applet Example</h1>
-     <p>This example shows you how to send and receive JMS messages from an 
Applet.</p>
-     
-        <h2>Example step-by-step</h2>
-     
-     <p><i>To run the example, simply type <code>mvn verify</code> from this 
directory</i> to start
-     the ActiveMQ server and an HTTP server.</p>
-     
-     <p>Then, go to <a 
href="http://127.0.0.1:8088/applet.html";>http://127.0.0.1:8088/applet.html</a> 
to load
-     and use the applet.</p>
-     
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java
 
b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java
deleted file mode 100644
index 2ef1b92..0000000
--- 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/AppletExample.java
+++ /dev/null
@@ -1,294 +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.jms.example;
-
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.swing.BorderFactory;
-import javax.swing.JApplet;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.SwingConstants;
-import javax.swing.SwingUtilities;
-
-import org.apache.activemq.api.core.TransportConfiguration;
-import org.apache.activemq.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.api.jms.JMSFactoryType;
-import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
-
-/**
- * A AppletExample
- *
- * @author <a href="mailto:[email protected]>Jeff Mesnil</a>
- *
- *
- */
-public class AppletExample extends JApplet implements ActionListener
-{
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    *
-    */
-   private static final long serialVersionUID = -2129589098734805722L;
-
-   private Destination destination;
-
-   private Connection connection;
-
-   private MessageProducer producer;
-
-   private MessageConsumer consumer;
-
-   private JTextArea display;
-
-   private JButton sendButton;
-
-   private Session session;
-
-   @Override
-   public void init()
-   {
-      super.init();
-
-      try
-      {
-         SwingUtilities.invokeAndWait(new Runnable()
-         {
-            public void run()
-            {
-               createGUI();
-            }
-         });
-      }
-      catch (Exception e)
-      {
-         System.err.println("createGUI didn't successfully complete");
-      }
-
-      Map<String, Object> params = new HashMap<String, Object>();
-      TransportConfiguration connector = new 
TransportConfiguration(NettyConnectorFactory.class.getName(), params);
-      ConnectionFactory cf = 
(ConnectionFactory)ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
 connector);
-      destination = ActiveMQJMSClient.createTopic("exampleTopic");
-
-      try
-      {
-         connection = cf.createConnection();
-         session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         producer = session.createProducer(destination);
-         consumer = session.createConsumer(destination);
-         consumer.setMessageListener(new MessageListener()
-         {
-            public void onMessage(final Message msg)
-            {
-               try
-               {
-                  SwingUtilities.invokeAndWait(new Runnable()
-                  {
-                     public void run()
-                     {
-                        try
-                        {
-                           display.setText(display.getText() + "\n" + 
((TextMessage)msg).getText());
-                        }
-                        catch (JMSException e)
-                        {
-                           e.printStackTrace();
-                        }
-                     }
-                  });
-               }
-               catch (Exception e)
-               {
-                  e.printStackTrace();
-               }
-            }
-         });
-      }
-      catch (JMSException e)
-      {
-         e.printStackTrace();
-      }
-   }
-
-   @Override
-   public void start()
-   {
-      super.start();
-
-      try
-      {
-         connection.start();
-      }
-      catch (JMSException e)
-      {
-         e.printStackTrace();
-      }
-   }
-
-   @Override
-   public void stop()
-   {
-      System.out.println("close connection");
-      if (connection != null)
-      {
-         try
-         {
-            connection.close();
-         }
-         catch (JMSException e)
-         {
-            e.printStackTrace();
-         }
-      }
-
-      super.stop();
-
-   }
-
-   // Public --------------------------------------------------------
-
-   public static void main(final String[] args) throws Exception
-   {
-
-      final AppletExample applet = new AppletExample();
-      applet.init();
-
-      JFrame frame = new JFrame("Applet Example");
-      frame.getContentPane().add(applet);
-
-      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-      frame.pack();
-      frame.setVisible(true);
-
-      applet.start();
-      System.out.println("open up the applet.html file in a browser, press 
enter to stop the example");
-      System.in.read();
-      Runtime.getRuntime().addShutdownHook(new Thread()
-      {
-         @Override
-         public void run()
-         {
-            applet.stop();
-         }
-      });
-   }
-
-   public void actionPerformed(final ActionEvent e)
-   {
-      try
-      {
-         producer.send(session.createTextMessage(new Date().toString()));
-      }
-      catch (JMSException e1)
-      {
-         e1.printStackTrace();
-      }
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   private void createGUI()
-   {
-      JPanel contentPane = new JPanel(new GridBagLayout());
-      GridBagConstraints c = new GridBagConstraints();
-      int numColumns = 3;
-
-      JLabel l1 = new JLabel("Received Messages:", SwingConstants.CENTER);
-      c.gridx = 0;
-      c.gridy = 0;
-      c.anchor = GridBagConstraints.SOUTH;
-      c.gridwidth = numColumns;
-      contentPane.add(l1, c);
-
-      display = new JTextArea(5, 20);
-      JScrollPane scrollPane = new JScrollPane(display);
-      display.setEditable(false);
-      display.setForeground(Color.gray);
-      c.gridy = 1;
-      c.gridwidth = numColumns;
-      c.anchor = GridBagConstraints.CENTER;
-      c.weighty = 1.0;
-      c.fill = GridBagConstraints.BOTH;
-      contentPane.add(scrollPane, c);
-
-      sendButton = new JButton("Send");
-      c.gridy = 2;
-      c.gridwidth = 1;
-      c.anchor = GridBagConstraints.SOUTH;
-      c.weighty = 0.0;
-      c.fill = GridBagConstraints.NONE;
-      contentPane.add(sendButton, c);
-
-      sendButton.addActionListener(this);
-
-      JButton clearButton = new JButton("Clear");
-      c.gridx = 2;
-      c.weightx = 0.0;
-      c.anchor = GridBagConstraints.SOUTHEAST;
-      c.fill = GridBagConstraints.NONE;
-      contentPane.add(clearButton, c);
-
-      clearButton.addActionListener(new ActionListener()
-      {
-         public void actionPerformed(final ActionEvent e)
-         {
-            display.setText("");
-         }
-      });
-
-      // Finish setting up the content pane and its border.
-      
contentPane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.black),
-                                                               
BorderFactory.createEmptyBorder(5, 20, 5, 10)));
-      setContentPane(contentPane);
-   }
-
-   // Inner classes -------------------------------------------------
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java
 
b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java
deleted file mode 100644
index 3626819..0000000
--- 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServer.java
+++ /dev/null
@@ -1,81 +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.jms.example;
-
-import java.net.InetSocketAddress;
-import java.util.concurrent.Executors;
-
-import org.apache.activemq.common.example.ActiveMQExample;
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
-
-/**
- * A HttpServer
- *
- * * @author The Netty Project ([email protected])
- * @author Trustin Lee ([email protected])
- * @author <a href="mailto:[email protected]>Jeff Mesnil</a>
- *
- *
- */
-public class HttpStaticFileServer extends ActiveMQExample
-{
-
-   public static void main(final String[] args)
-   {
-      new HttpStaticFileServer().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
-   {
-      // Configure the server.
-      ServerBootstrap bootstrap = new ServerBootstrap(new 
NioServerSocketChannelFactory(Executors.newCachedThreadPool(),
-                                                                               
         Executors.newCachedThreadPool()));
-      // Set up the event pipeline factory.
-      bootstrap.setPipelineFactory(new HttpStaticFileServerPipelineFactory());
-      // Bind and start to accept incoming connections.
-      bootstrap.bind(new InetSocketAddress(8088));
-
-      System.out.println("HTTP server ready to server on 8088");
-
-      System.out.println("open http://127.0.0.1:8088/applet.html to use the 
Applet");
-
-      while (true)
-      {
-         Thread.sleep(100);
-      }
-
-   }
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerHandler.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerHandler.java
 
b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerHandler.java
deleted file mode 100644
index 6443ef9..0000000
--- 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerHandler.java
+++ /dev/null
@@ -1,189 +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.jms.example;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.RandomAccessFile;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-
-import io.netty.buffer.ChannelBuffers;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelFuture;
-import io.netty.channel.ChannelFutureListener;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.ChannelPipelineCoverage;
-import io.netty.channel.ExceptionEvent;
-import io.netty.channel.MessageEvent;
-import io.netty.channel.SimpleChannelUpstreamHandler;
-import io.netty.handler.codec.frame.TooLongFrameException;
-import io.netty.handler.codec.http.DefaultHttpResponse;
-import io.netty.handler.codec.http.HttpHeaders;
-import io.netty.handler.codec.http.HttpMethod;
-import io.netty.handler.codec.http.HttpRequest;
-import io.netty.handler.codec.http.HttpResponse;
-import io.netty.handler.codec.http.HttpResponseStatus;
-import io.netty.handler.codec.http.HttpVersion;
-import io.netty.handler.stream.ChunkedFile;
-
-/**
- * A HttpStaticFileServerHandler
- *
- * @author The Netty Project ([email protected])
- * @author Trustin Lee ([email protected])
- * @author <a href="mailto:[email protected]>Jeff Mesnil</a>
- *
- *
- */
-@ChannelPipelineCoverage("one")
-public class HttpStaticFileServerHandler extends SimpleChannelUpstreamHandler
-{
-
-   @Override
-   public void messageReceived(final ChannelHandlerContext ctx, final 
MessageEvent e) throws Exception
-   {
-      HttpRequest request = (HttpRequest)e.getMessage();
-      if (request.getMethod() != HttpMethod.GET)
-      {
-         sendError(ctx, HttpResponseStatus.METHOD_NOT_ALLOWED);
-         return;
-      }
-
-      if (request.isChunked())
-      {
-         sendError(ctx, HttpResponseStatus.BAD_REQUEST);
-         return;
-      }
-
-      String path = sanitizeUri(request.getUri());
-      if (path == null)
-      {
-         sendError(ctx, HttpResponseStatus.FORBIDDEN);
-         return;
-      }
-
-      File file = new File(path);
-      if (file.isHidden() || !file.exists())
-      {
-         sendError(ctx, HttpResponseStatus.NOT_FOUND);
-         return;
-      }
-      if (!file.isFile())
-      {
-         sendError(ctx, HttpResponseStatus.FORBIDDEN);
-         return;
-      }
-
-      RandomAccessFile raf;
-      try
-      {
-         raf = new RandomAccessFile(file, "r");
-      }
-      catch (FileNotFoundException fnfe)
-      {
-         sendError(ctx, HttpResponseStatus.NOT_FOUND);
-         return;
-      }
-      long fileLength = raf.length();
-
-      HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, 
HttpResponseStatus.OK);
-      response.setHeader(HttpHeaders.Names.CONTENT_LENGTH, 
String.valueOf(fileLength));
-
-      Channel ch = e.getChannel();
-
-      // Write the initial line and the header.
-      ch.write(response);
-
-      // Write the content.
-      ChannelFuture writeFuture = ch.write(new ChunkedFile(raf, 0, fileLength, 
8192));
-
-      // Decide whether to close the connection or not.
-      boolean close = 
HttpHeaders.Values.CLOSE.equalsIgnoreCase(request.getHeader(HttpHeaders.Names.CONNECTION))
 || request.getProtocolVersion()
-                                                                               
                                            .equals(HttpVersion.HTTP_1_0) &&
-                      
!HttpHeaders.Values.KEEP_ALIVE.equalsIgnoreCase(request.getHeader(HttpHeaders.Names.CONNECTION));
-
-      if (close)
-      {
-         // Close the connection when the whole content is written out.
-         writeFuture.addListener(ChannelFutureListener.CLOSE);
-      }
-   }
-
-   @Override
-   public void exceptionCaught(final ChannelHandlerContext ctx, final 
ExceptionEvent e) throws Exception
-   {
-      Channel ch = e.getChannel();
-      Throwable cause = e.getCause();
-      if (cause instanceof TooLongFrameException)
-      {
-         sendError(ctx, HttpResponseStatus.BAD_REQUEST);
-         return;
-      }
-
-      cause.printStackTrace();
-      if (ch.isConnected())
-      {
-         sendError(ctx, HttpResponseStatus.INTERNAL_SERVER_ERROR);
-      }
-   }
-
-   private String sanitizeUri(String uri)
-   {
-      // Decode the path.
-      try
-      {
-         uri = URLDecoder.decode(uri, "UTF-8");
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         try
-         {
-            uri = URLDecoder.decode(uri, "ISO-8859-1");
-         }
-         catch (UnsupportedEncodingException e1)
-         {
-            throw new Error();
-         }
-      }
-
-      // Convert file separators.
-      uri = uri.replace('/', File.separatorChar);
-
-      // Simplistic dumb security check.
-      // You will have to do something serious in the production environment.
-      if (uri.contains(File.separator + ".") || uri.contains("." + 
File.separator) ||
-          uri.startsWith(".") ||
-          uri.endsWith("."))
-      {
-         return null;
-      }
-
-      // Convert to absolute path.
-      return System.getProperty("user.dir") + File.separator + uri;
-   }
-
-   private void sendError(final ChannelHandlerContext ctx, final 
HttpResponseStatus status)
-   {
-      HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, 
status);
-      response.setHeader(HttpHeaders.Names.CONTENT_TYPE, "text/plain; 
charset=UTF-8");
-      response.setContent(ChannelBuffers.copiedBuffer("Failure: " + 
status.toString() + "\r\n", "UTF-8"));
-
-      // Close the connection as soon as the error message is sent.
-      
ctx.getChannel().write(response).addListener(ChannelFutureListener.CLOSE);
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerPipelineFactory.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerPipelineFactory.java
 
b/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerPipelineFactory.java
deleted file mode 100644
index d4744f3..0000000
--- 
a/examples/jms/applet/src/main/java/org/apache/activemq/jms/example/HttpStaticFileServerPipelineFactory.java
+++ /dev/null
@@ -1,68 +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.jms.example;
-
-import io.netty.channel.ChannelPipeline;
-import io.netty.channel.ChannelPipelineFactory;
-import io.netty.channel.Channels;
-import io.netty.handler.codec.http.HttpRequestDecoder;
-import io.netty.handler.codec.http.HttpResponseEncoder;
-import io.netty.handler.stream.ChunkedWriteHandler;
-
-/**
- * A HttpStaticFileServerPipelineFactory
- *
- * @author The Netty Project ([email protected])
- * @author Trustin Lee ([email protected])
- * @author <a href="mailto:[email protected]>Jeff Mesnil</a>
- *
- *
- */
-public class HttpStaticFileServerPipelineFactory implements 
ChannelPipelineFactory
-{
-   public ChannelPipeline getPipeline() throws Exception
-   {
-      // Create a default pipeline implementation.
-      ChannelPipeline pipeline = Channels.pipeline();
-
-      pipeline.addLast("decoder", new HttpRequestDecoder());
-      pipeline.addLast("encoder", new HttpResponseEncoder());
-      pipeline.addLast("chunkedWriter", new ChunkedWriteHandler());
-
-      pipeline.addLast("handler", new HttpStaticFileServerHandler());
-      return pipeline;
-   }
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-configuration.xml
 
b/examples/jms/applet/src/main/resources/activemq/server0/activemq-configuration.xml
deleted file mode 100644
index 74148cf..0000000
--- 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
-
-   <jms xmlns="urn:activemq-jms">
-      <!--the topic used by the example-->
-      <topic name="exampleTopic"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      
<bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
-
-      
<journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
-
-      
<large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
-
-      
<paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example topic-->
-         <security-setting match="jms.topic.exampleTopic">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-         </security-setting>
-      </security-settings>
-   </core>
-
-</core>
-      </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/resources/activemq/server0/activemq-roles.properties
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-roles.properties
 
b/examples/jms/applet/src/main/resources/activemq/server0/activemq-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-roles.properties
+++ /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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/applet/src/main/resources/activemq/server0/activemq-users.properties
----------------------------------------------------------------------
diff --git 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-users.properties
 
b/examples/jms/applet/src/main/resources/activemq/server0/activemq-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- 
a/examples/jms/applet/src/main/resources/activemq/server0/activemq-users.properties
+++ /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.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/application-layer-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/pom.xml 
b/examples/jms/application-layer-failover/pom.xml
index 6092f88..b999771 100644
--- a/examples/jms/application-layer-failover/pom.xml
+++ b/examples/jms/application-layer-failover/pom.xml
@@ -44,113 +44,118 @@ under the License.
       </dependency>
    </dependencies>
 
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>start0</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start1</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                     <serverStartString>INFO: AMQ221001</serverStartString>
-                     <fork>true</fork>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     
<clientClass>org.apache.activemq.jms.example.ApplicationLayerFailoverExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:61616</param>
-                        <param>tcp://localhost:61617</param>
-                     </args>
-                     <systemProperties>
-                        <property>
-                           <name>exampleConfigDir</name>
-                           <value>${basedir}/target/classes/activemq</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop0</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
+   <profiles>
+      <profile>
+         <id>example</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>org.apache.activemq</groupId>
+                  <artifactId>activemq-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>start0</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>start1</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+                           <serverStartString>INFO: 
AMQ221001</serverStartString>
+                           <fork>true</fork>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>runClient</id>
+                        <goals>
+                           <goal>runClient</goal>
+                        </goals>
+                        <configuration>
+                           
<clientClass>org.apache.activemq.jms.example.ApplicationLayerFailoverExample</clientClass>
+                           <args>
+                              <param>tcp://localhost:61616</param>
+                              <param>tcp://localhost:61617</param>
+                           </args>
+                           <systemProperties>
+                              <property>
+                                 <name>exampleConfigDir</name>
+                                 
<value>${basedir}/target/classes/activemq</value>
+                              </property>
+                           </systemProperties>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop0</id>
+                        <goals>
+                           <goal>stop</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop1</id>
+                        <goals>
+                           <goal>stop</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+                        </configuration>
+                     </execution>
+                  </executions>
+                  <dependencies>
+                     <dependency>
+                        <groupId>org.apache.activemq.examples.jms</groupId>
+                        
<artifactId>activemq-jms-application-layer-failover-example</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-core-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>io.netty</groupId>
+                        <artifactId>netty-all</artifactId>
+                        <version>${netty.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-jms_2.0_spec</artifactId>
+                        <version>${geronimo.jms.2.spec.version}</version>
+                     </dependency>
+                  </dependencies>
                   <configuration>
+                     <waitOnStart>false</waitOnStart>
                      
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
-               </execution>
-               <execution>
-                  <id>stop1</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  
<artifactId>activemq-jms-application-layer-failover-example</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-core-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>io.netty</groupId>
-                  <artifactId>netty-all</artifactId>
-                  <version>${netty.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.geronimo.specs</groupId>
-                  <artifactId>geronimo-jms_2.0_spec</artifactId>
-                  <version>${geronimo.jms.2.spec.version}</version>
-               </dependency>
-            </dependencies>
-            <configuration>
-               <waitOnStart>false</waitOnStart>
-               
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/application-layer-failover/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/readme.html 
b/examples/jms/application-layer-failover/readme.html
index a90cc8f..f64fd26 100644
--- a/examples/jms/application-layer-failover/readme.html
+++ b/examples/jms/application-layer-failover/readme.html
@@ -42,7 +42,7 @@ under the License.
      section of the user manual.</p>      
 
      <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify</code> from this 
directory</i></p>
+     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> 
from this directory</i></p>
      <p>In this example, the live server is server 1, which will failover onto 
server 0.</p>
      <p>The connection will initially be created to server1, server 1 will 
crash, and the client will carry on
      on server 0, the new  server. With Application-Layer failover the node 
that is failed over onto, does not need to

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/8db56b73/examples/jms/bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/pom.xml b/examples/jms/bridge/pom.xml
index d5cb9ea..ead3953 100644
--- a/examples/jms/bridge/pom.xml
+++ b/examples/jms/bridge/pom.xml
@@ -49,117 +49,122 @@ under the License.
       </dependency>
    </dependencies>
 
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>start0</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start1</id>
-                  <goals>
-                     <goal>start</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                     <fork>true</fork>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
+   <profiles>
+      <profile>
+         <id>example</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>org.apache.activemq</groupId>
+                  <artifactId>activemq-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>start0</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>start1</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+                           <fork>true</fork>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>runClient</id>
+                        <goals>
+                           <goal>runClient</goal>
+                        </goals>
+                        <configuration>
+                           
<clientClass>org.apache.activemq.jms.example.BridgeExample</clientClass>
+                           <args>
+                              <param>tcp://localhost:61616</param>
+                              <param>tcp://localhost:61617</param>
+                           </args>
+                           <systemProperties>
+                              <property>
+                                 <name>exampleConfigDir</name>
+                                 
<value>${basedir}/target/classes/activemq</value>
+                              </property>
+                           </systemProperties>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop0</id>
+                        <goals>
+                           <goal>stop</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop1</id>
+                        <goals>
+                           <goal>stop</goal>
+                        </goals>
+                        <configuration>
+                           
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
+                        </configuration>
+                     </execution>
+                  </executions>
+                  <dependencies>
+                     <dependency>
+                        <groupId>org.apache.activemq.examples.jms</groupId>
+                        <artifactId>activemq-jms-bridge-example</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-core-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.activemq</groupId>
+                        <artifactId>activemq-jms-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>io.netty</groupId>
+                        <artifactId>netty-all</artifactId>
+                        <version>${netty.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-jms_2.0_spec</artifactId>
+                        <version>${geronimo.jms.2.spec.version}</version>
+                     </dependency>
+                  </dependencies>
                   <configuration>
-                     
<clientClass>org.apache.activemq.jms.example.BridgeExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:61616</param>
-                        <param>tcp://localhost:61617</param>
-                     </args>
+                     <waitOnStart>false</waitOnStart>
                      <systemProperties>
                         <property>
-                           <name>exampleConfigDir</name>
-                           <value>${basedir}/target/classes/activemq</value>
+                           <name>data.dir</name>
+                           <value>${basedir}/target/</value>
                         </property>
                      </systemProperties>
                   </configuration>
-               </execution>
-               <execution>
-                  <id>stop0</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop1</id>
-                  <goals>
-                     <goal>stop</goal>
-                  </goals>
-                  <configuration>
-                     
<configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>activemq-jms-bridge-example</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-core-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-client</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>activemq-jms-server</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>io.netty</groupId>
-                  <artifactId>netty-all</artifactId>
-                  <version>${netty.version}</version>
-               </dependency>
-               <dependency>
-                  <groupId>org.apache.geronimo.specs</groupId>
-                  <artifactId>geronimo-jms_2.0_spec</artifactId>
-                  <version>${geronimo.jms.2.spec.version}</version>
-               </dependency>
-            </dependencies>
-            <configuration>
-               <waitOnStart>false</waitOnStart>
-               <systemProperties>
-                  <property>
-                     <name>data.dir</name>
-                     <value>${basedir}/target/</value>
-                  </property>
-               </systemProperties>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
 
 </project>

Reply via email to