Create Selenium project using Maven - Part 2

Maven :

The Maven build-tool is one of the most commonly used tools in the Java ecosystem. In addition to software development, it is also used when scripting automation tests using java in order to manage dependencies.

As such, being familiar with the tool is crucial to working in a productive manner. While Maven makes managing dependency files a whole lot easier, it also helps resolve dependency issues and conflicts in a better way as compared to manual methods. Given the useability of the tool, there are also various factors which turn potential users away. One such factor is the way of creating a maven project. While the CLI method is easy, it requires Maven to be installed in the system.Maven project creation using Eclipse has a whole ton of tutorials on the internet, but it is still complicated. So, in this tutorial, we'll be taking a dive into Maven project creation using GUI, and in particular, using Visual Studio Code.

Step 1:

Create a clean new folder in your desired location and open it in Visual Studio Code. 

Once you have created a folder and opened VS Code, we will proceed with creating the Maven project. Use the shortcut keys Ctrl + Shift + P to bring up the quick prompt in VS Code. Then type in 'Maven' and select 'Maven: Create Maven Project' from the dropdown.

Now another dropdown with a list of Maven Archetypes will be shown. Select 'maven-archetype-quickstart' ​​​​​​​from the dropdown and then version '1.4' from the next dropdown to select the version of the maven quickstart archetype.

In the next dropdown, input the GroupID. I have input 'com.cic' ​​​​​​​ as an example.

Next, enter the ArtifactID and hit Enter again. I have used 'new_maven_project' as my Artifact.

Once you hit 'Enter', a pop up for project location selection will be shown. Since we already opened VS Code in the desired folder, just click on the 'Select Destination Folder' button. In case you didn't open VS code from the desired location, navigate to the desired location and select it.

Once you select the location, a terminal will open in the lower section of the VS Code window. Click on the terminal and input the version of your project. I have input 1.0 as my project version.

Next,it will ask you to confirm the properties for the project. Type Y and hit ​​​​​​​Enter

You will get a Build Success message. You'll also see a new 'new_maven_project' folder on the left section of the VS Code window. Hit Enter once again.

That's it. Your new maven project is ready to code.

I hope this tutorial helped you understand maven project creation using VS Code in a concise manner. Do let me know in case of any doubts or if I have left out anything.

Follow Us On

Registered Office

CHG IT CONSULTANCY PVT LTD

STPI Technology Incubation Centre,
2nd Floor, No.5, Rajiv Gandhi Salai,
Taramani, Chennai – 600113,
Tamil Nadu, INDIA

Parent Office

CIC Corporation

2-16-4 Dogenzaka, Shibuya-ku,
Nomura Real Estate,
Shibuya Dogenzaka Building,
Tokyo 150-0043, JAPAN

  +81 03-3496-1571
AboutUs

CHG IT Consultancy Pvt. Ltd. is a subsidiary of CIC Holdings Co. Ltd. Japan. Our company is focused on IT related solutions to reap the benefits of global popularity of Software Industry.

Registered Office
CHG IT CONSULTANCY PVT LTD

STPI Technology Incubation Centre,
2nd Floor, No.5, Rajiv Gandhi Salai,
Taramani, Chennai – 600113,
Tamil Nadu, INDIA

CIC Corporation

2-16-4 Dogenzaka, Shibuya-ku,
Nomura Real Estate,
Shibuya Dogenzaka Building,
Tokyo 150-0043, JAPAN

+81 03-3496-1571