Skip to content

Commit 1773b9e

Browse files
committed
U docs
1 parent 558a0ac commit 1773b9e

File tree

3 files changed

+143
-137
lines changed

3 files changed

+143
-137
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mvn package
5656

5757
### Config your project and package your app with Gradle
5858

59-
Apply JavaPackager plugin in `build.gradle` in legacy mode, :
59+
Apply JavaPackager plugin in `build.gradle` in legacy mode, because it's only available in Maven Central repository:
6060

6161
```groovy
6262
buildscript {
@@ -106,7 +106,7 @@ gradle packageMyApp
106106

107107
### Generated artifacts
108108

109-
By default it will generate next artifacts in `target ` folder:
109+
By default it will generate next artifacts in `${outputDirectory} ` folder:
110110

111111
| Artifact | Description |
112112
| --------------------------------------- | ------------------------------------------------------------ |
@@ -123,6 +123,8 @@ By default it will generate next artifacts in `target ` folder:
123123

124124
> :warning: Installers generation will be ommited if target platform is different from current platform (see `platform` property).
125125
126+
> :warning: **DEB and RPM package generation in Gradle is not yet available. Coming soon!**
127+
126128
### Plugin configutation properties
127129

128130
| Property | Mandatory | Default value | Description |
@@ -152,13 +154,16 @@ By default it will generate next artifacts in `target ` folder:
152154
| `organizationName` | :x: | `${project.organization.name}` or `"ACME"` | Organization name. |
153155
| `organizationUrl` | :x: | `${project.organization.url}` | Organization website URL. |
154156
| `organizationEmail` | :x: | `null` | Organization email. |
157+
| `outputDirectory` | :x: | `${project.build.directory}` or `${project.builddir}` | Output directory (where the artifacts will be generated). |
155158
| `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. |
156159
| `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. |
157160
| `url` | :x: | `null` | App website URL. |
158161
| `useResourcesAsWorkingDir` | :x: | `true` | Uses app resources folder as default working directory. |
159162
| ` version` | :x: | `${project.version}` | Project version. |
160163
| `vmArgs` | :x: | `[]` | Adds VM arguments. |
161164

165+
> Some default values depends on the used building tool.
166+
162167
**Platform specific properties**
163168

164169
| Property | Mandatory | Default | Description |

docs/maven-plugin-configuration-samples.md

Lines changed: 128 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,47 @@
44

55
```xml
66
<plugin>
7-
<groupId>io.github.fvarrui</groupId>
8-
<artifactId>javapackager</artifactId>
9-
<version>{latest-plugin-version-here}</version>
10-
<executions>
11-
<execution>
12-
<phase>package</phase>
13-
<goals>
14-
<goal>package</goal>
15-
</goals>
16-
<configuration>
17-
<mainClass>fvarrui.sample.Main</mainClass>
18-
</configuration>
19-
</execution>
20-
</executions>
7+
<groupId>io.github.fvarrui</groupId>
8+
<artifactId>javapackager</artifactId>
9+
<version>{latest-plugin-version-here}</version>
10+
<executions>
11+
<execution>
12+
<phase>package</phase>
13+
<goals>
14+
<goal>package</goal>
15+
</goals>
16+
<configuration>
17+
<mainClass>fvarrui.sample.Main</mainClass>
18+
</configuration>
19+
</execution>
20+
</executions>
2121
</plugin>
2222
```
2323

2424
Also, JavaPackager plugin is able to get some properties from `pom.xml`, so you don't need to specify them twice:
2525

2626
```xml
2727
<project>
28-
<properties>
29-
<exec.mainClass>fvarrui.sample.Main</exec.mainClass>
30-
</properties>
31-
<build>
32-
<plugins>
33-
<plugin>
34-
<groupId>io.github.fvarrui</groupId>
35-
<artifactId>javapackager</artifactId>
36-
<version>{latest-plugin-version-here}</version>
37-
<executions>
38-
<execution>
39-
<phase>package</phase>
40-
<goals>
41-
<goal>package</goal>
42-
</goals>
43-
</execution>
44-
</executions>
45-
</plugin>
46-
</plugins>
47-
</build>
28+
<properties>
29+
<exec.mainClass>fvarrui.sample.Main</exec.mainClass>
30+
</properties>
31+
<build>
32+
<plugins>
33+
<plugin>
34+
<groupId>io.github.fvarrui</groupId>
35+
<artifactId>javapackager</artifactId>
36+
<version>{latest-plugin-version-here}</version>
37+
<executions>
38+
<execution>
39+
<phase>package</phase>
40+
<goals>
41+
<goal>package</goal>
42+
</goals>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
</plugins>
47+
</build>
4848
</project>
4949
```
5050
> :warning: This minimal configuration will not bundle a JRE, so final user will need one in order to run the app.
@@ -53,21 +53,21 @@ Also, JavaPackager plugin is able to get some properties from `pom.xml`, so you
5353

5454
```xml
5555
<plugin>
56-
<groupId>io.github.fvarrui</groupId>
57-
<artifactId>javapackager</artifactId>
58-
<version>{latest-plugin-version-here}</version>
59-
<executions>
60-
<execution>
61-
<phase>package</phase>
62-
<goals>
63-
<goal>package</goal>
64-
</goals>
65-
<configuration>
66-
<mainClass>fvarrui.sample.Main</mainClass>
67-
<bundleJre>true</bundleJre>
68-
</configuration>
69-
</execution>
70-
</executions>
56+
<groupId>io.github.fvarrui</groupId>
57+
<artifactId>javapackager</artifactId>
58+
<version>{latest-plugin-version-here}</version>
59+
<executions>
60+
<execution>
61+
<phase>package</phase>
62+
<goals>
63+
<goal>package</goal>
64+
</goals>
65+
<configuration>
66+
<mainClass>fvarrui.sample.Main</mainClass>
67+
<bundleJre>true</bundleJre>
68+
</configuration>
69+
</execution>
70+
</executions>
7171
</plugin>
7272
```
7373

@@ -77,107 +77,108 @@ Also, JavaPackager plugin is able to get some properties from `pom.xml`, so you
7777

7878
```xml
7979
<plugin>
80-
<groupId>io.github.fvarrui</groupId>
81-
<artifactId>javapackager</artifactId>
82-
<version>{latest-plugin-version-here}</version>
83-
<executions>
84-
<execution>
85-
<phase>package</phase>
86-
<goals>
87-
<goal>package</goal>
88-
</goals>
89-
<configuration>
90-
<mainClass>fvarrui.sample.Main</mainClass>
91-
<bundleJre>true</bundleJre>
92-
<customizedJre>false</customizedJre>
93-
</configuration>
94-
</execution>
95-
</executions>
80+
<groupId>io.github.fvarrui</groupId>
81+
<artifactId>javapackager</artifactId>
82+
<version>{latest-plugin-version-here}</version>
83+
<executions>
84+
<execution>
85+
<phase>package</phase>
86+
<goals>
87+
<goal>package</goal>
88+
</goals>
89+
<configuration>
90+
<mainClass>fvarrui.sample.Main</mainClass>
91+
<bundleJre>true</bundleJre>
92+
<customizedJre>false</customizedJre>
93+
</configuration>
94+
</execution>
95+
</executions>
9696
</plugin>
9797
```
9898

9999
## Bundle with an existing JRE
100100

101101
```xml
102102
<plugin>
103-
<groupId>io.github.fvarrui</groupId>
104-
<artifactId>javapackager</artifactId>
105-
<version>{latest-plugin-version-here}</version>
106-
<executions>
107-
<execution>
108-
<phase>package</phase>
109-
<goals>
110-
<goal>package</goal>
111-
</goals>
112-
<configuration>
113-
<mainClass>fvarrui.sample.Main</mainClass>
114-
<bundleJre>true</bundleJre>
115-
<jrePath>C:\Program Files\Java\jre1.8.0_231</jrePath>
116-
</configuration>
117-
</execution>
118-
</executions>
103+
<groupId>io.github.fvarrui</groupId>
104+
<artifactId>javapackager</artifactId>
105+
<version>{latest-plugin-version-here}</version>
106+
<executions>
107+
<execution>
108+
<phase>package</phase>
109+
<goals>
110+
<goal>package</goal>
111+
</goals>
112+
<configuration>
113+
<mainClass>fvarrui.sample.Main</mainClass>
114+
<bundleJre>true</bundleJre>
115+
<jrePath>C:\Program Files\Java\jre1.8.0_231</jrePath>
116+
</configuration>
117+
</execution>
118+
</executions>
119119
</plugin>
120120
```
121121

122122
## Bundle your own fat JAR
123123

124124
```xml
125125
<plugin>
126-
<groupId>io.github.fvarrui</groupId>
127-
<artifactId>javapackager</artifactId>
128-
<version>{latest-plugin-version-here}</version>
129-
<executions>
130-
<execution>
131-
<phase>package</phase>
132-
<goals>
133-
<goal>package</goal>
134-
</goals>
135-
<configuration>
136-
<mainClass>fvarrui.sample.Main</mainClass>
137-
<bundleJre>true</bundleJre>
138-
<runnableJar>path/to/your/own/fat.jar</runnableJar>
139-
<copyDependencies>false</copyDependencies>
140-
</configuration>
141-
</execution>
142-
</executions>
126+
<groupId>io.github.fvarrui</groupId>
127+
<artifactId>javapackager</artifactId>
128+
<version>{latest-plugin-version-here}</version>
129+
<executions>
130+
<execution>
131+
<phase>package</phase>
132+
<goals>
133+
<goal>package</goal>
134+
</goals>
135+
<configuration>
136+
<mainClass>fvarrui.sample.Main</mainClass>
137+
<bundleJre>true</bundleJre>
138+
<runnableJar>path/to/your/own/fat.jar</runnableJar>
139+
<copyDependencies>false</copyDependencies>
140+
</configuration>
141+
</execution>
142+
</executions>
143143
</plugin>
144144
```
145145

146146
## Multiple executions
147147

148148
```xml
149149
<plugin>
150-
<groupId>io.github.fvarrui</groupId>
151-
<artifactId>javapackager</artifactId>
152-
<version>{latest-plugin-version-here}</version>
153-
<executions>
154-
<execution>
155-
<id>bundle-with-jre</id>
156-
<phase>package</phase>
157-
<goals>
158-
<goal>package</goal>
159-
</goals>
160-
<configuration>
161-
<name>Sample</name>
162-
<mainClass>fvarrui.sample.Main</mainClass>
163-
<bundleJre>true</bundleJre>
164-
</configuration>
165-
</execution>
166-
<execution>
167-
<id>bundle-without-jre</id>
168-
<phase>package</phase>
169-
<goals>
170-
<goal>package</goal>
171-
</goals>
172-
<configuration>
173-
<name>Sample-nojre</name>
174-
<mainClass>fvarrui.sample.Main</mainClass>
175-
<bundleJre>false</bundleJre>
176-
</configuration>
177-
</execution>
178-
</executions>
150+
<groupId>io.github.fvarrui</groupId>
151+
<artifactId>javapackager</artifactId>
152+
<version>{latest-plugin-version-here}</version>
153+
<executions>
154+
<execution>
155+
<id>bundle-with-jre</id>
156+
<phase>package</phase>
157+
<goals>
158+
<goal>package</goal>
159+
</goals>
160+
<configuration>
161+
<name>Sample</name>
162+
<mainClass>fvarrui.sample.Main</mainClass>
163+
<bundleJre>true</bundleJre>
164+
</configuration>
165+
</execution>
166+
<execution>
167+
<id>bundle-without-jre</id>
168+
<phase>package</phase>
169+
<goals>
170+
<goal>package</goal>
171+
</goals>
172+
<configuration>
173+
<name>Sample-nojre</name>
174+
<mainClass>fvarrui.sample.Main</mainClass>
175+
<bundleJre>false</bundleJre>
176+
</configuration>
177+
</execution>
178+
</executions>
179179
</plugin>
180180
```
181+
181182
E.g. on Windows, last configuration will generate next artifacts:
182183
* `Sample_x.y.z.exe` with a bundled JRE.
183184
* `Sample-nojre_x.y.z.exe` without JRE.

docs/windows-specific-properties.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
```xml
44
<winConfig>
5-
<!-- general properties -->
6-
<icoFile>path/to/icon.ico</icoFile>
5+
<!-- general properties -->
6+
<icoFile>path/to/icon.ico</icoFile>
77
<generateSetup>true|false</generateSetup>
88
<generateMsi>true|false</generateMsi>
99
<generateMsm>true|false</generateMsm>
@@ -20,12 +20,12 @@
2020
<productName>${name}</productName>
2121
<internalName>${name}</internalName>
2222
<originalFilename>${name}.exe</originalFilename>
23-
<!-- setup generation properties -->
24-
<setupLanguages>
25-
<english>compiler:Default.isl</english>
26-
<spanish>compiler:Languages\Spanish.isl</english>
27-
[...]
28-
</setupLanguages>
23+
<!-- setup generation properties -->
24+
<setupLanguages>
25+
<english>compiler:Default.isl</english>
26+
<spanish>compiler:Languages\Spanish.isl</english>
27+
[...]
28+
</setupLanguages>
2929
<disableDirPage>true|false</disableDirPage>
3030
<disableProgramGroupPage>true|false</disableProgramGroupPage>
3131
<disableFinishedPage>true|false</disableFinishedPage>

0 commit comments

Comments
 (0)