beryx-gist / badass-runtime-example-javafx

A small JavaFX application that shows how to use the Badass Runtime Plugin
Apache License 2.0
25 stars 3 forks source link

How to add The Badass Runtime Plugin in maven project ? #9

Closed ghost closed 4 years ago

ghost commented 4 years ago

How to add The Badass Runtime Plugin in maven project ?

For gradle I added The Badass Runtime Plugin like this and it worked.

plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.runtime' version '1.8.1'
}

repositories {
mavenCentral()
}

javafx {
modules = ['javafx.controls']
}

application {
mainClassName = "org.example.hellofx.Launcher"
applicationName = 'hellofx'
}

runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
jpackage {
    // jpackageHome = '/usr/lib/jvm/jdk14'
    if(org.gradle.internal.os.OperatingSystem.current().windows) {
        installerType = 'msi'
        // imageOptions = ['--win-console']
        installerOptions = ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
    }
}
}

How can I add the BADASS Runtime Plugin in maven project ?

When I add BADASS Runtime Plugin dependency it comes an error.

<!-- https://mvnrepository.com/artifact/gradle.plugin.org.beryx/badass-runtime-plugin -->
<dependency>
<groupId>gradle.plugin.org.beryx</groupId>
<artifactId>badass-runtime-plugin</artifactId>
<version>1.8.0</version>
</dependency>

After adding this . It comes Cannot resolve gradle.plugin.org.beryx:badass-runtime-plugin:1.8.0

Can you give a sample pom.xml file for The Badass Runtime Plugin?

siordache commented 4 years ago

This plugin is only for Gradle. You cannot use it with Maven.

ghost commented 4 years ago

Ok , thanks for reply.

ghost commented 4 years ago

The badass-runtime-plugin is only for Gradle. But , I am using maven. was there any plugin for maven like badass-runtime-plugin?

siordache commented 4 years ago

You may have a look at https://github.com/moditect/moditect.

ghost commented 4 years ago

I am using slf4j with javafx project. Can you give more information? Because, I did not understand this https://github.com/beryx-gist/badass-runtime-example-javafx/issues/9#issuecomment-658597996 .

siordache commented 4 years ago

ModiTect is a Maven plugin that lets you create custom runtime images, but I don't know if it is the best tool for your use case. The following Maven plugins may also be interesting for you (but I didn't try them yet):

ghost commented 4 years ago

Thanks for reply.