make sure junit 5 unit tests are executed
diff --git a/junit5/pom.xml b/junit5/pom.xml
index 5774fd1..1c2a3ca 100644
--- a/junit5/pom.xml
+++ b/junit5/pom.xml
@@ -80,11 +80,6 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
diff --git a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberInstantiatedTest.java b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberInstantiatedTest.java
index 07a98b2..d9b2c0d 100644
--- a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberInstantiatedTest.java
+++ b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberInstantiatedTest.java
@@ -33,7 +33,7 @@
@Test
void testSimpleService() {
- context.registerInjectActivateService(new Integer(5));
+ context.registerService(Integer.class, new Integer(5));
Integer service = context.getService(Integer.class);
assertEquals((Integer)5, service);
diff --git a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberTest.java b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberTest.java
index e1cf9c1..70d65d9 100644
--- a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberTest.java
+++ b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextMemberTest.java
@@ -33,7 +33,7 @@
@Test
void testSimpleService() {
- context.registerInjectActivateService(new Integer(5));
+ context.registerService(Integer.class, new Integer(5));
Integer service = context.getService(Integer.class);
assertEquals((Integer)5, service);
diff --git a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextTest.java b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextTest.java
index 40785f5..6501e12 100644
--- a/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextTest.java
+++ b/junit5/src/test/java/org/apache/sling/testing/mock/osgi/junit5/OsgiContextTest.java
@@ -31,7 +31,7 @@
@Test
void testSimpleService(OsgiContext context) {
- context.registerInjectActivateService(new Integer(5));
+ context.registerService(Integer.class, new Integer(5));
Integer service = context.getService(Integer.class);
assertEquals((Integer)5, service);
diff --git a/parent/pom.xml b/parent/pom.xml
index ee016d6..ee434c7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -95,6 +95,13 @@
</configuration>
</plugin>
+ <!-- Require latest Surefire plugin for JUnit 5 support -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.22.1</version>
+ </plugin>
+
</plugins>
</pluginManagement>
</build>