junit4 icon indicating copy to clipboard operation
junit4 copied to clipboard

Drop any jUnit 3.8 packaging

Open gbonk opened this issue 14 years ago • 7 comments

Every once in a while a developer or the eclipse IDE will default to the 3.8 junit packaging for the Assert function, using junit.framework.Assert and not org.junit.Assert.

Can these duplicates be removed at some point ? Sure it will reduce backwards compatibility, but people do need to move on at some point.

gbonk avatar Mar 30 '12 17:03 gbonk

The JUnit team has always tried very hard to maintain the invariant that upgrading to a new JUnit jar will not break tests that worked previously. This is especially important since people often get new JUnit versions automatically through upgrading Eclipse or a maven pull. Although I understand the pain of duplicate versions, I don't see removing the old code as high priority at the time.

dsaff avatar Apr 02 '12 19:04 dsaff

This probably doesn't completely solve your problem, but in Eclipse, with the Content Assist, you can say that you don't want to see certain types, such as java.awt.*. Look in your Workspace preferences Java->Appearance->Type Filters.

Also, consider using a tool such as Checkstyle with which you can check for the use of certain classes, like junit.framework.*.

matthewfarwell avatar Apr 23 '12 21:04 matthewfarwell

That's a good idea. We have the power of sonar.

  • Gregory Bonk

On Apr 23, 2012, at 5:19 PM, Matthew Farwell [email protected] wrote:

This probably doesn't completely solve your problem, but in Eclipse, with the Content Assist, you can say that you don't want to see certain types, such as java.awt.*. Look in your Workspace preferences Java->Appearance->Type Filters.

Also, consider using a tool such as Checkstyle with which you can check for the use of certain classes, like junit.framework.*.


Reply to this email directly or view it on GitHub: https://github.com/KentBeck/junit/issues/408#issuecomment-5292185

gbonk avatar Apr 23 '12 22:04 gbonk

I would like to suggest the idea of re-releasing the final version of 3.x with a different artifactId to support people having both dependencies in their project. Then drop the 3.x support in 4.x

gaffa avatar Jan 22 '13 16:01 gaffa

A different artifactId is not that easy. If making such step, then let's consider further modularity approach but the granularity has to fit to all users.

There has been several requests to modular junit. Some people want junit-legacy and junit-core artifacts, some in [email protected] mentioned assertions in other artifact. IMHO junit:junit binary should stay.

Then there was an idea of naming version not by number, but i think it was thought like part of artifactId.

Tibor17 avatar Jan 22 '13 17:01 Tibor17

Note that there is code under org.junit that references code under junit.framework, so it would be really challenging to move all of the junit.* classes into another (optional) jar.

I would be really useful to know what the motivation is for wanting to remove the junit.* classes from the jar. Please comment on issue #618 because this issue was concerned with the Assert classes

kcooney avatar Jan 22 '13 21:01 kcooney

Closing; this is a duplicate of #473 which is closed.

kcooney avatar Jan 22 '13 21:01 kcooney