Closed nculijun closed 3 years ago
Hi @nculijun,
Thank you for raising this issue. I would happily help if you could explain a little bit more in details the problem you are having:
Bear in mind that the jars are not intended to be executable jars out of the box, I am not sure I defined the manifest in the poms to generate executable jars...
Best regards, Dario
Thank you very much,I tried to packaging the module:"eu.dariolucia.ccsds.sle.utlfx" . This issue may be related to JDK 11 and JFX compatibility. I solved the deployment problem in the following ways:
package eu.dariolucia.ccsds.sle.utlfx.application;
import javafx.application.Application;
public class AppStart {
public static void main(String[] args) {
Application.launch(SleFxTestTool.class,args);
}
}
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
</configuration>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/install/libs</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>eu.dariolucia.ccsds.sle.utlfx.application.AppStart</mainClass>
</manifest>
</archive>
<outputDirectory>${project.build.directory}/install</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
Thank you for this, I will probably update the pom files to have this done for all the UI-based applications!
Thank you so much to share this snippet! I integrated it into the code, and gave you credits on the Readme.MD files :)
I've tried packaging it as an executable JAR,But the jar has some problem.