Latest posts by khushvinder (see all)
- File upload using Spring Boot and Angularjs - January 1, 2018
- What is SOLID design principles in java? - November 30, 2017
- How to build Rest web services(API) using spring boot framework - November 20, 2017
Before to run maven command makes sure we have required software already installed. List of required software given below.
- Java: First you have to download and install java and after that make sure you done class path also.
For class path you can follow the http://www.javatpoint.com/how-to-set-path-in-java
- Maven: Similar to java you have to download maven also and extract that maven zip under any drive like c: drive or d: drive After that you have setup maven path also.
Setup maven path:
- Right click on computer ->properties->advance system settings->Advance tab-> Environment variables -> then add new system variable like this (here I am showing value only to edit existing value but you have to add new if it’s not there)
After that append M2E_HOME to path variable like this:
So after all please verify if maven installed successfully or not using below command in command prompt.
So now all are set and you can create maven project by command line:
Creating simple standalone application:
mvn archetype:generate -DgroupId=com.usoft -DartifactId=AssetManagement -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Creating web application:
mvn archetype:generate -DgroupId=com.usoft -DartifactId=AssetManagement -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
After run this command on command prompt you will see the result like this:
By default this project will not be eclipse supported to make eclipse supportive you have to run below command s
After you can also import this project into eclipse and for build this project run below command
$> mvn clean –U package
If its success then means all are set. Now you can start your development as per your requirement.
Note: Using maven command you can create other type of project also for that you need to take more understating on Archetypes. For understanding you can follow the below link:
133 total views, 2 views today