Skip to content

Commit 08c970e

Browse files
committed
Only support latest JUnit 5
Historically Tycho has multiple providers for JUnit 5 to support different version. This has different drawbacks like maintenance burden and actually if one is coding against the JUnit 4 API there should be no immediate need to use older versions. Also as Tycho is loading providers from the maven classpath users that really require an older version can always choose to stay on a previous release (of Tycho) for that part like it is already possible with JDT compiler. Because of this we should from now on only ever support one (preferably the latest) JUnit 5 release and make it automatic updateable.
1 parent 5750e88 commit 08c970e

File tree

118 files changed

+115
-8322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+115
-8322
lines changed

RELEASE_NOTES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,21 @@ Alternatively the new `mirror-target-platform` mojo can be used.
438438
Tycho for a long time has shipped with support for older JUnit 3/4 versions.
439439
As JUnit 3/4 is actually EOL we no longer support version before 4.7 anymore.
440440

441+
For users that are previously have used a specific provider in their configuration (like `junit47`) this means they need
442+
to change that to use only `junit4` from now on.
443+
444+
### Only one JUnit 5 provider
445+
446+
Historically Tycho has multiple providers for JUnit 5 to support different version. As Tycho is loading providers from
447+
the maven classpath users that really require an older version can always choose to stay on a previous release (of Tycho)
448+
for that part like it is already possible with JDT compiler.
449+
450+
Because of this Tycho will now only ship with one JUnit 5 provider that is updated alongside with the JUnit 5 release
451+
like we already do for other dependencies like Eclipse Platform.
452+
453+
For users that are previously have used a specific provider in their configuration (like `junit59`) this means they need
454+
to change that to use only `junit5` from now on.
455+
441456
## 4.0.8
442457

443458
backports:

tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml renamed to tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<artifactId>tycho-surefire</artifactId>
1818
<version>5.0.0-SNAPSHOT</version>
1919
</parent>
20-
<artifactId>org.eclipse.tycho.surefire.junit47</artifactId>
20+
<artifactId>org.eclipse.tycho.surefire.junit4</artifactId>
2121
<packaging>jar</packaging>
22-
<name>Tycho Surefire OSGi JUnit 4.7 Runner</name>
22+
<name>Tycho Surefire OSGi JUnit 4.x Runner</name>
2323
<build>
2424
<plugins>
2525
<plugin>
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Import-Package: \
22
org.junit.jupiter.api.*;version='[5,6)',\
3-
org.junit.runner.*;resolution:=optional;version='[4.12,5)',\
4-
org.junit.runners.*;resolution:=optional;version='[4.12,5)',\
5-
org.junit.experimental.categories;resolution:=optional;version='[4.12,5)',\
6-
org.junit.internal.*;version='[4.12,5)';resolution:=optional,\
7-
org.junit;resolution:=optional;version='[4.12,5)',\
3+
org.junit.platform.suite.api;resolution:=optional;version='[1,2)',\
4+
org.opentest4j;version='[1.2,2)',\
85
!org.apache.maven.surefire.*,\
96
!org.apache.maven.plugin.surefire.*,\
107
*
118
Fragment-Host: org.eclipse.tycho.surefire.osgibooter
12-
-removeheaders: Tool, Bnd-*, Created-By, Private-Package
9+
# The JUnit Runner is still compatible with Java 1.8, as all included upstream dependencies are.
10+
# (This is checked in the tycho-surefire-plugin's pom.xml. See execution 'enforce-runtime-jdk-compatibility'.)
11+
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
12+
-removeheaders: Tool, Bnd-*, Created-By, Private-Package
13+
-fixupmessages "Classes found in the wrong directory"; is:=warning

tycho-surefire/org.eclipse.tycho.surefire.junit5/pom.xml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
</parent>
2020
<artifactId>org.eclipse.tycho.surefire.junit5</artifactId>
2121
<packaging>jar</packaging>
22-
<name>Tycho Surefire OSGi JUnit 5 Runner</name>
22+
<name>Tycho Surefire OSGi JUnit 5.x Runner</name>
2323
<properties>
2424
<!-- When updating JUnit version(s), double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in bnd.bnd -->
25-
<junit-platform-version>1.0.3</junit-platform-version>
26-
<junit-jupiter-version>5.0.3</junit-jupiter-version>
25+
<junit-platform-version>1.9.1</junit-platform-version>
26+
<junit-jupiter-version>5.9.1</junit-jupiter-version>
2727
</properties>
2828
<build>
2929
<plugins>
@@ -63,24 +63,29 @@
6363
<version>${junit-jupiter-version}</version>
6464
</artifactItem>
6565
<artifactItem>
66-
<groupId>org.apache.maven.surefire</groupId>
67-
<artifactId>common-java5</artifactId>
68-
<version>${surefire-version}</version>
66+
<groupId>org.junit.platform</groupId>
67+
<artifactId>junit-platform-suite-api</artifactId>
68+
<version>${junit-platform-version}</version>
69+
</artifactItem>
70+
<artifactItem>
71+
<groupId>org.junit.platform</groupId>
72+
<artifactId>junit-platform-suite-commons</artifactId>
73+
<version>${junit-platform-version}</version>
6974
</artifactItem>
7075
<artifactItem>
71-
<groupId>org.junit.vintage</groupId>
72-
<artifactId>junit-vintage-engine</artifactId>
73-
<version>4.12.3</version>
76+
<groupId>org.junit.platform</groupId>
77+
<artifactId>junit-platform-suite-engine</artifactId>
78+
<version>${junit-platform-version}</version>
7479
</artifactItem>
7580
<artifactItem>
76-
<groupId>org.opentest4j</groupId>
77-
<artifactId>opentest4j</artifactId>
78-
<version>1.0.0</version>
81+
<groupId>org.apache.maven.surefire</groupId>
82+
<artifactId>common-java5</artifactId>
83+
<version>${surefire-version}</version>
7984
</artifactItem>
8085
<artifactItem>
8186
<groupId>org.apiguardian</groupId>
8287
<artifactId>apiguardian-api</artifactId>
83-
<version>1.0.0</version>
88+
<version>1.1.2</version>
8489
</artifactItem>
8590
</artifactItems>
8691
</configuration>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
# Manual merge of META-INF/services/org.junit.platform.engine.TestEngine of both junit-vintage-engine and junit-jupiter-engine
2-
# otherwise only one of the two files would win when extracting dependencies
31
org.junit.jupiter.engine.JupiterTestEngine
4-
org.junit.vintage.engine.VintageTestEngine
2+
org.junit.platform.suite.engine.SuiteTestEngine

