Skip to content

Commit

Permalink
U released v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fvarrui committed Dec 5, 2020
1 parent 12be692 commit 4dfc8f8
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 40 deletions.
78 changes: 39 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following `plugin` tag to your `pom.xml`:
<plugin>
<groupId>io.github.fvarrui</groupId>
<artifactId>javapackager</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -70,7 +70,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'io.github.fvarrui:javapackager:1.4.1'
classpath 'io.github.fvarrui:javapackager:1.4.2'
}
}
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
51 changes: 51 additions & 0 deletions docs/manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# *manifest* property

`manifest` property allows to add additional manifest entries and sections.

## Maven

```xml
<manifest>
<additionalEntries>
<Created-By>Peter</Created-By>
</additionalEntries>
<sections>
<section>
<name>foo/</name>
<entries>
<Implementation-Version>foo1</Implementation-Version>
</entries>
</section>
</sections>
</manifest>
```

## 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
```

0 comments on commit 4dfc8f8

Please sign in to comment.