Maven
Key Note: By default, eclipse comes with the maven project so no need to download maven.
- How to install maven project in eclipse ide
Open eclipse>Navigate to file>New>click on Project
Click on maven project>Next>click on create sample project check box>Next
New Maven project page open>Fill all Group id, Artifact id>click on finish
Here maven project is created>below is the maven project screenshot
src/main/java-source file
src/main/resources-resources file like a picture,XML file etc
src/test/java-test file like your test cases
src/test/resources- resources for test case
Let's open pom.xml file>To see pom.xml in XML format>click on below highlighted pom.xml file
Here we can see in XML format>Here is the 4 element>grouped, artifact id and version which we have given>pom.xml contain the information contains which we are working on.
Let's create a class to understand better in pom.xml>
Goto src/test/java>create a package under package >click on other>then open java folder >open junit>click on unit Test Case
After that, you can see lots of errors in the created class file.
Open the pom.xml file and add dependencies into it and save the file and Maven Dependencies in left and side.
Comments
Post a Comment