How to get or display the project version from maven

When I am doing quality analysis on projects, one of the things I like to use is the real version of the project in Sonar.

How to extract it from maven projects?

mvn -q -Dexec.executable=echo -Dexec.args=‘${project.version}’ --non-recursive exec:exec

If your pom.xml has something like

You should see:
1.0.0-SNAPSHOT

junit5

junit 5, maven dependencies

JUnit 5 and Maven Dependencies

Straight to the point:

You need at least these dependencies:


    org.junit.jupiter
    junit-jupiter-api
    5.1.0
    test



    org.junit.jupiter
    junit-jupiter-engine
    5.1.0
    test

There are other dependencies for IDEs and older versions of jUnit if you need them:


    org.junit.vintage
    junit-vintage-engine
    5.1.0
    test
    

    org.junit.platform
    junit-platform-launcher
    1.1.0
    test


    org.junit.platform
    junit-platform-runner
    1.1.0
    test