Launch4j Maven Plugin

Overview

Launch4j Maven Plugin

Originally hosted at http://9stmaryrd.com/tools/launch4j-maven-plugin/

Build Status Maven Central

Documentation

Please check this document for more detailed info on how to use the plugin. Please also check Launch4j's Configuration file page.

Version Notes

Version notes 1.7.25

  • creates parent directories of an obj file, see #99

Version notes 1.7.24

  • adds a threadSafe flag to the Mojo to properly mark that the plugin is thread safe, see #72

Version notes 1.7.23

  • adds a parallelExecution flag that will allow to run only one instance of the plugin in the given time, see #72

Version notes 1.7.22

  • upgrades to Launch4j version 3.12, see #75

Version notes 1.7.21

  • fixes issue with detecting OSX, see #58

Version notes 1.7.20

  • uses the linux64 platform when run on 64-bit Linux, see #59

Version notes 1.7.19

  • upgrades to the version 3.11 of Launch4j

Version notes 1.7.18

  • reverts changes introduced in 1.7.17, see #55

Version notes 1.7.17

  • adds support for unwrapped jar, see #55

Version notes 1.7.16

  • detects different OSX versions to properly use proper binary bundle, see #54

Version notes 1.7.15

  • allows override some properties loaded from an external Launch4j config file, see #49

Version notes 1.7.14

  • fixes issue with setting language, see #50

Version notes 1.7.13

  • upgrades maven plugins to latest versions, see #47

Version notes 1.7.12

  • adds support for missing options, see #45
    • language - please use one of the values as defined for the tag
    • trademarks - a free text used as a trademarks

Version notes 1.7.11

  • upgrades to Launch4j version 3.9

Version notes 1.7.10

  • fixes broken when not using

Version notes 1.7.9

  • adds capability of loading Launch4j native configuration file
<configuration> 
    <infile>${project.basedir}/src/main/resources/my-app-config.xmlinfile>
configuration>

By default it will take from ${project.basedir}/src/main/resources/${project.artifactId}-launch4j.xml. Plugin execution goal should be set to install. It's an optional configuration, you can either use your existing configuration as it was in previous version or use native Launch4j config file via .

Version notes 1.7.8

  • fixes issue with spaces in path to maven repository on non-Windows systems, see #27, #28

Version notes 1.7.7

  • once again fixes problem with including dependencies in scope runtime (now it should be the final solution), see #5
  • adds support for bundledJreAsFallback and bundledJre64Bit properties, see #23
  • upgrades Launch4j to 3.8.0, see #21

Version notes 1.7.6

  • fixes again problem with including dependencies in scope runtime, see #5

Version notes 1.7.5

  • allows add custom headers and libraries to working dir #22

Version notes 1.7.4

  • fixes type in default value for outfile parameter #17

Version notes 1.7.3

  • uses Maven annotation instead of JavaDoc parameters #15
  • upgrades Maven plugins #15
  • converts tabs to spaces 5b0619

Version notes 1.7.2

  • adds support for restartOnCrash Launch4j's option #14

Version notes 1.7.1

  • launch4j's abeille dependency was excluded #11
  • versions of several plugins were updated #11
  • tabs were converted to spaces #11

Version notes 1.7

  • uses the latest version of Launch4j (3.5.0)
  • contains support for runtimeBits, see #6
  • fixes problem with including dependencies in scope runtime, see #5

Version notes 1.6

  • dropped Launch4j source and based on artifacts from Maven Central, see #8
  • uses the latest version of Launch4j (3.4.0)
  • at least Java 1.7 is required

FAQ

Q: I cannot build my project because dsol-xml dependency is missing?

A: Add this repository to your ~/.m2/settings.xml

<repositories>
    <repository>
        <id>dsol-xmlid>
        <name>Simulation @ TU Delftname>
        <url>http://simulation.tudelft.nl/maven/url>
    repository>
repositories>

Q: Where can I find -SNAPSHOT builds?

A: Use the Sonatype OSS repo

<repositories>
    <repository>
        <id>sonatype-nexus-snapshotsid>
        <name>Sonatype Nexus Snapshotsname>
        <url>https://oss.sonatype.org/content/repositories/snapshots/url>
        <releases>
            <enabled>falseenabled>
        releases>
        <snapshots>
            <enabled>trueenabled>
        snapshots>
    repository>
repositories>

Q: Can I use Launch4j on 64bit OS?

A: Yes but you will have to install these libs to avoid problems:

  • lib32z1
  • lib32ncurses5
  • lib32bz2-1.0 (has been ia32-libs in older Ubuntu versions)
  • zlib.i686
  • ncurses-libs.i686
  • bzip2-libs.i686

See #4 for more details.

Comments
  • <addDependencies> does not add runtime scope

    does not add runtime scope

    With addDependencies=true dependencies set with a 'runtime' scope do not seem to be added to the classpath. The resulting .exe cannot find these dependencies. If you run with mvn -X you can see where the dependencies lists no runtime scopes.

    feature 1.7 
    opened by javaboy79 33
  • bug: language property not evaluated correctly

    bug: language property not evaluated correctly

    I have the following configuration:

    <configuration>
    	...
    	<versionInfo>
    		...
    		<language>ENGLISH_US</language>
    	</versionInfo>
    	...
    </configuration>
    

    but the generated EXE file has language tag "Albanian" set in "details".

    When I use the same configuration in launch4j standalone program, it works well...

    opened by tofi86 22
  • Add support to runtimeBits

    Add support to runtimeBits

    Hi,

    Would be nice if the runtimeBits was supported.

    Maven output:

    Unable to parse configuration of mojo com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.5.2:launch4j for parameter runtimeBits: Cannot find 'runtimeBits' in class com.akathist.maven.plugins.launch4j.Jre
    

    Thanks

    feature 1.7 
    opened by efernandesng 16
  • Support for 64bit

    Support for 64bit

    While I really love the plugin, I run into problems when trying to use this plugin on 64bit Ubuntu:

    net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/var/lib/jenkins/jobs/com.cedarsoft.deger/workspace/.repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-linux/bin/windres": error=2, No such file or directory
        at net.sf.launch4j.Builder.build(Builder.java:144)
        at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:353)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/var/lib/jenkins/jobs/com.cedarsoft.deger/workspace/.repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-linux/bin/windres": error=2, No such file or directory
        at net.sf.launch4j.Util.exec(Util.java:152)
        at net.sf.launch4j.Cmd.exec(Builder.java:205)
        at net.sf.launch4j.Builder.build(Builder.java:97)
        ... 22 more
    Caused by: java.io.IOException: Cannot run program "/var/lib/jenkins/jobs/com.cedarsoft.deger/workspace/.repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-linux/bin/windres": error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
        at java.lang.Runtime.exec(Runtime.java:617)
        at java.lang.Runtime.exec(Runtime.java:485)
        at net.sf.launch4j.Util.exec(Util.java:117)
        ... 24 more
    Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
        at java.lang.ProcessImpl.start(ProcessImpl.java:130)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
        ... 27 more
    
    automerge 
    opened by jschneider 14
  • Splash screen is not shown when created with the Maven plug-in

    Splash screen is not shown when created with the Maven plug-in

    The issue is that the Splash screen is not shown at the start of the Windows executable when build with the plugin. HOWEVER it does show when run with Java -JAR and also when the EXE is created with the Launch4J GUI program. To reproduce this issue I created a very simple Java Swing application which says Hello World Github

    I posted the isseu on Stackoverflow see , but no answers,

    When build with Maven a JAR is generated.

    • Run with Java -JAR: splash is OK.
    • With the Lauch4J GUI application the EXE is build from the same JAR: splash is OK
    • When build with the plug-in: splash NOT OK, not shown.

    BTW for this example I used the code of Github nicatronica

    opened by Forgev41 13
  • Update to Launch4J 3.50

    Update to Launch4J 3.50

    Launch4J 3.50 has recently been released, which improves support for finding preinstalled and bundled JREs. I have had issues with Launch4J executables not finding OpenJDK 17 runtimes in some corporate IT setups, and the new version of Launch4J looks like it could improve this situation.

    It does include some changes to the names of configuration properties, which I don't believe will impact launch4j-maven-plugin directly, though it will impact users of it who would have to update their POMs accordingly.

    opened by ianrenton 12
  • Workdir issues

    Workdir issues

    I am running the launch4j maven plugin in an automated build through gitlab runner on a windows server and it is using the system profile. The command

    C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\bin\ld.exe
    -mi386pe --oformat pei-i386 --dynamicbase --nxcompat --no-seh --subsystem windows -s
    C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\w32api\crt2.o
    C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\head\guihead.o
    C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\head\head.o
    C:\Windows\TEMP\launch4j4260037253500529036o
    C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\w32api\libmingw32.a
    ...
    

    (line breaks for readability) fails with serveral messages:

    [INFO] --- launch4j-maven-plugin:1.7.15:launch4j (default) @ danae ---
    [INFO] launch4j: Compiling resources
    [INFO] launch4j: Linking
    [INFO] launch4j: C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\
    3.9\launch4j-3.9-workdir-win32\bin\ld.exe: cannot find C:\Windows\system32\config\systemprofile\
    .m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\w32api\crt2.o: No such file or directory
    [INFO] launch4j: C:\Windows\system32\config\systemprofile\.m2\repository\net\sf\launch4j\launch4j\
    3.9\launch4j-3.9-workdir-win32\bin\ld.exe: cannot find C:\Windows\system32\config\systemprofile
    \.m2\repository\net\sf\launch4j\launch4j\3.9\launch4j-3.9-workdir-win32\head\guihead.o: No such file or directory
    ...
    

    (again line breaks for readability) I can't figure out why this fails. The files do exist. When I call the command manually from the command line with my regular windows user, it fails as well. If I move the w32api folder to a different location, say C:\win32api, and modify the command accordingly, ld.exe can suddenly find the files.

    I suspect that this is somehow an issue with the system profile / SYSTEM user. I saw in the code that there is this whole rationale behind extracting the workdir into the maven repository. Is it at all feasible to use a temp folder instead?

    opened by Tillerino 12
  • Cannot add dependency

    Cannot add dependency

    First, thank for your plugin but I have a problem with it. Actually, I use some library like apache-common but I cannot build (with assembly plugin) an exe with library in int :/ I try the addDependency param but didn't work (or I use it wrong ?). I try to build after the assembly plugin create the jar whit dependency but I didn't succeed :/ Can you tell me how to add these dependency in the exe ? You can check the pom file there : https://github.com/Tutul-/NaheulCraft-Updater/blob/master/pom.xml

    opened by Tutul- 10
  • Launch4j fails on SLES

    Launch4j fails on SLES

    The maven build runs without issues on my windows laptop.

    On our build server (SLES) I get the following error:

    [ERROR]

    net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/global/apps/cdbuilt/build_server/maven/connecteddrive/local-repo-maven-3/net/sf/launch4j/launch4j/3.9/launch4j-3.9-workdir-linux/bin/windres": error=2, No such file or directory
    	at net.sf.launch4j.Builder.build(Builder.java:149)
    	at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:402)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/global/apps/cdbuilt/build_server/maven/connecteddrive/local-repo-maven-3/net/sf/launch4j/launch4j/3.9/launch4j-3.9-workdir-linux/bin/windres": error=2, No such file or directory
    	at net.sf.launch4j.Util.exec(Util.java:160)
    	at net.sf.launch4j.Cmd.exec(Builder.java:215)
    	at net.sf.launch4j.Builder.build(Builder.java:100)
    	... 22 more
    Caused by: java.io.IOException: Cannot run program "/global/apps/cdbuilt/build_server/maven/connecteddrive/local-repo-maven-3/net/sf/launch4j/launch4j/3.9/launch4j-3.9-workdir-linux/bin/windres": error=2, No such file or directory
    	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    	at java.lang.Runtime.exec(Runtime.java:620)
    	at java.lang.Runtime.exec(Runtime.java:485)
    	at net.sf.launch4j.Util.exec(Util.java:128)
    	... 24 more
    Caused by: java.io.IOException: error=2, No such file or directory
    	at java.lang.UNIXProcess.forkAndExec(Native Method)
    	at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
    	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    	... 27 more
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 21.998 s
    [INFO] Finished at: 2017-01-07T20:37:54+01:00
    [INFO] Final Memory: 76M/661M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.15:launch4j (launch4j) on project pom-root: Failed to build the executable; please verify your configuration. net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/global/apps/cdbuilt/build_server/maven/connecteddrive/local-repo-maven-3/net/sf/launch4j/launch4j/3.9/launch4j-3.9-workdir-linux/bin/windres": error=2, No such file or directory -> [Help 1]
    
    opened by bjking2 8
  • NullPointerException, missing headerType... Except it's there.

    NullPointerException, missing headerType... Except it's there.

    Hello. I just tried using launch4j-maven-plugin but I can't make it work. I get the following error ;

    [ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.10:launch4j (default-cli) on project gaiaTerminal: Execution default-cli of goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.10:launch4j failed. NullPointerException -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.10:launch4j (default-cli) on project gaiaTerminal: Execution default-cli of goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.10:launch4j failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.10:launch4j failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
    Caused by: java.lang.NullPointerException
        at net.sf.launch4j.config.Config.getHeaderType(Config.java:195)
        at net.sf.launch4j.config.Config.checkInvariants(Config.java:136)
        at net.sf.launch4j.config.Config.validate(Config.java:154)
        at net.sf.launch4j.Builder.build(Builder.java:74)
        at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:358)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 21 more
    

    I checked my pom file but headerType was there. I tried replacing my configuration with the one straight from the documentation, changing only the main class, but I got the same error. Here is the relevant part of the pom file :

        <groupId>com.akathist.maven.plugins.launch4j</groupId>
        <artifactId>launch4j-maven-plugin</artifactId>
        <executions>
            <execution>
                <id>l4j-clui</id>
                <phase>package</phase>
                <goals>
                    <goal>launch4j</goal>
                </goals>
                <configuration>
                    <headerType>console</headerType>
                    <outfile>target/encc.exe</outfile>
                    <jar>target/encc-1.0.jar</jar>
                    <errTitle>encc</errTitle>
                    <classPath>
                        <mainClass>com.bonduelle.gaia.GaiaTerminal</mainClass>
                        <addDependencies>false</addDependencies>
                        <preCp>anything</preCp>
                    </classPath>
                    <jre>
                        <minVersion>1.5.0</minVersion>
                        <opts>
                            <opt>-Djava.endorsed.dirs=./endorsed</opt>
                        </opts>
                    </jre>
                    <versionInfo>
                        <fileVersion>1.2.3.4</fileVersion>
                        <txtFileVersion>txt file version?</txtFileVersion>
                        <fileDescription>a description</fileDescription>
                        <copyright>my copyright</copyright>
                        <productVersion>4.3.2.1</productVersion>
                        <txtProductVersion>txt product version</txtProductVersion>
                        <productName>E-N-C-C</productName>
                        <internalName>ccne</internalName>
                        <originalFilename>original.exe</originalFilename>
                    </versionInfo>
                </configuration>
            </execution>
        </executions>
    </plugin>
    

    Any idea what is wrong? Thanks in advance.

    opened by BugFactory323 8
  • Error building on Mac

    Error building on Mac

    Caused by: org.apache.maven.plugin.MojoExecutionException: Launch4j native configuration file [/path/to/tool/src/main/resources/toolname-launch4j.xml] does not exist!

    opened by umurpza 8
  • Default values for configuration, especially VersionInfo

    Default values for configuration, especially VersionInfo

    Version notes 2.3.0 - 2022-12-30

    • provides default values for plugin configuration, especially for <VersionInfo>, see Issue #98
    <errTitle>${project.name}</errTitle>
    
    <versionInfo>
      <fileVersion>${project.version} converted into a format "x.x.x.x"</fileVersion>
      <txtFileVersion>${project.version}</txtFileVersion>
      <fileDescription>${project.description}</fileDescription>
      <copyright>Copyright © ${project.inceptionYear}-${currentYear} ${project.organization.name}. All rights reserved.</copyright>
      <productName>${project.name}</productName>
      <internalName>${project.artifactId}</internalName>
      <productVersion>${project.version} converted into a format "x.x.x.x"</productVersion>
      <txtProductVersion>${project.version}</txtProductVersion>
      <companyName>${project.organization.name}</companyName>
      <trademarks>${project.organization.name}</trademarks>
      <originalFilename><!-- last path segment of the <outfile> configuration --></originalFilename>
    </versionInfo>
    

    In addition the companyName and trademarks default value proposal is a ${project.organization.name}.

    • adds a disableVersionInfoDefaults parameter to be able to disable provided defaults
    • adds documentation notes regarding a new defaults, see VERSIONINFO.md inside changed files tab.
    • new unit tests for default VersionInfo values generation was created
    • throwing exceptions with detailed description of default values formula, when cannot fulfill default values (no configuration data for formula), it helps plugin user with debugging what is wrong. Example: [ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:2.3.0-SNAPSHOT:launch4j (l4j-gui) on project launch4j-demo: Cannot fill out VersionInfo by defaults: Please fill the missing configuration values. Error when trying to fulfill default value for VersionInfo parameter:'fileDescription' with formula params:'${project.description}'. -
    opened by koksyn 0
  • Please give an update of the package list to install

    Please give an update of the package list to install

    The library name pattern with "32" in it is an old pattern that is not supported anymore. But even after renaming and adding support for i386, I'm still getting the issue:

        sudo dpkg --add-architecture i386
        sudo apt-get -y update
        sudo apt-get -y install libz1:i386 libncurses5:i386 libbz2-1.0:i386
    

    Cannot run program "/root/.m2/repository/net/sf/launch4j/launch4j/3.14/launch4j-3.14-workdir-linux64/bin/windres": error=2, No such file or directory -> [Help 1]

    Before that it says:

    [INFO] [INFO] launch4j: Compiling resources [INFO] [INFO] launch4j: Generated resource file...

    Normal execution path is:

    [INFO] [INFO] launch4j: Compiling resources [INFO] [INFO] launch4j: Linking [INFO] [INFO] launch4j: Wrapping

    Originally posted by @nbauma109 in https://github.com/lukaszlenart/launch4j-maven-plugin/issues/4#issuecomment-1032280318

    Also tried to follow the FAQ:

    lib32z1 lib32ncurses5 lib32bz2-1.0 (has been ia32-libs in older Ubuntu versions) zlib.i686 ncurses-libs.i686 bzip2-libs.i686

    The last 3 libs would not install. They seem to be for CentOS (https://github.com/lukaszlenart/launch4j-maven-plugin/issues/4#issuecomment-63477533) I'm using Ubuntu 20.

    opened by nbauma109 7
  • Provide defaults, especially for version info.

    Provide defaults, especially for version info.

    After several years of intending to try Launch4j, I've finally got around to testing it with your Maven plugin. I've just got things working, and your Maven plugin so far seems to make the process really snazzy.

    In the spirit of Maven (and many of its plugins), which provides reasonable defaults for many properties, I'd like to propose that you provide reasonable defaults. For example for <errTitle> you could default to

    <errTitle>${project.name}</errTitle>
    

    But most importantly defaults for <versionInfo> would really help. After a bit of experimentation, let me suggest the following. (You may be able to improve upon these.)

    <versionInfo>
      <fileVersion>${project.baseVersion}.0</fileVersion>
      <txtFileVersion>${project.version}</txtFileVersion>
      <fileDescription>${project.description}</fileDescription>
      <copyright>Copyright © ${project.inceptionYear}-${build.year} ${project.organization.name}. All rights reserved.</copyright>
      <productName>${project.name}</productName>
      <internalName>${project.artifactId}</internalName>
      <productVersion>${project.baseVersion}.0</productVersion>
      <txtProductVersion>${project.version}</txtProductVersion>
    </versionInfo>
    

    Versions

    Note that Launch4j seems to require a version in the format x.x.x.x, so we can't just use ${project.version} (although we can use that for the text variations). So we have to take the base Maven project version and add an .0 to it. One can get the base version number using the following. (I'm sure your plugin can determine the whole thing programmatically internally without the need for an extra plugin.)

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>build-helper-maven-plugin</artifactId>
      <version>3.0.0</version>
      <executions>
        <execution>
          <id>set-project-base-version</id>
          <goals>
            <goal>regex-property</goal>
          </goals>
          <configuration>
            <name>project.baseVersion</name>
            <value>${project.version}</value>
            <regex>-SNAPSHOT</regex>
            <failIfNoMatch>false</failIfNoMatch>
          </configuration>
        </execution>
      </executions>
    </plugin>
    

    Note that this will only work if the project version has the format x.x.x with optional -SNAPSHOT. If the project version has fewer or more components, the final number of components won't be correct. But if you set this programmatically in the plugin, then none of this matters; you can ensure the correct number of components when building the default string, and won't even need this extra plugin in the POM.

    Copyright

    The copyright message was inspired by the Maven Javadoc Plugin, which uses a bottom copyright message of:

    Copyright © {inceptionYear}–{currentYear} {organizationName}. All rights reserved.

    There is no real need to escape the © symbol. Note that the en dash symbol doesn't show up well (at least on Windows 10 in the properties dialog details tab), so I (sadly) switched to using a normal dash - symbol. I also had to update the other properties to use the latest Maven convention. And lastly in order to get ${build.year} you'll need to set that property. You can do this with a separate plugin, but again, this is something you can undoubtedly do programmatically within your own plugin.

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>build-helper-maven-plugin</artifactId>
      <version>3.0.0</version>
      <executions>
        <execution>
          <id>set-build-year</id>
          <goals>
            <goal>timestamp-property</goal>
          </goals>
          <configuration>
            <locale>en</locale>
            <name>build.year</name>
            <pattern>yyyy</pattern>
          </configuration>
        </execution>
      </executions>
    </plugin>
    

    Original Filename

    For the <originalFilename>, you should just use the last path segment of the <outfile> configuration as the default value. Because after all, since that is the name of the file you are generating, that could reasonably be said to be the original filename. 😄

    opened by garretwilson 3
  • Add support to build on ARM

    Add support to build on ARM

    This PR adds support to build on ARM devices as requested in #65. This PR depends on the changes in launch4j: https://github.com/mirror/launch4j/pull/4

    opened by akuhtz 0
  • Build breaking in ARM linux environment

    Build breaking in ARM linux environment

    Build breaks in ARM linux environment. Trace below:

    net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (126): /var/services/homes/user/.m2/repository/net/sf/launch4j/launch4j/3.11/launch4j-3.11-workdir-linux/bin/windres --preprocessor=cat -J rc -O coff -F pe-i386 /tmp/launch4j3613287198034571867rc /tmp/launch4j2006314587552851974o
    	at net.sf.launch4j.Builder.build(Builder.java:149)
    	at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:403)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: net.sf.launch4j.ExecException: Exec failed (126): /var/services/homes/user/.m2/repository/net/sf/launch4j/launch4j/3.11/launch4j-3.11-workdir-linux/bin/windres --preprocessor=cat -J rc -O coff -F pe-i386 /tmp/launch4j3613287198034571867rc /tmp/launch4j2006314587552851974o
    	at net.sf.launch4j.Util.exec(Util.java:156)
    	at net.sf.launch4j.Cmd.exec(Builder.java:215)
    	at net.sf.launch4j.Builder.build(Builder.java:100)
    	... 23 more
    

    ... is there a workaround for this? A way to disable the plugin from the command line?

    opened by cjritola 6
Releases(launch4j-maven-plugin-2.2.0)
  • launch4j-maven-plugin-2.2.0(Nov 21, 2022)

    What's Changed

    • Bump actions/checkout from 3.0.2 to 3.1.0 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/192
    • Bump actions/cache from 3.0.10 to 3.0.11 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/194
    • Bump doxia-module-markdown from 1.9.1 to 1.11.1 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/191
    • Bump doxia-core from 1.9.1 to 1.11.1 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/193
    • Bump maven-site-plugin from 3.9.0 to 3.12.1 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/195
    • Bump maven-plugin-plugin from 3.6.4 to 3.7.0 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/197
    • Bump maven-plugin-annotations from 3.6.4 to 3.7.0 by @dependabot in https://github.com/orphan-oss/launch4j-maven-plugin/pull/198
    • Upgrades to Launch4j 3.50 by @lukaszlenart in https://github.com/orphan-oss/launch4j-maven-plugin/pull/200

    Full Changelog: https://github.com/orphan-oss/launch4j-maven-plugin/compare/launch4j-maven-plugin-2.1.3...launch4j-maven-plugin-2.2.0

    Source code(tar.gz)
    Source code(zip)
maven plugin for making chmod +x jar files

To use it, add a plugin to your pom like <!-- You need to build an exectuable uberjar, I like Shade for that --> <plugin> <groupId>org.apache.mave

Brian McCallister 113 Dec 8, 2022
Maven plugin to help creating CHANGELOG by keeping one format and solving merge request conflicts problem by extraction of new CHANGELOG entries to seperate files.

keep-changelog-maven-plugin CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important cha

Piotr Zmilczak 22 Aug 28, 2022
AspectJ Maven Plugin

AspectJ Maven Plugin Overview This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ajc. Typically, aspects are used in one

null 19 Dec 9, 2022
Plugin-fineagent - A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter.

plugin-fineagent A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter. Use the mvn clean package command to compile and use F

null 19 Jun 25, 2022
A BurpSuite plugin for BBRF

bbrf-burp-plugin What's BBRF? The Bug Bounty Reconnaissance Framework (BBRF) is intended to facilitate the workflows of security researchers across mu

Pieter 19 Jun 22, 2022
HopLa Burp Suite Extender plugin - Adds autocompletion support and useful payloads in Burp Suite

HopLa ?? All the power of PayloadsAllTheThings, without the overhead. This extension adds autocompletion support and useful payloads in Burp Suite to

Synacktiv 522 Dec 24, 2022
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutter Process Text Plugin is known for : Flutter Process Text

Divyanshu Shekhar 14 Jul 1, 2022
Ask and replay plugin for Mirai-Console

