Skip to content

Instantly share code, notes, and snippets.

@Da9el00
Last active March 3, 2025 15:28
Show Gist options
  • Save Da9el00/df8efbc8de53cd39463c05cbeb0503d3 to your computer and use it in GitHub Desktop.
Save Da9el00/df8efbc8de53cd39463c05cbeb0503d3 to your computer and use it in GitHub Desktop.
Plugin to make JavaFX executable jar with Maven
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>Your_main_class_here</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
@Balaram91-del
Copy link

when i click on the shaded jar file its not running . How can i make it run ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment