Я пытаюсь создать файл exe
с помощью Launch4j, но на самом деле кажется, что Maven не обнаруживает, что у меня подключен плагин к фазе package
.
Это мой pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.project1616</groupId>
<artifactId>Project16x16</artifactId>
<version>1.0.0</version>
<name>Project16x16</name>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>repo</id>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>core</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>DM</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>gicentreUtils</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx-swt</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.base</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.controls</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.fxml</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.graphics</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.media</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.swing</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>javafx.web</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>13</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.project16x16.sidescroller.SideScroller</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.25</version>
<executions>
<execution>
<id>l4j-clui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<jar>${project.build.directory}/Project16x16-1.0.0-jar-with-dependencies.jar</jar>
<outfile>${project.build.directory}/${project.artifactId}.exe</outfile>
<downloadUrl>http://java.com/download</downloadUrl>
<pluginArtifacts>${plugin.artifacts}</pluginArtifacts>
<jre>
<path>C:\Program Files\Java\jdk-12.0.2</path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion></minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Это журнал, который я получаю, когда запускаю команду mvn package
:
[INFO]
[INFO] --------------------< org.project1616:Project16x16 >--------------------
[INFO] Building Project16x16 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ Project16x16 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 57 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Project16x16 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ Project16x16 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\myDir\Project16x16\source\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Project16x16 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\myDir\Project16x16\source\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ Project16x16 ---
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ Project16x16 ---
[INFO] Building jar: C:\myDir\Project16x16\source\target\Project16x16-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.193 s
[INFO] Finished at: 2019-10-08T20:46:06+02:00
[INFO] ------------------------------------------------------------------------
Как видите, плагин никогда не выполнялся. В моем pom.xml
я уже отключил все фазы, но, похоже, он ничего не делает.
Любая помощь приветствуется! Спасибо