Skip to content

Commit

Permalink
Add maven assembly plugin to create a runnable jar. Part of #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed Oct 7, 2020
1 parent 699bc7c commit 66a4c05
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@
</gitDescribe>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>eu.snik.tag.gui.MainWrapper</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
8 changes: 8 additions & 0 deletions src/main/eu.snik.tag/eu/snik/tag/gui/MainWrapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package eu.snik.tag.gui;

/** Workaround for the jar execution error "Error: JavaFX runtime components are missing, and are required to run this application".
* See https://stackoverflow.com/questions/52653836/maven-shade-javafx-runtime-components-are-missing .*/
public class MainWrapper
{
public static void main(String[] args) {Main.main(args);}
}

0 comments on commit 66a4c05

Please sign in to comment.