Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the JavaPackager maven plugin, on a project without dependencies fails #27

Closed
bdemers opened this issue Apr 15, 2020 · 2 comments
Closed

Comments

@bdemers
Copy link

bdemers commented Apr 15, 2020

Basic usage with no dependencies fails, adding any dependency resolves the problem

mvn --version:

mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/<user>/.sdkman/candidates/maven/current
Java version: 11.0.6, vendor: Amazon.com Inc., runtime: /Users/<user>/.sdkman/candidates/java/11.0.6-amzn
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"

pom:

            <plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>0.9.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <mainClass>com.example.Application</mainClass>
                            <bundleJre>true</bundleJre>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
[INFO] Bundling JRE ... with /Users/<user>/.sdkman/candidates/java/11.0.6-amzn
[INFO] Getting required modules ... 
[info] Executing command: /bin/bash -c /Users/<user>/.sdkman/candidates/java/11.0.6-amzn/bin/jdeps -q --multi-release 11 --list-deps /Users/<user>/example/target/my-example/my-example.app/Contents/Resources/Java/libs/*.jar /Users/<user>/example/target/my-example-0.1.0-SNAPSHOT-runnable.jar
[info] Warning: Path does not exist: /Users/<user>/example/target/my-example/my-example.app/Contents/Resources/Java/libs/*.jar
[info]    java.base
[info]    java.desktop
[INFO] - Modules: [Warning: Path does not exist: , java.base, java.desktop]
[INFO] Creating JRE with next modules included: Warning: Path does not exist: ,java.base,java.desktop
[info] Executing command: /bin/bash -c /Users/<user>/.sdkman/candidates/java/11.0.6-amzn/bin/jlink --module-path /Users/<user>/.sdkman/candidates/java/11.0.6-amzn/jmods --add-modules Warning: Path does not exist: ,java.base,java.desktop --output /Users/<user>/example/target/my-example/my-example.app/Contents/PlugIns/jre/Contents/Home --no-header-files --no-man-pages --strip-debug --compress=2
[info] Error: invalid argument: Path does not exist: ,java.base,java.desktop --output /Users/<user>/example/target/my-example/my-example.app/Contents/PlugIns/jre/Contents/Home --no-header-files --no-man-pages --strip-debug --compress=2
[info] Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
[info] Use --help for a list of possible options
@fvarrui
Copy link
Owner

fvarrui commented Apr 15, 2020

Hi @bdemers,

You are right! Sorry, JavaPackager didn't contemplate that possibility :_(. It's solved in 0.9.5-SNAPSHOT, and tested on Windows.

If it's solved for you, I'll publish 0.9.5 on Maven Central as soon as possible.

Thanks!!

@fvarrui fvarrui reopened this Apr 15, 2020
@fvarrui
Copy link
Owner

fvarrui commented Apr 17, 2020

Fixed on v0.9.5

@fvarrui fvarrui closed this as completed Apr 17, 2020
fvarrui added a commit that referenced this issue Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants