Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Maven integration with Launch4j using config.xml (generated by Launch4j GUI) -- imported from code.google.com/p/launch4j-xml-plugin

License

Notifications You must be signed in to change notification settings

SvenBunge/launch4j-xml-plugin

Repository files navigation

launch4j-maven-plugin

Plugin imported from https://code.google.com/p/launch4j-xml-plugin/

Some refactorings should be done and there are still no testcases. There is some work todo!

The Plugin dynamically modifies jar, outfile and adds classpath in config.xml

example usage(on package it re-generates config.xml with updated data and generates exe/exes)

<pluginRepositories>
    <pluginRepository>
        <id>launch4j-xml-plugin-repo</id>
        <name>launch4j-xml-plugin Repository for Maven</name>
        <url>https://launch4j-xml-plugin.googlecode.com/svn/repo</url>
    </pluginRepository>
</pluginRepositories>
<build>
    <plugins>
        <plugin>
            <groupId>launch4j-xml-plugin</groupId>
            <artifactId>launch4j-xml-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>exe</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <launch4jHome>C:\Program Files\Launch4j\launch4j.exe</launch4jHome>
                <configs>
                    <param>src/main/assembly/configExample.xml</param>
                    <param>src/main/assembly/configExample2.xml</param>
                </configs>
            </configuration>
        </plugin>
    </plugins>
</build>

example config.xml generated by Launch4j

<launch4jConfig>
    <dontWrapJar>false</dontWrapJar>
    <headerType>console</headerType>
    <jar>C:\bla.jar</jar>
    <outfile>C:\main.exe</outfile>
    <errTitle></errTitle>
    <cmdLine></cmdLine>
    <chdir></chdir>
    <priority>normal</priority>
    <downloadUrl>http://java.com/download</downloadUrl>
    <supportUrl></supportUrl>
    <customProcName>false</customProcName>
    <stayAlive>false</stayAlive>
    <manifest></manifest>
    <icon></icon>
    <classPath>
        <mainClass>main.Main</mainClass>
    </classPath>
    <jre>
        <path></path>
        <minVersion>1.5.0</minVersion>
        <maxVersion></maxVersion>
        <jdkPreference>preferJre</jdkPreference>
    </jre>
</launch4jConfig>

example config.xml after processing(generated in target directory)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launch4jConfig>
    <dontWrapJar>false</dontWrapJar>
    <headerType>console</headerType>
    <jar>J:\workspace\launch4j-plugin\launch4j-plugin-usage\target\launch4j-xml-plugin-usage-0.0.1-SNAPSHOT.jar</jar>
    <outfile>J:\workspace\launch4j-plugin\launch4j-plugin-usage\target\main.exe</outfile>
    <errTitle/>
    <cmdLine/>
    <chdir/>
    <priority>normal</priority>
    <downloadUrl>http://java.com/download</downloadUrl>
    <supportUrl/>
    <customProcName>false</customProcName>
    <stayAlive>false</stayAlive>
    <manifest/>
    <icon/>
    <classPath>
        <mainClass>main.Main</mainClass>
        <cp>j:\.m2\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar</cp>
        <cp>j:\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar</cp>
    </classPath>
    <jre>
        <path/>
        <minVersion>1.5.0</minVersion>
        <maxVersion/>
        <jdkPreference>preferJre</jdkPreference>
    </jre>
</launch4jConfig>

About

Maven integration with Launch4j using config.xml (generated by Launch4j GUI) -- imported from code.google.com/p/launch4j-xml-plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published