What is the use of Maven war plugin?
The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive.
What is war source directory?
Single directory for extra files to include in the WAR. This is where you place your JSP files. Type: java.io.File. Required: Yes. Default: ${basedir}/src/main/webapp.
What is finalName in POM XML?
finalName modifies the name of the artifact created in the local target directory of the project.
What is a Maven assembly?
The Assembly Plugin for Maven enables developers to combine project output into a single distributable archive that also contains dependencies, modules, site documentation, and other files. Your project can easily build distribution “assemblies” using one of the prefabricated assembly descriptors.
What is jar and WAR?
A JAR file is a file with Java classes, associated metadata and resources such as text, images aggregated into one file. A WAR file is a file that is used to distribute a collection of JAR files, JSP, Servlet, XML files, static web pages like HTML and other resources that constitute a web application.
What are the types of Maven plugins?
According to Apache Maven, there are 2 types of maven plugins.
- Build Plugins.
- Reporting Plugins.
What does a war file contain?
Each WAR file contains servlets, JSPs, a deployment descriptor, and related resource files. Static HTML files and JSP are stored at the top level of the WAR directory.
What is Maven Resources plugin?
Maven Resources Plugin is part of the core Maven plugins, which handles resources copying to the output directory. It has 3 goals: resources , testResources and copy-resources . The 3 variations only differ in how the resource and output directory elements are specified or defaulted.
What is groupId and artifactId in Maven?
Maven uses a set of identifiers, also called coordinates, to uniquely identify a project and specify how the project artifact should be packaged: groupId – a unique base name of the company or group that created the project. artifactId – a unique name of the project. version – a version of the project.
What is distributionManagement in POM xml?
From the POM reference: Where as the repositories element specifies in the POM the location and manner in which Maven may download remote artifacts for use by the current project, distributionManagement specifies where (and how) this project will get to a remote repository when it is deployed.
How does Maven deploy work?
The deploy plugin is primarily used during the deploy phase, to add your artifact(s) to a remote repository for sharing with other developers and projects. This is usually done in an integration or release environment.