tycho-surefire/org.eclipse.tycho.surefire.junit5/src/main/resources/about.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h3>License</h3>
2222
apply to your use of any object code in the Content. Check the Redistributor's license that was
2323
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
2424
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
25-
and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
25+
and such source code may be obtained at <a href="https://www.eclipse.org">https://www.eclipse.org</a>.</p>
2626

2727
<h3>Third Party Content</h3>
2828
<p>The Content includes items that have been sourced from third parties as set out below. If you
@@ -34,36 +34,36 @@ <h4>Surefire Shared Java 5 Provider Base</h4>
3434
<p>The plug-in includes Surefire Shared Java 5 Provider Base ${surefire-version} developed by the Apache Software Foundation. Therefore:</p>
3535

3636
<blockquote>
37-
This product includes software developed by the Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org/</a>).
37+
This product includes software developed by the Apache Software Foundation (<a href="https://www.apache.org/">https://www.apache.org/</a>).
3838
</blockquote>
3939

4040
<p>Surefire Shared Java 5 Provider Base is:</p>
4141

4242
<blockquote>Copyright 2004-2015 The Apache Software Foundation.</blockquote>
4343

4444
<p>Your use of the Surefire Shared Java 5 Provider Base code is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
45-
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
45+
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="https://www.apache.org/licenses/LICENSE-2.0.html">https://www.apache.org/licenses/LICENSE-2.0.html</a>.
4646

4747
<p>The Apache attribution <a href="about_files/NOTICE">NOTICE</a> file is included with the Content in accordance with 4d of the Apache License, Version 2.0.</p>
4848

49-
<p>Examples and documentation as well as updated source code for Surefire Shared Java 5 Provider Base is available at <a href="http://maven.apache.org/surefire/">http://maven.apache.org/surefire/</a>.</p>
49+
<p>Examples and documentation as well as updated source code for Surefire Shared Java 5 Provider Base is available at <a href="https://maven.apache.org/surefire/">https://maven.apache.org/surefire/</a>.</p>
5050

5151
<h4>opentest4j</h4>
5252
<p>The plug-in includes opentest4j 1.0.0.
5353
<p>Your use of the opentest4j code is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
54-
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
54+
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="https://www.apache.org/licenses/LICENSE-2.0.html">https://www.apache.org/licenses/LICENSE-2.0.html</a>.
5555
<p>Examples and documentation as well as updated source code for opentest4j is available at <a href="https://github.com/ota4j-team/opentest4j/">https://github.com/ota4j-team/opentest4j/</a>.</p>
5656

5757
<h4>API Guardian</h4>
5858
<p>The plug-in includes API Guardian 1.0.0.
5959
<p>Your use of the API Guardian code is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
60-
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
60+
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="https://www.apache.org/licenses/LICENSE-2.0.html">https://www.apache.org/licenses/LICENSE-2.0.html</a>.
6161
<p>Examples and documentation as well as updated source code for opentest4j is available at <a href="https://github.com/apiguardian-team/apiguardian/">https://github.com/apiguardian-team/apiguardian/</a>.</p>
6262

6363
<h4>junit-platform-surefire-provider</h4>
6464
<p>The plug-in includes junit-platform-surefire-provider ${junit-platform-version}.
6565
<p>Your use of the junit-platform-surefire-provider code is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
66-
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
66+
in the file <a href="about_files/LICENSE">LICENSE</a> and is also available at <a href="https://www.apache.org/licenses/LICENSE-2.0.html">https://www.apache.org/licenses/LICENSE-2.0.html</a>.
6767
<p>Examples and documentation as well as updated source code for junit-platform-surefire-provider is available at <a href="https://github.com/junit-team/junit5/">https://github.com/junit-team/junit5/</a>.</p>
6868

6969
<h4>junit-jupiter-engine, junit-vintage-engine, junit-platform-commons, junit-platform-engine, junit-platform-launcher</h4>

tycho-surefire/org.eclipse.tycho.surefire.junit54/.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

tycho-surefire/org.eclipse.tycho.surefire.junit54/bnd.bnd

Lines changed: 0 additions & 16 deletions
This file was deleted.

tycho-surefire/org.eclipse.tycho.surefire.junit54/pom.xml

Lines changed: 0 additions & 90 deletions
This file was deleted.

tycho-surefire/org.eclipse.tycho.surefire.junit54/src/main/resources/META-INF/services/org.junit.platform.engine.TestEngine

Lines changed: 0 additions & 4 deletions
This file was deleted.

tycho-surefire/org.eclipse.tycho.surefire.junit55/.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)