[
https://issues.apache.org/jira/browse/SLING-12131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784085#comment-17784085
]
Rob McDougall commented on SLING-12131:
---------------------------------------
> Also, there is virtually no value in doing so, because you can use junit4 and
> junit5 side-by-side
I disagree. JUnit4 will be unmaintained at some point (it may already be now,
not sure). In theory, the switch to JUnit5 vintage should be pretty painless
(just a pom.xml change and re-run the tests). Projects that are being
maintained will make this change. If no one cares to make such a trivial
change to a project over a two year period (or pick some longer period if you
wish), then who knows what other dependencies are not being updated. Software
is more like milk than wine - it does not get better with age.
Old dependencies cause work for developers using those libraries (I myself
experienced this which is why I raised SLING-12130). If we have to force
someone to exclude dependencies from their maven files, I would prefer to make
people who are running old versions of libraries do the work rather than those
who are current.
I'm not in favour of unnecessary work, however I would argue that this is
necessary work. I don't think you can argue against the idea that at some
point all active projects will have to move to JUnit5, it's just a matter of
when. At what point to you designate a project as "unmaintained" and prune it?
Two years? Five years? Ten years? I would argue that whatever that period is,
then that's how long you wait before dropping Junit4 from the pom. I don't
believe "never" is an acceptable answer.
> 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)