how to configure maven to add junit 4.10 instead of 3.8 dependency in new project

Abhishek Nayak picture Abhishek Nayak · Feb 14, 2014 · Viewed 11.9k times · Source

When i am creating a new maven project in eclipse kepler, eclipse automatically adds junit 3.8 dependency in pom.xml like

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8</version>
    <scope>test</scope>
</dependency>

I want to be available newer version like: 4.10,

Where can i configure to use newer version instead of old?

Answer

František Hartman picture František Hartman · Feb 14, 2014

The junit version is described in archetype that is used to create maven project.

You need to either find archetype that will fit your needs, or create your own.

Then once you have it you need to select to use this archetype when creating the project in Eclipse.