Ads

Maven Important terminologies

 Why Maven:

  • Can manage dependencies

  • to maintain proper project structure

  • used to create documentation

  • acts as build tool,compiler tool

Group id-company name

artifact -product

version-version

  1. Manage dependencies:

    1. once dependency added,required jars will be downloaded to the local automatically

  2. Maintain Code Structure:

    1. src/main/java-Actual code

    2. src/main/resources-UI related images,files stored here

    3. src/test/java-unit testing code

    4. src/test/resources--resources stored here against above test/java

    5. pom.xml-used to maintain dependencies,plugins,repositories

  3. acts as a build tool:

    1. maven compiler plugin used to maintain java 17 or to maintain required java version

    2. maven jar plugin used to convert the project into executable jar file-->main class has to be mentioned here

    3. maven dependency plugin also used to convert the project into executable jar file along with libraries

    4. right click on project--->run as-->maven build---goal as Package--->it will generate the executable file along with main class ,required librarires

  4. Maven working as a document tool

    1. if we give goal as site it will create a document in html file(professional documentation tool)

  5. Goals:

    1. default------>upto project deployment-------------->this lifecycle covers everything from validation to deployment

    2. clean--->delete target folder--->compiled code,packages will be removed

    3. site--->Document tool--->it shows test results,code coverage,project informations

    4. validate--->just check whether everything is correct like project name,pom.xml file is valid or not

    5. verify--->run check on results ensure quality--->post testing check

    6. package--->gives executable jar ,war,zip file

    7. test--->not package or deploy,it runs the test

    8. install--->installing or downloading the local dependencies in local

    9. deploy-->final stage deploying to central repository

Comments

Popular posts from this blog

Rest Assured Api Automation

Appium Notes

Jenkins Notes