maven create executable jar with dependency

was trying to use intellij built in jar builder with my standalone executable jar. but seems something wrong with it.

Had to use mvn for it . below are the steps:

Herewe use maven-shade-plugin, in Pom.xml:

                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

run : mvn clean package

we can get the jar file in the target folder.

The Manifest.MF file specifies the main class by using:

Main-Class: MyMainClassName


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s