1. Introduction
This project contains example of maven-assembly-plugin
usage
Project generated by generator-jvm yeoman generator (java)
2. Implementation
java example
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class App {
public static void main(String[] args) {
log.info("yo!");
}
}
plugion configuration
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<finalName>${project.artifactId}-${project.version}-all</finalName>
<!--
<descriptors>
<descriptor>${project.basedir}/.mvn/assembly.xml</descriptor>
</descriptors>
-->
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>daggerok.App</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assemble-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<defaultGoal>clean package</defaultGoal>
</build>
</project>