Skip to content

Commit 22839cd

Browse files
authored
Merge pull request #282 from fvarrui/revert-276-devel
Revert merge devel -> master
2 parents 9e46a86 + af2e01e commit 22839cd

File tree

107 files changed

+2575
-5577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+2575
-5577
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.gradle
22
**/build/
3-
**/.idea/
43

54
# Package Files #
65
bin

README.md

+15-31
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add the following `plugin` tag to your `pom.xml`:
3030
<plugin>
3131
<groupId>io.github.fvarrui</groupId>
3232
<artifactId>javapackager</artifactId>
33-
<version>1.7.0</version>
33+
<version>1.6.7</version>
3434
<executions>
3535
<execution>
3636
<phase>package</phase>
@@ -78,7 +78,7 @@ buildscript {
7878
mavenCentral()
7979
}
8080
dependencies {
81-
classpath 'io.github.fvarrui:javapackager:1.7.0-SNAPSHOT'
81+
classpath 'io.github.fvarrui:javapackager:1.6.7'
8282
}
8383
}
8484
@@ -88,17 +88,15 @@ apply plugin: 'io.github.fvarrui.javapackager.plugin'
8888
Create your packaging task:
8989

9090
```groovy
91-
task packageMyApp(type: io.github.fvarrui.javapackager.GradlePackageTask, dependsOn: build) {
92-
javapackager{
93-
// mandatory
94-
mainClass = 'path.to.your.mainClass'
95-
// optional
96-
bundleJre = true|false
97-
generateInstaller = true|false
98-
administratorRequired = true|false
99-
platform = auto|linux|mac|windows
100-
additionalResources = [ file('file path'), file('folder path'), ... ]
101-
}
91+
task packageMyApp(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
92+
// mandatory
93+
mainClass = 'path.to.your.mainClass'
94+
// optional
95+
bundleJre = true|false
96+
generateInstaller = true|false
97+
administratorRequired = true|false
98+
platform = auto|linux|mac|windows
99+
additionalResources = [ file('file path'), file('folder path'), ... ]
102100
linuxConfig {
103101
...
104102
}
@@ -108,12 +106,6 @@ task packageMyApp(type: io.github.fvarrui.javapackager.GradlePackageTask, depend
108106
winConfig {
109107
...
110108
}
111-
manifest {
112-
....
113-
}
114-
scripts {
115-
...
116-
}
117109
...
118110
}
119111
```
@@ -126,10 +118,6 @@ And execute the next command in project's root folder:
126118
gradle packageMyApp
127119
```
128120

129-
### Package your app via CI
130-
131-
- **GitHub:** You can find an example workflow file [here](https://github.com/fvarrui/JavaPackager/blob/pr-248/test/hello-world-maven/.github/workflows/package.yml).
132-
133121
### Generated artifacts
134122

135123
By default it will generate next artifacts in `${outputDirectory} ` folder:
@@ -173,25 +161,21 @@ By default it will generate next artifacts in `${outputDirectory} ` folder:
173161
| `extra` | :x: | | Map with extra properties to be used in customized Velocity templates, accesible through `$info.extra` variable. |
174162
| `fileAssociations` | :x: | [`FileAssociation[]`](https://github.com/fvarrui/JavaPackager/blob/master/src/main/java/io/github/fvarrui/javapackager/model/FileAssociation.java) | Associate file extensions or MIME types to the app. |
175163
| `forceInstaller` | :x: | `false` | If `true`, skips operating system check when generating installers. |
176-
| `nativeImage` | :x: | `false` | If `true`, generates a native image for the current operating system. Note that `jdkVendor` must be set to `graalvm` for this to work. |
177-
| `sharedLibrary` | :x: | `false` | If `true`, generates a shared library for the current operating system. Note that `jdkVendor` must be set to `graalvm` for this to work. |
178164
| `generateInstaller` | :x: | `true` | Generates an installer for the app. |
179-
| `jdkVersion` | :x: | `latest` | JDK version to download and use. The latest version is used by default. See all available versions here: [adoptium](https://api.adoptium.net/v3/info/available_releases). |
180-
| `jdkVendor` | :x: | `graalvm` | JDK vendor to download the JDK from. Currently supported: `adoptium, graalvm` |
181-
| `jdkPath` | :x: | `null` | If null downloads (if necessary and also updates it if needed) the right JDK for the selected platform and sets this value to `<temp-dir>/jdk/win` or `<temp-dir>/jdk/linux` or `<temp-dir>/jdk/mac`. The downloaded JDK will be used to generate a customized JRE. |
165+
| `jdkPath` | :x: | `${java.home}` | JDK used to generate a customized JRE. It allows to bundle customized JREs for different platforms. |
182166
| `jreDirectoryName` | :x: | `"jre"` | Bundled JRE directory name. |
183167
| `jreMinVersion` | :x: | | JRE minimum version. If an appropriate version cannot be found display error message. Disabled if a JRE is bundled. |
184168
| `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. |
185169
| `licenseFile` | :x: | `${project.licenses[0].url}` or `${basedir}/LICENSE` or `${projectdir}/LICENSE` | Path to project license file. |
186170
| `mainClass` | :heavy_check_mark: | `${exec.mainClass}` | Full path to your app main class. |
187171
| `manifest` | :x: | | [Allows adding additional entries to MANIFEST.MF file.](docs/manifest.md) |
188172
| `modules` | :x: | `[]` | Modules to customize the bundled JRE. Don't use `jdeps` to get module dependencies. |
189-
| `appName` | :x: | `${project.name}` or `${project.artifactId}` | App name. |
173+
| `name` | :x: | `${project.name}` or `${project.artifactId}` | App name. |
190174
| `organizationName` | :x: | `${project.organization.name}` or `"ACME"` | Organization name. |
191175
| `organizationUrl` | :x: | `${project.organization.url}` | Organization website URL. |
192176
| `organizationEmail` | :x: | | Organization email. |
193177
| `outputDirectory` | :x: | `${project.build.directory}` or `${project.builddir}` | Output directory (where the artifacts will be generated). |
194-
| `packagingJdk` | :x: | `null` or same as `jdkPath` | JDK used in the execution of `jlink` and other JDK tools. If null `jdkPath` will be used. |
178+
| `packagingJdk` | :x: | `${java.home}` | JDK used in the execution of `jlink` and other JDK tools. |
195179
| `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. |
196180
| `runnableJar` | :x: | | 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. |
197181
| `scripts` | :x: | | Specify bootstrap script. **Pre and post-install scripts comming soon!** |
@@ -214,7 +198,7 @@ By default it will generate next artifacts in `${outputDirectory} ` folder:
214198
215199
### Plugin assets
216200

217-
Any [asset used by JavaPackager]([JavaPackager/src/main/resources at master · fvarrui/JavaPackager · GitHub](https://github.com/fvarrui/JavaPackager/tree/master/src/main/resources)), such as application icons or templates, can be replaced just by placing a file with the same name in `${assetsDir}` folder organized by platform.
201+
Any [asset used by JavaPackager](https://github.com/fvarrui/JavaPackager/tree/master/src/main/resources), such as application icons or templates, can be replaced just by placing a file with the same name in `${assetsDir}` folder organized by platform.
218202

219203
```bash
220204
${assetsDir}/