EntryLib EntryLib 是一个基于 Mirai-Console 的插件,用于实现群词条、自定义回复或更多功能。 目录 声明 使用方法 基本指令列表 额外说明 配置项 控制台 数据库结构 To-Do List 插件依赖 声明 本插件仅作为学习交流等使用,请勿用于盈利,否则法律后果自负。 欢

Bill Yang 33 Oct 25, 2022
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Compatibility ✅ Android ❌ iOS (active issue: iOS support) Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutte

Devs On Flutter 14 Jul 1, 2022
This simple Android Studio plugin includes keyboard shortcuts for many common actions.

Hotkeys This simple Android Studio plugin includes keyboard shortcuts for many common actions. Features • Build process • Contribute • License Feature

SACHIN KASARADDI 14 Apr 26, 2022
A simple but helpful fight plugin with rank support

RankFight A simple but helpful fight plugin with rank support HighLights PlceholderAPI Support %rankfight_rank% %rankfight_credit% %rankfight_shopCred

贺兰星辰 5 Nov 20, 2021
Ghidra Wasm plugin with disassembly and decompilation support

Module to load WebAssembly files into Ghidra, supporting disassembly and decompilation. This plugin borrows loader functionality from this repo: https

Garrett Gu 54 Nov 22, 2022
The best plugin to protect anarchy servers and mc servers in general against op attacks.

