HOWTO
Project input
- Java sources
- resources files
- 3rd party libraries for compilation only
Project output
- packaged JARs
- packaged EARs
- packaged WARs
- config files
- 3rd party libraries required for runtime
- complete TAR file delivering the application
Sample code
ear
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- configuration elements goes here -->
</configuration>
</plugin>
war
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<webappDirectory>/sample/servlet/container/deploy/directory</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
assembly
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 https://maven.apache.org/xsd/assembly-2.1.1.xsd">
<id/>
<formats/>
<includeBaseDirectory/>
<baseDirectory/>
<includeSiteDirectory/>
<containerDescriptorHandlers>
<containerDescriptorHandler>
<handlerName/>
<configuration/>
</containerDescriptorHandler>
</containerDescriptorHandlers>
<moduleSets>
<moduleSet>
<useAllReactorProjects/>
<includeSubModules/>
<includes/>
<excludes/>
<sources>
<useDefaultExcludes/>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<fileSets>
<fileSet>
<useDefaultExcludes/>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<directory/>
<lineEnding/>
<filtered/>
<nonFilteredFileExtensions/>
</fileSet>
</fileSets>
<includeModuleDirectory/>
<excludeSubModuleDirectories/>
<outputDirectoryMapping/>
</sources>
<binaries>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<attachmentClassifier/>
<includeDependencies/>
<dependencySets>
<dependencySet>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<useStrictFiltering/>
<outputFileNameMapping/>
<unpack/>
<unpackOptions>
<includes/>
<excludes/>
<filtered/>
<nonFilteredFileExtensions/>
<lineEnding/>
<useDefaultExcludes/>
<encoding/>
</unpackOptions>
<scope/>
<useProjectArtifact/>
<useProjectAttachments/>
<useTransitiveDependencies/>
<useTransitiveFiltering/>
</dependencySet>
</dependencySets>
<unpack/>
<unpackOptions>
<includes/>
<excludes/>
<filtered/>
<nonFilteredFileExtensions/>
<lineEnding/>
<useDefaultExcludes/>
<encoding/>
</unpackOptions>
<outputFileNameMapping/>
</binaries>
</moduleSet>
</moduleSets>
<fileSets>
<fileSet>
<useDefaultExcludes/>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<directory/>
<lineEnding/>
<filtered/>
<nonFilteredFileExtensions/>
</fileSet>
</fileSets>
<files>
<file>
<source/>
<sources/>
<outputDirectory/>
<destName/>
<fileMode/>
<lineEnding/>
<filtered/>
</file>
</files>
<dependencySets>
<dependencySet>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<useStrictFiltering/>
<outputFileNameMapping/>
<unpack/>
<unpackOptions>
<includes/>
<excludes/>
<filtered/>
<nonFilteredFileExtensions/>
<lineEnding/>
<useDefaultExcludes/>
<encoding/>
</unpackOptions>
<scope/>
<useProjectArtifact/>
<useProjectAttachments/>
<useTransitiveDependencies/>
<useTransitiveFiltering/>
</dependencySet>
</dependencySets>
<repositories>
<repository>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<includeMetadata/>
<groupVersionAlignments>
<groupVersionAlignment>
<id/>
<version/>
<excludes/>
</groupVersionAlignment>
</groupVersionAlignments>
<scope/>
</repository>
</repositories>
<componentDescriptors/>
</assembly>