build.gradle

+6-20
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
repositories {
1313
mavenLocal()
1414
mavenCentral()
15-
maven {
15+
maven {
1616
url 'https://plugins.gradle.org/m2/'
1717
}
1818
}
@@ -46,40 +46,31 @@ dependencies {
4646
implementation 'org.apache.maven:maven-plugin-api:3.6.0'
4747
implementation 'org.codehaus.plexus:plexus-utils:3.1.1'
4848
implementation 'org.twdata.maven:mojo-executor:2.3.0'
49-
implementation 'commons-io:commons-io:2.7'
49+
implementation 'commons-io:commons-io:2.6'
5050
implementation 'org.apache.commons:commons-lang3:3.9'
5151
implementation 'org.apache.commons:commons-collections4:4.1'
5252
implementation 'org.apache.commons:commons-compress:1.21'
53-
implementation 'org.apache.velocity:velocity-engine-core:2.3'
53+
implementation 'org.apache.velocity:velocity-engine-core:2.0'
5454
implementation 'org.vafer:jdeb:1.9'
5555
implementation 'net.jsign:jsign-core:3.1'
5656
implementation 'org.redline-rpm:redline:1.2.10'
5757
implementation 'io.github.fvarrui:launch4j:2.5.2'
58-
implementation 'com.google.code.gson:gson:2.9.0'
59-
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
60-
implementation 'org.rauschig:jarchivelib:1.2.0'
61-
implementation 'com.squareup:javapoet:1.13.0'
6258

63-
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
64-
testImplementation 'org.apache.maven.shared:maven-invoker:3.2.0'
59+
testImplementation 'junit:junit:4.12'
6560

6661
compileOnly 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.6.0'
6762

6863
mavenEmbedder 'org.apache.maven:maven-embedder:3.6.0'
69-
mavenEmbedder 'org.apache.maven:maven-compat:3.6.0'
64+
mavenEmbedder 'org.apache.maven:maven-compat:3.6.0'
7065
mavenEmbedder 'org.slf4j:slf4j-simple:1.7.30'
7166
mavenEmbedder 'org.eclipse.aether:aether-connector-basic:1.1.0'
7267
mavenEmbedder 'org.eclipse.aether:aether-transport-wagon:1.1.0'
7368
mavenEmbedder 'org.apache.maven.wagon:wagon-http:3.4.1'
7469
mavenEmbedder 'org.apache.maven.wagon:wagon-provider-api:3.4.1'
7570
}
7671

77-
test {
78-
useJUnitPlatform()
79-
}
80-
8172
group = 'io.github.fvarrui'
82-
version = '1.7.0'
73+
version = '1.6.7'
8374
description = 'Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them'
8475

8576
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -95,11 +86,6 @@ publishing {
9586
}
9687
}
9788

98-
java {
99-
withSourcesJar()
100-
// and/or analogously use "withJavadocJar()" to get a "javadocJar" task
101-
}
102-
10389
install.repositories.mavenInstaller.pom.with {
10490
groupId = project.group
10591
artifactId = project.name

0 commit comments

Comments
 (0)