diff --git a/README.md b/README.md index 21d75288..51e1047f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Add the following `plugin` tag to your `pom.xml`: io.github.fvarrui javapackager - 1.4.1 + 1.4.2 package @@ -70,7 +70,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'io.github.fvarrui:javapackager:1.4.1' + classpath 'io.github.fvarrui:javapackager:1.4.2' } } @@ -134,43 +134,43 @@ By default it will generate next artifacts in `${outputDirectory} ` folder: ### Plugin configutation properties -| Property | Mandatory | Default value | Description | -| --------------------------- | ------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `additionalManifestEntries` | :x: | `null` | Map with additional entries to be used in the manifest file of the generated runnable JAR. | -| `additionalModules` | :x: | `[]` | Additional modules to the ones identified by `jdeps` or the specified with `modules` property. | -| `additionalResources` | :x: | `[]` | Additional files and folders to include in the bundled app. | -| `administratorRequired` | :x: | `false` | App will run as administrator (with elevated privileges). | -| `assetsDir` | :x: | `${basedir}/assets` or `${projectdir}/assets` | Assets location (icons and custom Velocity templates). | -| `bundleJre` | :x: | `false` | Embeds a customized JRE with the app. | -| `classpath` | :x: | `null` | List of additional paths to JVM classpath, separated with `;` (recommended) or `:`. | -| `copyDependencies` | :x: | `true` | Bundles all dependencies (JAR files) with the app. | -| `createTarball` | :x: | `false` | Bundles app folder in tarball. | -| `createZipball` | :x: | `false` | Bundles app folder in zipball. | -| `customizedJre` | :x: | `true` | Generates a customized JRE, including only identified or specified modules. Otherwise, all modules will be included. | -| `description` | :x: | `${project.description}` or `${displayName}` | Project description. | -| `displayName` | :x: | `${project.name}` or `${name}` | App name to show. | -| `envPath` | :x: | `null` | Defines PATH environment variable in GNU/Linux and Mac OS X startup scripts. | -| `extra` | :x: | `null` | Map with extra properties to be used in customized Velocity templates, accesible through `$info.extra` variable. | -| `generateInstaller` | :x: | `true` | Generates an installer for the app. | -| `iconFile` | :x: | `null` | Path to the app icon file (PNG, XPM, ICO or ICNS). **:warning: Deprecated (see platform specific properties).** | -| `jdkPath` | :x: | `${java.home}` | JDK used to generate a customized JRE. It allows to bundle customized JREs for different platforms. | -| `jreDirectoryName` | :x: | `"jre"` | Bundled JRE directory name. | -| `jreMinVersion` | :x: | `null` | JRE minimum version. If an appropriate version cannot be found display error message. Disabled if a JRE is bundled. | -| `jrePath` | :x: | `""` | Path to JRE folder. If specified, it will bundle this JRE with the app, and won't generate a customized JRE. For Java 8 version or least. | -| `licenseFile` | :x: | `${project.licenses[0].url}` or `${basedir}/LICENSE` or `${projectdir}/LICENSE` | Path to project license file. | -| `mainClass` | :heavy_check_mark: | `${exec.mainClass}` | Full path to your app main class. | -| `modules` | :x: | `[]` | Defines modules to customize the bundled JRE. Don't use `jdeps` to get module dependencies. | -| `name` | :x: | `${project.name}` or `${project.artifactId}` | App name. | -| `organizationName` | :x: | `${project.organization.name}` or `"ACME"` | Organization name. | -| `organizationUrl` | :x: | `${project.organization.url}` | Organization website URL. | -| `organizationEmail` | :x: | `null` | Organization email. | -| `outputDirectory` | :x: | `${project.build.directory}` or `${project.builddir}` | Output directory (where the artifacts will be generated). | -| `platform` | :x: | `auto` | Defines the target platform, which could be different to the execution platform. Possible values: `auto`, `mac`, `linux`, `windows`. Use `auto` for using execution platform as target. | -| `runnableJar` | :x: | `null` | Defines your own JAR file to be bundled. If it's ommited, the plugin packages your code in a runnable JAR and bundle it with the app. | -| `url` | :x: | `null` | App website URL. | -| `useResourcesAsWorkingDir` | :x: | `true` | Uses app resources folder as default working directory (always `true` on Mac OS). | -| ` version` | :x: | `${project.version}` | Project version. | -| `vmArgs` | :x: | `[]` | Adds VM arguments. | +| Property | Mandatory | Default value | Description | +| -------------------------- | ------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `additionalModules` | :x: | `[]` | Additional modules to the ones identified by `jdeps` or the specified with `modules` property. | +| `additionalResources` | :x: | `[]` | Additional files and folders to include in the bundled app. | +| `administratorRequired` | :x: | `false` | App will run as administrator (with elevated privileges). | +| `assetsDir` | :x: | `${basedir}/assets` or `${projectdir}/assets` | Assets location (icons and custom Velocity templates). | +| `bundleJre` | :x: | `false` | Embeds a customized JRE with the app. | +| `classpath` | :x: | `null` | List of additional paths to JVM classpath, separated with `;` (recommended) or `:`. | +| `copyDependencies` | :x: | `true` | Bundles all dependencies (JAR files) with the app. | +| `createTarball` | :x: | `false` | Bundles app folder in tarball. | +| `createZipball` | :x: | `false` | Bundles app folder in zipball. | +| `customizedJre` | :x: | `true` | Generates a customized JRE, including only identified or specified modules. Otherwise, all modules will be included. | +| `description` | :x: | `${project.description}` or `${displayName}` | Project description. | +| `displayName` | :x: | `${project.name}` or `${name}` | App name to show. | +| `envPath` | :x: | `null` | Defines PATH environment variable in GNU/Linux and Mac OS X startup scripts. | +| `extra` | :x: | `null` | Map with extra properties to be used in customized Velocity templates, accesible through `$info.extra` variable. | +| `generateInstaller` | :x: | `true` | Generates an installer for the app. | +| `iconFile` | :x: | `null` | Path to the app icon file (PNG, XPM, ICO or ICNS). **:warning: Deprecated (see platform specific properties).** | +| `jdkPath` | :x: | `${java.home}` | JDK used to generate a customized JRE. It allows to bundle customized JREs for different platforms. | +| `jreDirectoryName` | :x: | `"jre"` | Bundled JRE directory name. | +| `jreMinVersion` | :x: | `null` | JRE minimum version. If an appropriate version cannot be found display error message. Disabled if a JRE is bundled. | +| `jrePath` | :x: | `""` | Path to JRE folder. If specified, it will bundle this JRE with the app, and won't generate a customized JRE. For Java 8 version or least. | +| `licenseFile` | :x: | `${project.licenses[0].url}` or `${basedir}/LICENSE` or `${projectdir}/LICENSE` | Path to project license file. | +| `mainClass` | :heavy_check_mark: | `${exec.mainClass}` | Full path to your app main class. | +| `manifest` | :x: | `null` | [Allows adding additional entries to MANIFEST.MF file.](docs/manifest.md) | +| `modules` | :x: | `[]` | Defines modules to customize the bundled JRE. Don't use `jdeps` to get module dependencies. | +| `name` | :x: | `${project.name}` or `${project.artifactId}` | App name. | +| `organizationName` | :x: | `${project.organization.name}` or `"ACME"` | Organization name. | +| `organizationUrl` | :x: | `${project.organization.url}` | Organization website URL. | +| `organizationEmail` | :x: | `null` | Organization email. | +| `outputDirectory` | :x: | `${project.build.directory}` or `${project.builddir}` | Output directory (where the artifacts will be generated). | +| `platform` | :x: | `auto` | Defines the target platform, which could be different to the execution platform. Possible values: `auto`, `mac`, `linux`, `windows`. Use `auto` for using execution platform as target. | +| `runnableJar` | :x: | `null` | Defines your own JAR file to be bundled. If it's ommited, the plugin packages your code in a runnable JAR and bundle it with the app. | +| `url` | :x: | `null` | App website URL. | +| `useResourcesAsWorkingDir` | :x: | `true` | Uses app resources folder as default working directory (always `true` on Mac OS). | +| ` version` | :x: | `${project.version}` | Project version. | +| `vmArgs` | :x: | `[]` | Adds VM arguments. | > Some default values depends on the used building tool. diff --git a/build.gradle b/build.gradle index 2cb6dea7..fff2e384 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ dependencies { } group = 'io.github.fvarrui' -version = '1.4.2-SNAPSHOT' +version = '1.4.3-SNAPSHOT' description = 'Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them' sourceCompatibility = JavaVersion.VERSION_1_8 diff --git a/docs/manifest.md b/docs/manifest.md new file mode 100644 index 00000000..0a1bc90d --- /dev/null +++ b/docs/manifest.md @@ -0,0 +1,51 @@ +# *manifest* property + +`manifest` property allows to add additional manifest entries and sections. + +## Maven + +```xml + + + Peter + + +
+ foo/ + + foo1 + +
+
+
+``` + +## Gradle + +```groovy +manifest { + additionalEntries = [ + 'Created-By': 'Peter' + ] + sections = [ + new io.github.fvarrui.javapackager.model.ManifestSection ([ + name: "foo/", + entries: [ + 'Implementation-Version': 'foo1' + ] + ]) + ] +} +``` + +## Result + +Both produce the following `MANIFEST.MF` file: + +```properties +Manifest-Version: 1.0 +Created-By: Peter + +Name: foo/ +Implementation-Version: foo1 +``` \ No newline at end of file