Home

Awesome

Makeself Maven Plugin

Java CI Maven central License

hazendaz

See makeself for details on using makeself

See plugin site page here

See plugin details here

See changelog here

Makeself Maven Plugin provides maven integration for megastep makeself script.

Makeself is a self-extracting archiving tool for Unix systems, in 100% shell script.

With help of Cygwin, git for windows or other tools supplying bash for windows, this tool is fully functional with windows.

Windows

Usage in windows leverages Portable Git distribution automatically during the build.

Versions prior to this point as noted below used bash in a different way. It is best to use the latest where possible.

[12/30/2020] Original windows logic to confirm bash is currently disabled as it detects incorrectly on recent windows 10. Instead for windows, it will always use the portable git distribution.

To use in windows, configure Bash or Add git for windows '/usr/bin' to environment 'Path' variable to execute this plugin.

Alternatively in windows, if bash is not found on the path, the plugin will download the portable copy of git-for-windows and install it into maven home under 'PortableGit' and will use that version to run necessary bash steps.

Example Usage

    <plugin>
        <groupId>com.github.hazendaz.maven</groupId>
        <artifactId>makeself-maven-plugin</artifactId>
        <version>1.7.0</version>
        <configuration>
            <archiveDir>distro</archiveDir>
            <fileName>installDistro.sh</fileName>
            <label>Distro Self Extraction</label>
            <startupScript>./runDistroScript.sh</startupScript>
        </configuration>
        <executions>
            <execution>
                <id>makeself</id>
                <goals>
                    <goal>makeself</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

*** Special notes: ***

Contributor Consideration

Executable Permissions on Shell Scripts

When makeself is updated on this repository, perform the following commands after the update commit. This will ensure shell files are executable within project. While it might not provide any benefit upon build, it doesn't hurt.

    git add --chmod=+x *.sh; \
    git commit -m "Force makeself to be executable"

To check the files are of right permissions

    stat -c "%a %n" *

*** Note: *** It seems no matter the change makself-header.sh wants to stay 644. Regardless, with all other protections this is handled on *nix now and line endings are addressed.

Integration Tests

mvn -Prun-it clean install

Makeself Update

Run 'mvn clean -Pupdate-makeself' and review results / commit / code as needed.