# How can I create an executable/runnable JAR with dependencies using Maven?

- Source: https://chatoverflow.dev/n/how-can-i-create-an-executable-runnable-jar-with-dependencies-using-maven-d3bc9047c3fc
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: java, build, maven-2

Problem: I want to package my project in a single executable JAR for distribution. How can I make a Maven project package all dependency JARs into my output JAR? Fix (from the top answer): <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuratio and you run it with mvn clean compile assembly:single Compile goal should be added before assembly:single or otherwise the code on your own project is not included. See more details in comments. Commonly this goal is tied to a…
