@sterile orbit has a question:
How do I properly add the latest JUnit to a new Java 21 Maven project? its not part of the default pom.xml???
1 messages ยท Page 1 of 1 (latest)
@sterile orbit has a question:
How do I properly add the latest JUnit to a new Java 21 Maven project? its not part of the default pom.xml???
<@&987246554085740594> please have a look, thanks.
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
To add JUnit to a Java 21 Maven project, you need to manually add it to your pom.xml file. Here's how you can do it:
Open your pom.xml file in your preferred text editor.
Add the JUnit dependency under the <dependencies> tag:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
Save the pom.xml file.
Right-click on your project in your IDE and select "Maven" > "Reload Project" to update the project with the new dependency.
You can now start writing your JUnit tests in your Java project.
Remember to replace the version number with the latest version of JUnit available at the time of adding it to your project.
By following these steps, you should be able to add JUnit to your Java 21 Maven project successfully and start writing and executing unit tests for your codebase. If you encounter any issues, make sure to check for typos in the dependency declaration or consult official documentation for further assistance.
Thats not the latest...
how do If ind the latest
its not just about junit
its about any maven dependency
hey there!
you can find the latest junit version in maven central
ok thanks
I just need to add the dependency?
ok thanks a l ot
should i mark ur answer as something
?
usually discord help channels require me to mark your answer as the solution
to close thread
not here mabe?
maybe?
use /help-thread close
Closed the thread.
ty
thats not the latest
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
@sterile orbit this is the lastest junit
junit 4 and 5 are different dependencies