Merge pull request #174 from nakomis/fix/ansible

Fixes ansible runAnsible task
diff --git a/Jenkinsfile b/Jenkinsfile
index 8300127..05aca28 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,16 +36,16 @@
             }
 
             stage('Run tests') {
-                environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} -u 910:910 --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') {
-                    sh 'mvn clean install -Duser.home=/var/maven -Duser.name=$(id -un 910)'
+                environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') {
+                    sh 'mvn clean install -Duser.home=/var/maven -Duser.name=jenkins'
                 }
             }
 
             // Conditional stage to deploy artifacts, when not building a PR
             if (env.CHANGE_ID == null) {
                 stage('Deploy artifacts') {
-                    environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} -u 910:910 --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') {
-                        sh 'mvn deploy -DskipTests -Duser.home=/var/maven -Duser.name=$(id -un 910)'
+                    environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') {
+                        sh 'mvn deploy -DskipTests -Duser.home=/var/maven -Duser.name=jenkins'
                     }
                 }
 
diff --git a/software/messaging/src/main/resources/catalog.bom b/software/messaging/src/main/resources/catalog.bom
index 9ac06fb..d63335b 100644
--- a/software/messaging/src/main/resources/catalog.bom
+++ b/software/messaging/src/main/resources/catalog.bom
@@ -25,6 +25,57 @@
         type: org.apache.brooklyn.entity.messaging.activemq.ActiveMQBroker
         name: ActiveMQ Broker
         description: ActiveMQ is an open source message broker which fully implements the Java Message Service 1.1 (JMS)
+    - id: org.apache.brooklyn.entity.messaging.activemq-artemis
+      iconUrl: https://activemq.apache.org/artemis/images/activemq-logo.png
+      version: "1.0.0-SNAPSHOT" # BROOKLYN_VERSION
+      item:
+        type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
+        name: ActiveMQ Artemis
+        itemType: entity
+        description: Apache ActiveMQ Artemis has a proven non blocking architecture. It delivers outstanding performance. JMS 2.0 and 1.1 support.
+        brooklyn.parameters:
+        - name: rest.api.port
+          type: integer
+          default: 8161
+        brooklyn.config:
+          version: '2.3.0' # sets install.version
+          installFile: $brooklyn:formatString("apache-artemis-%1$s-bin.tar.gz", config("install.version"))
+          brokerName: broker1
+          installSourceDirectory: $brooklyn:formatString("apache-artemis-%1$s", config("install.version"))
+          downloadUrl: $brooklyn:formatString("http://apache.cbox.biz/activemq/activemq-artemis/%1$s/apache-artemis-%1$s-bin.tar.gz",config("install.version"), config("installFile")) # sets download.url
+          install.command:
+            $brooklyn:formatString("tar zxf %2$s", config("download.url"), config("installFile"))
+          customize.command:
+            $brooklyn:formatString:
+              - "%1$s/%2$s/bin/artemis create %3$s --user '%4$s' --password '%5$s' --require-login --name '%3$s' --addresses '%6$s' --http-port %7$s"
+              - $brooklyn:attributeWhenReady("expandedinstall.dir")
+              - $brooklyn:config("installSourceDirectory")
+              - $brooklyn:config("brokerName")
+              - $brooklyn:attributeWhenReady("user")
+              - $brooklyn:attributeWhenReady("password")
+              - $brooklyn:attributeWhenReady("host.name")
+              - $brooklyn:config("rest.api.port")
+          launch.command:
+            $brooklyn:formatString("%1$s/bin/artemis-service start", config("brokerName"))
+          checkRunning.command:
+            ps aux | grep '' | grep org.apache.activemq.artemis.boot.Artemis > /dev/null
+          stop.command:
+            $brooklyn:formatString("%1$s/bin/artemis-service stop", config("brokerName"))
+        brooklyn.initializers:
+        - type: org.apache.brooklyn.core.sensor.password.CreatePasswordSensor
+          brooklyn.config:
+            name: password
+            password.length: 12
+        - type: org.apache.brooklyn.core.sensor.StaticSensor
+          brooklyn.config:
+            name: user
+            static.value: br0kerusEr
+        - type: org.apache.brooklyn.core.sensor.StaticSensor
+          brooklyn.config:
+            name: main.uri
+            static.value:
+              $brooklyn:formatString("http://%s:%s", attributeWhenReady("host.name"), config("rest.api.port"))
+
     - id: org.apache.brooklyn.entity.messaging.qpid.QpidBroker
       iconUrl: classpath:///qpid-logo.jpeg
       item: