You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2022/06/21 15:28:08 UTC
[tomee] 03/03: Make sure there is no port conflict on our CI (ActiveMQ 61616 port)
This is an automated email from the ASF dual-hosted git repository.
jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit e6db358313c38512a64b182bb5c2d3c1c909fa35
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Tue Jun 21 17:27:56 2022 +0200
Make sure there is no port conflict on our CI (ActiveMQ 61616 port)
---
examples/simple-jms-context/pom.xml | 25 ++++++++++++++++++++++
.../src/test/resources/arquillian.xml | 9 ++++++++
examples/simple-jms/pom.xml | 25 ++++++++++++++++++++++
.../simple-jms/src/test/resources/arquillian.xml | 10 +++++++++
4 files changed, 69 insertions(+)
diff --git a/examples/simple-jms-context/pom.xml b/examples/simple-jms-context/pom.xml
index 71fbe223ad..a8b7f43cab 100644
--- a/examples/simple-jms-context/pom.xml
+++ b/examples/simple-jms-context/pom.xml
@@ -31,10 +31,35 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.arquillian>1.7.0.Alpha10</version.arquillian>
<tomee.version>9.0.0-M8-SNAPSHOT</tomee.version>
+ <activemq.port>61616</activemq.port>
</properties>
<build>
<defaultGoal>install</defaultGoal>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
<plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-activemq-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <portNames>
+ <portName>activemq.port</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
diff --git a/examples/simple-jms-context/src/test/resources/arquillian.xml b/examples/simple-jms-context/src/test/resources/arquillian.xml
index 60dbed2cc6..301ec0fe06 100644
--- a/examples/simple-jms-context/src/test/resources/arquillian.xml
+++ b/examples/simple-jms-context/src/test/resources/arquillian.xml
@@ -25,6 +25,15 @@
<property name="classifier">plus</property>
<property name="dir">target/apache-tomee-remote</property>
<property name="appWorkingDir">target/arquillian-test-working-dir</property>
+ <!-- make sure it runs on our CI without ActiveMQ default 61616 conflict -->
+ <property name="properties">
+ AMQResourceAdapter = new://Resource?type=ActiveMQResourceAdapter
+ AMQResourceAdapter.BrokerXmlConfig = broker:(tcp://localhost:${activemq.port}?useJmx=false)
+ AMQMessageContainer = new://Container?type=MESSAGE
+ AMQMessageContainer.ResourceAdapter = AMQResourceAdapter
+ AMQConnectionFactory = new://Resource?type=jakarta.jms.ConnectionFactory
+ AMQConnectionFactory.ResourceAdapter = AMQResourceAdapter
+ </property>
</configuration>
</container>
</arquillian>
\ No newline at end of file
diff --git a/examples/simple-jms/pom.xml b/examples/simple-jms/pom.xml
index 363a2a5c33..09c85214f0 100644
--- a/examples/simple-jms/pom.xml
+++ b/examples/simple-jms/pom.xml
@@ -28,10 +28,35 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.arquillian>1.7.0.Alpha10</version.arquillian>
<tomee.version>9.0.0-M8-SNAPSHOT</tomee.version>
+ <activemq.port>61616</activemq.port>
</properties>
<build>
<defaultGoal>install</defaultGoal>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
<plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-activemq-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <portNames>
+ <portName>activemq.port</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
diff --git a/examples/simple-jms/src/test/resources/arquillian.xml b/examples/simple-jms/src/test/resources/arquillian.xml
index 60dbed2cc6..c43ec5a70a 100644
--- a/examples/simple-jms/src/test/resources/arquillian.xml
+++ b/examples/simple-jms/src/test/resources/arquillian.xml
@@ -23,8 +23,18 @@
<property name="httpPort">-1</property>
<property name="stopPort">-1</property>
<property name="classifier">plus</property>
+ <property name="debug">false</property>
<property name="dir">target/apache-tomee-remote</property>
<property name="appWorkingDir">target/arquillian-test-working-dir</property>
+ <!-- make sure it runs on our CI without ActiveMQ default 61616 conflict -->
+ <property name="properties">
+ AMQResourceAdapter = new://Resource?type=ActiveMQResourceAdapter
+ AMQResourceAdapter.BrokerXmlConfig = broker:(tcp://localhost:${activemq.port}?useJmx=false)
+ AMQMessageContainer = new://Container?type=MESSAGE
+ AMQMessageContainer.ResourceAdapter = AMQResourceAdapter
+ AMQConnectionFactory = new://Resource?type=jakarta.jms.ConnectionFactory
+ AMQConnectionFactory.ResourceAdapter = AMQResourceAdapter
+ </property>
</configuration>
</container>
</arquillian>
\ No newline at end of file