There doesn't seem to be a way for developers who aren't using Maven to download JUnit 5 and reference it from their projects. Am I missing something, or is this something that JUnit doesn't support as yet?
A method of downloading JUnit and getting it running in a Java build system which doesn't use Maven.
Well, anyone can download straight from Maven Central. It only requires a web client (e.g., a web browser).
Also, Gradle has built-in support for downloading from Maven Central, and Ant can be used in conjunction with Ivy which provides support for downloading from Maven Central.
Did you have something specific in mind?
For example, if you want the JUnit Jupiter 5.3.1 API, you'd simply go here:
https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.3.1/
And if you want to know how I found that, I simply went to https://search.maven.org and ended up here after searching: https://search.maven.org/artifact/org.junit.jupiter/junit-jupiter-api/5.3.1/jar
It's not clear, from the documentation, which files I want to download.
From the JUnit 4 instructions it's quite clear - I download these two and put them in my classpath:
[junit.jar]http://www.java2s.com/Code/Jar/j/Downloadjunit410jar.htm
[hamcrest-core.jar]
From JUnit 5 - there are 15 Jars listed. Do I need to download them all and include them all in my classpath? I thought maybe the "Migrating from JUnit 4" section would be clear about what I needed to take, but it also didn't have anything on that.
A section on "If you're doing X, then you need Jars A, B, and C. If you're doing Y then you need Jars A, C, and D" would be a great help.
I suggest using the _console launcher standalone jar_ in case of lacking a dependency managing tool: https://junit.org/junit5/docs/current/user-guide/#running-tests-console-launcher
Thank you, that's great!
I suggest using the console launcher standalone jar in case of lacking a dependency managing tool: https://junit.org/junit5/docs/current/user-guide/#running-tests-console-launcher
Maybe the Installation section should be improved. It really doesn't go into detail on how to _install_ junit in your project. It describes the artifacts only. I think it could easily improved by a should section about build tool support, ide support and launching junit using the console launcher.
@sbrannen, well, that is stupid. Why would anyone go to maven's website if he wants to download JUnit, and not maven?
If you are lazy enough to not build standalone releases, with dependencies, the least you can do is provide a download link, preferably on the front page of your project!
Cryptic instructions, about a software that not everyone even knows about (there are plenty of other pacakge managers for java) is not the way to release a project! I wouldn't be surprised, if many people would download JUnit 4, only because they can't find the download links for JUnit 5.
@darkelf44 Your comment is disrespectful and clearly violates our code of conduct. Please adjust your language and behavior. Otherwise, you cannot be part of this community.
Well, I want to use JUnit5. My linux package manager (Ubuntu 18 LTS) does know a package for Junit3 a package for Junit4 - but no Package for Junit5. I want to integrate Junit5-support to https://github.com/ifrh/Praktomat but realy I don't find information I need.
What Java-Packages should I copy to be able to call JUnit5 like Junit3 or Junit4 ( https://github.com/ifrh/Praktomat/blob/master/src/checker/checker/JUnitChecker.py#L50 ) ? (see https://github.com/junit-team/junit5/issues/1737#issuecomment-470709388 )
@ifrh Sounds like you might want to use the console launcher standalone jar.
@marcphilipp Yes, you are right. Thanks for pointing me to the junit-platform-console-standalone-1.4.0.jar. I'll try if that contains everything I need - but reading other information it may be that this _"standalone.jar"_ have multiple depenecies to other jars
... but reading other information it may be ...
Which information source are those? Anyway, the _standalone_ stands on its own feet. It contains all you need to launch Jupiter and Vintage based tests.
@sormuras So I misinterpreted https://junit.org/junit5/docs/current/user-guide/#dependency-diagram .
I 'll try to connect Praktomat with the _standalone_ downloadable from https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.4.0/junit-platform-console-standalone-1.4.0.jar
Most helpful comment
Maybe the Installation section should be improved. It really doesn't go into detail on how to _install_ junit in your project. It describes the artifacts only. I think it could easily improved by a should section about build tool support, ide support and launching junit using the console launcher.