AdminSecure The best plugin to protect anarchy servers and mc servers in general against op attacks How does it work? When the server detects a player

PK2_Stimpy 3 Sep 2, 2021
Source code of Trend's Manhunt plugin

Trend's Manhunt This is the official repository of my Manhunt plugin. Contribution You are allowed to contribute, but NOT to yoink all of my plugin co

flpae 1 Oct 19, 2022
A Flutter plugin to extract waveform data from an audio file suitable for visual rendering.

just_waveform This plugin extracts waveform data from an audio file that can be used to render waveform visualisations. Usage final progressStream = J

null 53 Dec 4, 2022
GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

GamesMC Studios 4 Jan 14, 2022
Googleads-mobile-flutter - A Flutter plugin for the Google Mobile Ads SDK

Google Mobile Ads for Flutter This repository contains the source code for the Google Mobile Ads Flutter plugin, which enables publishers to monetize

Google Ads 251 Jan 2, 2023
QuickShell is an Eclipse plugin to use Java JShell inside the Eclipse IDE.

QuickShell is an Eclipse plugin to use Java JShell (REPL) inside Eclipse IDE. JDK 9+ is not installed on your system? No worries, you can still use Qu

Nilesh Khaire 8 Oct 3, 2022
Spotless-intellij-gradle - An IntelliJ plugin to allow running the Spotless gradle task from within the IDE.

Spotless Intellij Gradle An IntelliJ plugin to allow running the spotless gradle task from within the IDE on the current file selected in the editor.

Ryan Gurney 30 Dec 17, 2022