I'm trying to learn Maven following this Getting Started Guide.
I've Apache Maven 3.0.1 on Linux. I've issued the following command to create a first project:
yes | mvn archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DgroupId=org.obliquid.helpers \
-DartifactId=obliquid-helpers \
-Dversion=0.1
However, in the output I read:
[INFO] project created from Old (1.x) Archetype in dir: ...
How can I use a current version for the Archetype? Is the guide that I'm reading outdated?
As a sub-question, I've noticed that in the pom.xml mentions junit version 3.8.1, while I'd like to use junit version 4.8.x - How to change that? I can just change the version number in the XML?
Is there a better guide or book that you can suggest?
The version you are using as well as the guide you are referring is current enough. You can ignore the message. The project that is created does work fine with the latest maven.
As for junit, you can change the version of the dependency appropriately. The project that is created using archetype:generate is only an indicative one, which is meant to be customized.
In addition to what you are looking at, you could also look Maven: The Complete Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With