In this tutorial we are going to show how to set up a working maven 3 installation.
Follow this steps:
- Download maven 3
- Install maven 3
- Configure maven 3
- Check setup
1. Download maven 3
• Navigate to http://maven.apache.org/download.html
• Download binary ZIP archive
2. Install maven 3
• Unpack ZIP archive to a directory of your choosing that suits your needs
3. Configure maven 3
We are going to configure our maven installation to use a custom repository directory.
• Create a directory for your repository
• Navigate to
conf/settings.xml
file of your maven installation• Locate
localRepository
tag and change its value to a directory that you just created• Add
M2_HOME
variable pointing to your maven installation• Add
bin
directory of your maven installation to a PATH
variable4. Check setup
We are going to check if we can setup a simple test project with maven.
• Run a command line window –
cmd
command• Enter following command
mvn archetype:create –DgroupId=com.itcuties –DartifactId=test
After maven downloads all the needed resources for executing this command a new test
project is created.
The post Maven 3 installation and configuration appeared first on Programmer's lounge.