petr-panteleyev / jpackage-maven-plugin

JPackage Maven Plugin
https://codeberg.org/petr-panteleyev/jpackage-maven-plugin
BSD 2-Clause "Simplified" License
37 stars 8 forks source link

"<type>APP_IMAGE</type>" Creates path with over 3200 Chars Length and Crashes the Build #15

Open ingomohr opened 2 hours ago

ingomohr commented 2 hours ago

Scenario

GIVEN I am on Windows 10 with Java 21 and Wix3 installed GIVEN I want to use --type app-image in the jpackage call, so that I don't get an installer but the app folder instead WHEN I use <type>APP_IMAGE</type> in my plugin configuration WHEN I call mvn clean package and then mvn jpackage:jpackage THEN the build (after 1 minute or so) aborts with error message

AND

My Configuration in pom.xml

<plugin>
    <groupId>org.panteleyev</groupId>
    <artifactId>jpackage-maven-plugin</artifactId>
    <version>1.6.5</version>
    <executions>
    <execution>
        <goals>
            <goal>jpackage</goal>
        </goals>
    </execution>
    </executions>
    <configuration>
        <input>${project.build.directory}</input>
        <mainJar>${project.build.finalName}.jar</mainJar>
        <type>APP_IMAGE</type>
        <name>hello-jpackage</name>
        <appVersion>1.0</appVersion> <!-- version prop cannot be used because "0-SNAPSHOT" is illegal -->
        <vendor>MyVendor</vendor>
        <destination>${project.build.directory}/jpackage</destination>
        <winConsole>true</winConsole>
        <javaOptions>
            <option>-Dfile.encoding=UTF-8</option>
        </javaOptions>
    </configuration>
</plugin>
ingomohr commented 2 hours ago

I also tried this w/ <destination>${project.build.directory}/jpackage-build</destination> (in case folder "jpackage" is some magic folder in the implementation). Same effect.

ingomohr commented 2 hours ago

Workaround

It works with <destination>jpackage-build</destination> - i.e. apparently as long I don't use something inside the target folder, the build successfully finishes, and I can run that build.

Problem is that mvn clean won't delete that destination folder because it's not in target.