Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven - Change jUnit Version in Quickstart Archetype

I am trying to create a new maven project using the maven-archetype-quickstart archetype, which incorporates a AppTest.java sample test class and a dependency for Junit version 3.8.1 but I would like to use Junit 4.

How can I change Junit version on the quickstart maven archetype?

like image 848
Roberto Linares Avatar asked Mar 29 '16 06:03

Roberto Linares


1 Answers

Use the prompt or a terminal in eclipse and do this :

      mvn -B archetype:generate \
     -DarchetypeGroupId=org.apache.maven.archetypes \
     -DgroupId=com.mycompany.app \
     -DartifactId=my-app

After that you have to import it from Eclipse, IntelliJ or Netbeans as a maven project and you'll got the version of J-Unit 4.X

like image 146
Hohenheim Avatar answered Oct 28 '22 04:10

Hohenheim