Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
106 views
by The go-to Tester (360 points)
It is high appreciated if anyone helps me how to create a maven project using a command line.

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)

Make sure that you have maven binary added to your PATH variable and also you have JAVA_HOME environment variable declared. Once you have set all environment variables open command prompt and navigate to the directory where you want to setup maven project. Make sure that the directory is empty.

After navigating you can use below command to create sample maven project.

mvn archetype:generate -DgroupId={project-packaging}
   -DartifactId={project-name}
   -DarchetypeArtifactId=maven-archetype-quickstart
   -DinteractiveMode=false
 
Output:
 
> mvn archetype:generate -DgroupId=in.mayurshah -DartifactId=test
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
 
[INFO] Scanning for projects...
 
[INFO] -- omitted for readability
 
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: in.mayurshah
[INFO] Parameter: packageName, Value: in.mayurshah
[INFO] Parameter: package, Value: in.mayurshah
[INFO] Parameter: artifactId, Value: test
[INFO] Parameter: basedir, Value: C:/Users/***/Documents/workspace
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:/Users/***/Documents/workspace
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Hope that helps!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...