Closed valimaties closed 1 year ago
Hi @valimaties!
JavaPackager combines several existing plugins, instead of creating everything from scratch, and avoid reinventing the wheel. In some cases, libraries independent of the building tool are used, such as to generate DEB and RPM files.
Besides this, JavaPackager is a hybrid plugin, which means that the same plugin works with Gradle and Maven.
When generating EXE files on Windows using Launch4j, what it had were plugins, one for Maven (launch4j-maven-plugin
) and another for Gradle (gradle-launch4j
). It's not possible to reuse them because they are coupled to their context (one is coupled to Maven and the other one is coupled to Gradle).
In the case of Maven (plugins are composed of MOJOs), JP uses mojo-executor (org.twdata.maven:mojo-executor:2.3.0
), which allows JP to run Maven plugins, just as you pointed:
So, when the developer uses Maven+Launch4j, JP runs com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:2.1.1
.
But, in the case of Gradle, JP runs the plugin's tasks directly (plugins are composed of Tasks):
So, when the developer uses Gradle+Launch4j, JP uses io.github.fvarrui:launch4j:2.5.2
.
Different building tools, different plugins, but "same" result.
Its ok, maybe the "bug" is to much say, but I wanted to know that is no problem that IDE display that warning message about POM file. Thanks!
I also have to say that io.github.fvarrui:launch4j:2.5.2 is a fork of edu.sc.seis.launch4j:launch4j:3.0.3. I had to do this to publish gradle-launch4j
plugin to Maven Central, as the latest versions are only found on the Gradle Plugin Portal, so using JP with Maven caused a missing dependency issue. I have solved this problem recently, thanks to someone helping to improve the build.gradle
. So no need to use my own version of gradle-launch4j anymore, just the original one, which makes it easier to update this dependency.
The POM for io.github.fvarrui:launch4j:jar:2.5.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
This is just a warning you don't have to worry about, as it has been recently fixed!
Thanks!! I hope I have explained myself 😄
I'm submitting a…
Short description of the issue/suggestion: In build.gradle file you have implementation for launch4j as:
However, in
CreateWindowsExeLaunch4j.java
class frommaven
folder you have this code for invoking the plugin:Is this correct? Because when I package my maven project I get an warning saying that
I searched for the 2.5.2 version of this plugin for maven, but the latest one is 2.4.1 on MavenCentral.
https://mvnrepository.com/artifact/com.akathist.maven.plugins.launch4j/launch4j-maven-plugin
Steps to reproduce the issue/enhancement:
What is the expected behavior?
What is the current behavior?
Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)