Fixing clustered examples on MacOS (and possibly other envs)

This commit is contained in:
Clebert Suconic 2015-09-01 23:26:54 -04:00
parent 355b65a50b
commit fa15b29dfc
11 changed files with 59 additions and 6 deletions

View File

@ -22,6 +22,13 @@ directory but before you do you will need to up the memory used by running:
``` ```
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
``` ```
if you are running a Mac OS, you may want to add this to run the clustered examples:
```
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
```
### Recreating the examples ### Recreating the examples
If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies: If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies:

View File

@ -59,6 +59,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<clustered>true</clustered> <clustered>true</clustered>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -71,6 +73,8 @@ under the License.
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<clustered>true</clustered> <clustered>true</clustered>
<portOffset>1</portOffset> <portOffset>1</portOffset>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -83,6 +87,8 @@ under the License.
<instance>${basedir}/target/server2</instance> <instance>${basedir}/target/server2</instance>
<clustered>true</clustered> <clustered>true</clustered>
<portOffset>2</portOffset> <portOffset>2</portOffset>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -139,6 +145,8 @@ under the License.
<goal>runClient</goal> <goal>runClient</goal>
</goals> </goals>
<configuration> <configuration>
<!-- you may have to set export MAVEN_OPTS="-Djava.net.preferIPv4Stack=true"
if you are on MacOS for instance -->
<clientClass>org.apache.activemq.artemis.jms.example.ClientSideLoadBalancingExample</clientClass> <clientClass>org.apache.activemq.artemis.jms.example.ClientSideLoadBalancingExample</clientClass>
</configuration> </configuration>
</execution> </execution>

View File

@ -60,6 +60,8 @@ under the License.
<clustered>true</clustered> <clustered>true</clustered>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -73,6 +75,8 @@ under the License.
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<portOffset>1</portOffset> <portOffset>1</portOffset>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -59,6 +59,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -70,6 +72,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -81,6 +85,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server2</instance> <instance>${basedir}/target/server2</instance>
<configuration>${basedir}/target/classes/activemq/server2</configuration> <configuration>${basedir}/target/classes/activemq/server2</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -63,6 +63,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -78,6 +80,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -59,6 +59,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -70,6 +72,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -64,6 +64,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -75,6 +77,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -86,6 +90,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server2</instance> <instance>${basedir}/target/server2</instance>
<configuration>${basedir}/target/classes/activemq/server2</configuration> <configuration>${basedir}/target/classes/activemq/server2</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -64,6 +64,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -75,6 +77,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -86,6 +90,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server2</instance> <instance>${basedir}/target/server2</instance>
<configuration>${basedir}/target/classes/activemq/server2</configuration> <configuration>${basedir}/target/classes/activemq/server2</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -59,6 +59,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -70,6 +72,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -59,6 +59,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -70,6 +72,8 @@ under the License.
<ignore>${noServer}</ignore> <ignore>${noServer}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<!-- this makes it easier in certain envs -->
<javaOptions>-Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -59,7 +59,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server0</instance> <instance>${basedir}/target/server0</instance>
<configuration>${basedir}/target/classes/activemq/server0</configuration> <configuration>${basedir}/target/classes/activemq/server0</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -71,7 +71,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server1</instance> <instance>${basedir}/target/server1</instance>
<configuration>${basedir}/target/classes/activemq/server1</configuration> <configuration>${basedir}/target/classes/activemq/server1</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -83,7 +83,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server2</instance> <instance>${basedir}/target/server2</instance>
<configuration>${basedir}/target/classes/activemq/server2</configuration> <configuration>${basedir}/target/classes/activemq/server2</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -95,7 +95,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server3</instance> <instance>${basedir}/target/server3</instance>
<configuration>${basedir}/target/classes/activemq/server3</configuration> <configuration>${basedir}/target/classes/activemq/server3</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -107,7 +107,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server4</instance> <instance>${basedir}/target/server4</instance>
<configuration>${basedir}/target/classes/activemq/server4</configuration> <configuration>${basedir}/target/classes/activemq/server4</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -119,7 +119,7 @@ under the License.
<ignore>${noSever}</ignore> <ignore>${noSever}</ignore>
<instance>${basedir}/target/server5</instance> <instance>${basedir}/target/server5</instance>
<configuration>${basedir}/target/classes/activemq/server5</configuration> <configuration>${basedir}/target/classes/activemq/server5</configuration>
<javaOptions>-Dudp-address=${udp-address}</javaOptions> <javaOptions>-Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true</javaOptions>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>