maven java webapp project example

Maven java webapp project: The archetype:generate command is used to create the simple maven java web project. First we have to navigate the terminal (*uix or Mac) or command prompt (Windows) to the folder where we want to create the Java web project. Syntax: mvn archetype:generate -DgroupId=groupid -DartifactId=project-name -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=booleanValuemvn archetype:generate -DgroupId=groupid -DartifactId=project-name -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=booleanValue … Read more

maven java project example

Maven java project: The archetype:generate command is used to create the simple maven java project. First we have to navigate the terminal (*uix or Mac) or command prompt (Windows) to the folder where we want to create the Java project. Syntax: mvn archetype:generate -DgroupId=groupid -DartifactId=project-name -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=booleanValuemvn archetype:generate -DgroupId=groupid -DartifactId=project-name -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=booleanValue Example: mvn archetype:generate … Read more

maven repositories tutorial

Maven repositories: Maven repositories are directories of packaged JAR files with extra meta-data. The meta-data is represented by POM files. A repository contains all the project jars, library jar, plugins and any other project specific artifacts. Types of maven repository: Local Repository Central Repository Remote Repository Maven repository search order: Local repository then Central repository … Read more

maven plugin types

Maven plugins: A maven plugin represents a set of goals which provides the facility to add your own actions to the build process. Syntax to execute a plugin: mvn [plugin-name]:[goal-name]mvn [plugin-name]:[goal-name] Maven plugin types: 1. Build Plugins 2. Reporting Plugins Build Plugins: Build plugins are executed at the build time. Build plugins should be declared … Read more

maven build profiles

Maven build profiles Maven build profiles provides the facility to build project using different configurations. Instead of creating two separate POM files, we can just specify a profile with the different build configuration and build the project with this build profile when needed. The profiles element is used to specify the maven build profiles inside … Read more

Maven site lifecycle phases

Maven site lifecycle handles everything related to generating documentation for your project. Maven site lifecycle phases: pre-site execute processes needed prior to the actual project site generation site generate the project’s site documentation post-site execute processes needed to finalize the site generation, and to prepare for site deployment site-deploy deploy the generated site documentation to … Read more

maven clean lifecycle phases

Maven clean lifecycle handles everything related to removing temporary files from the output directory, including generated source files, compiled classes and previous JAR files etc. Maven clean lifecycle phases: pre-clean execute processes needed prior to the actual project cleaning clean remove all files generated by the previous build post-clean execute processes needed to finalize the … Read more

maven default lifecycle phases

Maven build life cycle is divided into build phases, and the build phases are divided into build goals. Maven default lifecycle handles everything related to compiling and packaging your project. Maven default lifecycle phases: validate validate the project is correct and all necessary information is available. initialize initialize build state, e.g. set properties or create … Read more

Maven Build Life Cycles, Phases and Goals

Maven build life cycle is divided into build phases, and the build phases are divided into build goals. Maven Build Phase: A phase represents a stage in life cycle. The build phases are subdivided into goals. Maven Build Goal: Build goals are the finest steps in the Maven build process which represents a specific task. … Read more

maven pom xml file

POM File: POM refers to Project Object Model. It is an XML file which contains the information about the project and various configuration detail used by Maven to build the project like build directory, source directory, dependencies, test source directory, plugin, goals etc. The POM file should be in the project’s root directory. Maven reads … Read more