You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JavaPackager is a Maven plugin which provides an easy way to package Java applications in native Windows, Mac OS X, or GNU/Linux executables, and generates installers for them.
5
+
JavaPackager is a hybrid plugin for **Maven** and **Gradle**which provides an easy way to package Java applications in native Windows, Mac OS X or GNU/Linux executables, and generates installers for them.
6
6
7
7
> SNAPSHOT versions are not released to Maven Central, so you have to [install them manually](#how-to-build-and-install-the-plugin).
8
8
9
9
## How to use this plugin
10
10
11
-
### Config your project
11
+
### Config your project and package your app with Maven
12
12
13
13
Add the following `plugin` tag to your `pom.xml`:
14
14
15
15
```xml
16
16
<plugin>
17
17
<groupId>io.github.fvarrui</groupId>
18
18
<artifactId>javapackager</artifactId>
19
-
<version>1.1.0|1.2.0-SNAPSHOT</version>
19
+
<version>1.2.0|1.2.1-SNAPSHOT</version>
20
20
<executions>
21
21
<execution>
22
22
<phase>package</phase>
@@ -46,17 +46,67 @@ Add the following `plugin` tag to your `pom.xml`:
46
46
</plugin>
47
47
```
48
48
49
-
> See [plugin configuration samples](docs/plugin-configuration-samples.md) to know more.
49
+
> See [Maven plugin configuration samples](docs/maven-plugin-configuration-samples.md) to know more.
50
50
51
-
### Package your app
52
-
53
-
Execute the next command in project's root folder:
51
+
And execute the next command in project's root folder:
54
52
55
53
```bash
56
54
mvn package
57
55
```
58
56
59
-
And by default it will generate next artifacts in `target ` folder:
57
+
### Config your project and package your app with Gradle
58
+
59
+
Apply JavaPackager plugin in `build.gradle` in legacy mode, :
|`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. |
99
-
|`licenseFile`|:x:|`${project.licenses[0].url}` or `${project.basedir}/LICENSE`| Path to project license file. |
148
+
|`licenseFile`|:x:|`${project.licenses[0].url}` or `${basedir}/LICENSE` or `${projectdir}/LICENSE`| Path to project license file. |
100
149
|`mainClass`|:heavy_check_mark:|`${exec.mainClass}`| Full path to your app main class. |
101
150
|`modules`|:x:|`[]`| Defines modules to customize the bundled JRE. Don't use `jdeps` to get module dependencies. |
102
151
|`name`|:x:|`${project.name}` or `${project.artifactId}`| App name. |
@@ -160,18 +209,20 @@ It is possible to use your own customized templates. You just have to put one of
160
209
```
161
210
${assetsDir}/
162
211
├── linux/
163
-
| ├── control.vtl # DEB control template
164
-
| ├── desktop.vtl # Desktop template
165
-
│ └── startup.sh.vtl # Startup script template
212
+
| ├── assembly.xml.vtl # maven-assembly-plugin template to generate ZIP/TGZ bundles for GNU/Linux
0 commit comments