Maven - Install Maven into Eclipse - maven tutorial
Introduction
- There are two ways to install Maven One which is little difficult than the other is installing Maven through command line. And the other easy way out is installing Maven with in Eclipse.
The objective of the document:
- Method 1: Install Maven as embed program into Eclipse.
- Method 2: Install Maven independently on Windows and declare it so that Eclipse can use it.
Check your Eclipse in order to see whether it installs Maven or not.
- First of all, check your Eclipse in order To see whether it installs Maven or not.
- File/New/Other..
learn maven tutorial - maven select wizard - maven example
- If Maven Wizard exists, it means your Eclipse has been installed with Maven Plugin, and it is ready to work. However, you still can re-install its latest version if you want.
maven tutorial tags : apache maven , maven repository , maven central
Install Maven into Eclipse as Embed Program
learn maven tutorial - maven install embed program - maven example
- Install maven into embed program to install new software related updates
learn maven tutorial - maven install software - maven example
- To select which site we are working for the available software in corresponding site or location
learn maven tutorial - maven install selectall - maven example
- To install available software and check the items.
- Maven integration for eclipse:
- M2e-maven integration foe eclipse
- M2e-slf4j over logback logging
learn maven tutorial - maven install details - maven example
learn maven tutorial - maven install eclipse - maven example
learn maven tutorial -maven installing software - maven example
learn maven tutorial - maven software update - maven example
- You have successfully installed Maven into Eclipse, restart Eclipse.
Install Independently Maven outside Eclipse
Download Maven from Homepage
learn maven tutorial - download apache maven - maven example
- After the Maven is downloaded completely, you can extract and save the zip file on a specific folder of the hard drive.
- You can see an example as below:
- D:/DevPrograms/apache-maven.3.3.3
- This is an extracting result on hard drive
learn maven tutorial - apche-maven-3.3.3 - maven example
learn maven tutorial - apche-maven-3.3.3 - maven example
Setup Environment variables
- The next step is declaration an environmental variable to maven. These pictures as below are based on Windows 7, and the other Windows operating systems are similar.
- They are included the environmental variable and declared to Path
- JAVA_HOME=C:\DevPrograms\Java\jdk1.8.0_40
- M2_HOME=D:\DevPrograms\apache-maven-3.3.3
- M2=%M2_HOME%\bin
- Path=;%M2%;%JAVA_HOME%\bin
learn maven tutorial - maven environment variables - maven example
learn maven tutorial - maven environment variables new - maven example
- Please check to make sure that you do not declare the JAVA_HOME environmental variable, then add it.
learn maven tutorial - maven new system variables - maven example
learn maven tutorial - maven new system variable javahome - maven example
- Similarly, you can declare to two other environmental variables
learn maven tutorial - maven environment variables m2 home - maven example
- Finally, append to the value of the Path environmental variable as below :
- ;%M2%;%JAVA_HOME%\bin
maven edit system variable
learn maven tutorial - maven environment variables temp - maven example
- Next, check your environmental declarations. You'd better restart or "log off" your computer.
- Open a command window and type the command:
- mvn --version
learn maven tutorial -maven windows system tran - maven example
Declare setup location Maven on Eclipse
- Open a folder:
- D:\DevPrograms\apache-maven-3.3.3\conf
learn maven tutorial - apache maven settings - maven example
- Open the settings.xml file to change some parameters.
learn maven tutorial - apache maven setting repository - maven example
- Then add:
D:\DevPrograms\apache-maven-3.3.3\repository
learn maven tutorial - apache maven setting local repository - maven example
- Open Window/Reference on Eclipse.
learn maven tutorial - maven window - maven example
learn maven tutorial - launch maven installation - maven example
- Click "Add" to add a new profile.
learn maven tutorial - new maven runtime - maven example
learn maven tutorial - apache maven launch - maven example
- Next, declare the position of the Maven configuration file which was changed last time .
learn maven tutorial - apache maven usersettings - maven example
- The Maven installation into Eclipse is completed.