Simple Java project using Maven – initial step
Share
By The initial step for any automation is creating a simple Java project. We would be looking into creating a Java project using Maven in this post.
There are 2 mostly used methods across communities of testers, which we would look into in this series.
For proceeding further,I would ask you to IDE installed on your system. IDE is nothing but Integrated Development Environment.
There are a bunch of IDEs available in the market. However, it depends upon what language are you preferring and what kind of automation are you alluding to.
For our need Free versions would be still enough, for developing any automation scripts.
Most favored IDE across teaser networks for Java project / C# project were, IntelliJ, Eclipse & Visual Studio. Similarly Pycharm for Python related projects.
I would be using InteeliJ as IDE, for explaining step by step creation of Java project using Maven
Steps for Creating Java Project:
Open IDE installed, then click on “Create New Project” (Fig.1) option available on opening screen. If IDE opens to dashboard, then select “File>New>Project” (Fig.2).
Fig.1
Fig.2
Then select option “Maven” on the window displayed (Fig.3), and click on “Next”.
Fig.3
If you want to select any specific archetype for Maven project you can select one by checking th check box “Create from archetype”. For our purpose default would be quiet enough.
Next, enter “GroupId” & “ArtifactId” (Fig.4) and Click on Next. “GroupId” & “ArtifactId” basically defines how your java project packaged.
groupId – a unique base name of the company or group that created the project.
artifactId – a unique name of the project
Fig.4
On the next window, enter your “Project” name (Fig.5). If you want to select a different location other than default to store the project file then select one (Fig.6).
Fig.5
Fig.6
Then by clicking on Finish button would create a Java proect using Maven.
Fig.7
In our next posts of this series, we should look into how to create a java project without Maven, and finally adding required libraries.
You may also like to read this article OOPS Concepts