You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2019/10/20 13:53:00 UTC
[plc4x] 25/25: - Configured the test to work with failsafe instead
of surefire - Cleaned up the maven config
This is an automated email from the ASF dual-hosted git repository.
jfeinauer pushed a commit to branch feature/resolve-split-package-osgi
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit ecc5def89b051da3e4ffda1e3ea8741c31983925
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Oct 18 15:16:30 2019 +0200
- Configured the test to work with failsafe instead of surefire
- Cleaned up the maven config
---
plc4j/karaf-features/karaf-itest/pom.xml | 60 +++++++++++++++++---------------
plc4j/karaf-features/pom.xml | 32 +++++++++++++++--
plc4j/karaf-features/s7/pom.xml | 5 ++-
pom.xml | 13 +++++++
4 files changed, 78 insertions(+), 32 deletions(-)
diff --git a/plc4j/karaf-features/karaf-itest/pom.xml b/plc4j/karaf-features/karaf-itest/pom.xml
index 00e4988..67a06d4 100644
--- a/plc4j/karaf-features/karaf-itest/pom.xml
+++ b/plc4j/karaf-features/karaf-itest/pom.xml
@@ -29,6 +29,8 @@
<artifactId>karaf-itest</artifactId>
+ <name>PLC4J: Karaf-Features: Integration-Tests</name>
+
<properties>
<karaf.version>4.2.6</karaf.version>
<pax.version>4.13.1</pax.version>
@@ -60,6 +62,13 @@
<type>tar.gz</type>
</dependency>
+ <!-- Add the surefire logger api as failsafe doesn't provide this -->
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-logger-api</artifactId>
+ <version>${surefire.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
@@ -130,7 +139,7 @@
<!-- See https://issues.apache.org/jira/browse/KARAF-6457 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
@@ -152,34 +161,29 @@
</systemPropertyVariables>
</configuration>
</plugin>
- <!-- Run in the verify Phase -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/*IT.java</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>integration-test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <phase>integration-test</phase>
- <configuration>
- <excludes>
- <exclude>none</exclude>
- </excludes>
- <includes>
- <include>**/*IT.java</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
+ <!-- Karaf currently doesn't work with Java 12 and above -->
+ <!-- See: https://issues.apache.org/jira/projects/KARAF/issues/KARAF-6203 -->
+ <profiles>
+ <profile>
+ <id>java12andAbove</id>
+ <activation>
+ <jdk>(12,]</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
\ No newline at end of file
diff --git a/plc4j/karaf-features/pom.xml b/plc4j/karaf-features/pom.xml
index 1400fd1..1d5d27f 100644
--- a/plc4j/karaf-features/pom.xml
+++ b/plc4j/karaf-features/pom.xml
@@ -20,22 +20,48 @@
<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
- <!-- TODO Currnelty thats the easeist way to avoid importing of slf4j -->
- <artifactId>plc4x-parent</artifactId>
<groupId>org.apache.plc4x</groupId>
+ <artifactId>plc4j</artifactId>
<version>0.5.0-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
<artifactId>karaf-features</artifactId>
<packaging>pom</packaging>
+ <name>PLC4J: Karaf-Features</name>
+
<modules>
<module>s7</module>
<module>karaf-itest</module>
</modules>
+ <dependencies>
+ <!-- Forcefully exclude slf4j -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>jaxb-runtime</artifactId>
+ <version>2.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <version>1.9.14</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<build>
<resources>
<resource>
diff --git a/plc4j/karaf-features/s7/pom.xml b/plc4j/karaf-features/s7/pom.xml
index 36043d4..4ef3301 100644
--- a/plc4j/karaf-features/s7/pom.xml
+++ b/plc4j/karaf-features/s7/pom.xml
@@ -20,16 +20,19 @@
<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<artifactId>karaf-features</artifactId>
<groupId>org.apache.plc4x</groupId>
<version>0.5.0-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
<artifactId>driver-s7-feature</artifactId>
<packaging>feature</packaging>
+ <name>PLC4J: Karaf-Features: S7</name>
+
<!-- This would be necessary with the kar goal which works not fine, yet -->
<!-- <dependencies>-->
<!-- <dependency>-->
diff --git a/pom.xml b/pom.xml
index 3812323..9c2d9ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -904,6 +904,19 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<!-- Generate the legally required text files in the jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>