Maven - Package

Card Puncher Data Processing

About

Packaging in Maven.

Package is a phase that bundle the code in a way suitable to be distributed.

By default, this phase will take the compiled code and make an archive of it as define in the packaging element of the pom.xml. The specific goals executed per phase is dependent upon the packaging type of the project.

By default:

Additional plugin can create:

  • an exe file
  • or an assembly (zip file with dependency, bin, …)

Name

The name of the produced package will follow the artifact naming convention.

Parameters

Packaging Element

Packaging Element of the pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  ...
  <packaging>war</packaging>
  ...
</project>

but can be also:





Discover More
Card Puncher Data Processing
Maven - Artifact - (Component|Module|Library)

in Maven. An Artifact is the data storage unit of a repository. It's at the same time: the distribution unit to distribute and the dependency unit to use (Ie artifacts can be transferred to...
Idea Maven Dependency Tree
Maven - Dependency

dependency management in Maven. Dependency are artifact where your software depends on. Dependency are defined in the pom.xml, section dependencies. When you build an application, Maven will search...
Card Puncher Data Processing
Maven - GroupId

GroupId is the first coordinate of an artifact that indicates the unique identifier of the organization or group that created the project. It's the Maven jargon for the package name. org.apache.maven.plugins...
Card Puncher Data Processing
Maven - Install (Local Package Installation)

Install is a phase that install the generated artifact in the local repository. deploy Plugin that can be used in this phase. install...
Card Puncher Data Processing
Maven - Lifecycle

A Build Lifecycle is Made Up of Phases. To call all phase, you only need to call the last build phase to be executed, deploy: If you call a build phase, it will execute not only that build phase, but...
Idea Maven Module
Maven - Module

module management in Maven. A multi-module project is defined by a parent POM referencing one or more sub-modules. The mechanism in Maven that handles multi-module projects is referred to as the reactor....
Card Puncher Data Processing
Maven - Mvn

-t,--toolchains -U,--update-snapshots Forces a check for updated releases and snapshots on remote repositories -up,--update-plugins Ineffective, only kept for backward compatibility -V,--show-version...
Card Puncher Data Processing
Maven - Phase (Build lifecycle)

A phase is a step in the build lifecycle, which is an ordered sequence of phases. When a phase is given, Maven will execute every phase in the sequence up to and including the one defined. Phases are...
Card Puncher Data Processing
Maven - Plugin Development

How to develop a maven plugin with Java Annotation. (It's important for the configuration). The code result of this tutorial is on github. gerardnico/helloworld-maven-pluginhelloworld-maven-plugin ...
Card Puncher Data Processing
Maven - Project

A project in the Maven sense contains all little pieces that come into play to give code life. Ie: configuration files, the developers involved and the roles they play, the defect tracking system,...



Share this page:
Follow us:
Task Runner