[
https://issues.apache.org/jira/browse/SLING-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert resolved SLING-7803.
-----------------------------------
Resolution: Fixed
it was not possible support both junit4 and junit5 with one single "osgi-mock"
and "sling-mock" artifact, because both need compile time dependencies to
junit4/junit5, and we do not want to clutter the classpath so projects using
only one of them. furthermore the "OsgiContext" and "SlingContext"
implementation is different between JUnit4 and JUnit5.
therefore for both projects osgi-mock and sling-mock the single artifact was
split up in multiple artifats:
* core => contains the main mock implementation
* junit4 => implementation of JUnit 4 rule
* junit5 => implementation of JUnit 5 extension
* parent => parent POM defining common dependencies and properties
* relocate => relocate POM to relocate the original single artifact ID to the
JUnit 4 version of osgi-mock/sling-mock, so existing projects may update the
version number without getting build failures, and they get a warning about the
new artifact name.
all 5 artifacts are always released together, so we do not need to split into
multiple git repositories.
> JUnit5 Support for sling-mock and osgi-mock
> -------------------------------------------
>
> Key: SLING-7803
> URL: https://issues.apache.org/jira/browse/SLING-7803
> Project: Sling
> Issue Type: New Feature
> Components: Testing
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Priority: Major
> Labels: mocks
> Fix For: Testing Sling Mock Oak 2.1.0, Context-Aware
> Configuration Mock Plugin 1.3.2, Testing OSGi Mock 2.4.0, Testing Sling Mock
> 2.3.0
>
>
> sling-mock and osgi-mock currently have a direct compile dependency to
> junit4, and use a special junit4 construct ("Rule") that is not supported in
> junit5 any longer. instead, junit5 provides new extension mechanisms.
> we want to support both junit4 and junit5 (independently or both together for
> projects migrating from junit4 to junit5).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)