Last active
October 7, 2019 09:15
-
-
Save mostafa-asg/15e66eb0a683f29096752ab79fb564d4 to your computer and use it in GitHub Desktop.
Apache Maven Assembly Plugin: Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<version>3.1.1</version> | |
<configuration> | |
<!-- get all project dependencies --> | |
<descriptorRefs> | |
<descriptorRef>jar-with-dependencies</descriptorRef> | |
</descriptorRefs> | |
<!-- MainClass in manifest make a executable jar --> | |
<archive> | |
<manifest> | |
<mainClass>YOUR_MAIN_CLASS</mainClass> | |
</manifest> | |
</archive> | |
</configuration> | |
<executions> | |
<execution> | |
<id>create-archive</id> | |
<phase>package</phase> | |
<goals> | |
<goal>single</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment