Maven TutorialIntroduction to Maven Installation and environment configuration Maven settings Standard directory structure in Maven project command line IntelliJ IDEA Super POM and Parent POM Understanding POM.xml file Declaring maven dependencies Dependency management using repositories in Maven Adding jar file as a dependency in Maven Maven archetypes Maven build life cycle, phases and goals Generating project API documentation Generating Site documentation for a project Installing artifacts in local repository Deploying the artifact on remote repository Maven plug-ins surefire plugin compiler plugin Profiles in MavenExecuting Maven phases and goals through command prompt Maven command line optionsexec-maven-plugin usage Skipping tests in Maven Test execution report in Maven
plug-ins in MavenIn maven, plugins play an important role in maven build process. Each phase is executed by plug-in. Each plugin can be configured as per it’s specification. For example – we can configure the surefire plugin to run tests from specific category only. Maven plug-ins can be divided into 2 types.
- build – Build plugins should be included in <build> tag. Build plugins are executed during build process.
- reporting – Reporting plugins should be included in <reporting> tag. Reporting plugins are executed during site generation once the build process is complete. For example – javadoc and surefire-report are reporting plugins.
- Core (Most frequently used ones) – clean, compiler, surefire, deploy, install, resources, site
- Packaging (Used for packaging the project artifacts)– jar, war, ear
- Reporting – javadoc
- Tools (used for performing tasks other than build process) – ant, archetype, help, release
- compiler:compile – compiles project
- archetype:generate – creates new project
Web development and Automation testing