[ 
https://issues.apache.org/jira/browse/SLING-12131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784231#comment-17784231
 ] 

Rob McDougall commented on SLING-12131:
---------------------------------------

{quote}So I think we're finding common ground :) I'm conceding that migrating 
is desirable, and you seem to be conceding that it's a best-effort exercise and 
some parts of such a migration can be non-trivial.
{quote}
Agreed,  I think we all want to do what's best.  And I absolutely agree that 
the transition to the jupiter-engine is not going to happen overnight.

I hadn't realized that the JUnit Vintage engine includes JUnit4 as a transitive 
dependency.

I guess I'm not really looking to remove JUnit4 (just yet :)).  I'm maybe just 
looking to substitute the explicit JUnit4 dependency for the transitive 
dependency in the JUnit5 Vintage engine.  That (at least) moves the ball a 
little.  It also makes the projects dependent on the newer junit-vintage-engine 
rather than on the older junit dependency, which I think is a step forward.

I've started on the PR and am using the sling-hamcrest-matchers project as my 
test project to ensure JUnit 4 compatibility.

Can you point me to a sling project that uses the custom JUnit4 rules?  I will 
attempt to use that as a second testbed to ensure nothing breaks by using the 
JUnit5 dependencies.

> Update sling-parent pom.xml to include JUnit5 dependencies
> ----------------------------------------------------------
>
>                 Key: SLING-12131
>                 URL: https://issues.apache.org/jira/browse/SLING-12131
>             Project: Sling
>          Issue Type: Task
>            Reporter: Rob McDougall
>            Priority: Major
>
> JUnit4 is in maintenance mode (no updates in the last 2 years and then only 
> security fixes).  I think updating projects to JUnit5 should be encouraged.
> I am thinking this should be a relatively easy change of adding the 
> junit-jupiter and junit-vintage-engine into the Dependency Management section 
> of the sling-parent.
> Once this is done, individual projects could switch to the vintage-engine (at 
> the very least) or move to jupiter by switching the dependency in their 
> project pom.
> Some day down the road, the JUnit 4 dependencies could be removed.  Projects 
> that have not updated to JUnit5 (vintage or jupiter) by that time are likely 
> no longer maintained.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to