It is probably always a good idea to run the OSGi HTTP service on a random available port in itests.
So when this is always done it prevents future issues and removes a bit of duplication.
Signed-off-by: Wouter Born <github@maindrain.net>
-runfw: org.eclipse.osgi
-runee: JavaSE-11
+# An unused random HTTP port is used during tests to prevent resource conflicts
+# This property is set by the build-helper-maven-plugin in the itests pom.xml
+-runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
+
# The integration test itself does not export anything.
Export-Package:
-exportcontents:
-runblacklist: \
bnd.identity;id='org.openhab.core.storage.json'
--runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
-
#
# done
#
<name>openHAB Add-ons :: Integration Tests :: Feed Binding Tests</name>
<properties>
- <org.osgi.service.http.port>9090</org.osgi.service.http.port>
-
<rome.version>1.15.0</rome.version>
</properties>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>reserve-network-port</id>
- <goals>
- <goal>reserve-network-port</goal>
- </goals>
- <phase>process-resources</phase>
- <configuration>
- <portNames>
- <portName>org.osgi.service.http.port</portName>
- </portNames>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
</project>
bnd.identity;id='org.openhab.core.storage.json',\
bnd.identity;id='org.openhab.core.storage.mapdb'
--runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
-
#
# done
#
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>reserve-network-port</id>
- <goals>
- <goal>reserve-network-port</goal>
- </goals>
- <phase>process-resources</phase>
- <configuration>
- <portNames>
- <portName>org.osgi.service.http.port</portName>
- </portNames>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
</project>
<properties>
<m2e.jdt.annotationpath>target/dependency</m2e.jdt.annotationpath>
+ <org.osgi.service.http.port>9090</org.osgi.service.http.port>
</properties>
<dependencies>
</bndruns>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-network-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <portNames>
+ <portName>org.osgi.service.http.port</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>