Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate --uber-jar option in quarkusBuild task #14899

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public boolean isUberJar() {
return uberJar;
}

/**
* @deprecated use {@code quarkus.package.type} instead
*/
@Option(description = "Set to true if the build task should build an uberjar", option = "uber-jar")
@Deprecated
public void setUberJar(boolean uberJar) {
this.uberJar = uberJar;
}
Expand Down Expand Up @@ -131,7 +135,9 @@ public void buildQuarkus() {
effectiveProperties.setProperty("quarkus.package.user-configured-ignored-entries", joinedEntries);
}
boolean clear = false;
if (uberJar && System.getProperty("quarkus.package.uber-jar") == null) {
if (isUberJar() && System.getProperty("quarkus.package.uber-jar") == null) {
getLogger().lifecycle(
"The uberJar option is deprecated, and will be removed in a future version. To build an uber-jar set the config property quarkus.package.type=uber-jar. For more info see https://quarkus.io/guides/gradle-tooling#building-uber-jars");
System.setProperty("quarkus.package.uber-jar", "true");
clear = true;
}
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/gradle-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,18 @@ This task depends on `quarkusBuild`, so it will generate the native image before

== Building Uber-Jars

Quarkus Gradle plugin supports the generation of Uber-Jars by specifying an `--uber-jar` argument as follows:
Quarkus Gradle plugin supports the generation of Uber-Jars by specifying a `quarkus.package.type` argument as follows:

[source,bash]
----
./gradlew quarkusBuild --uber-jar
./gradlew quarkusBuild -Dquarkus.package.type=uber-jar
----

When building an Uber-Jar you can specify entries that you want to exclude from the generated jar by using the `--ignored-entry` argument:

[source,bash]
----
./gradlew quarkusBuild --uber-jar --ignored-entry=META-INF/file1.txt
./gradlew quarkusBuild -Dquarkus.package.type=uber-jar --ignored-entry=META-INF/file1.txt
----

The entries are relative to the root of the generated Uber-Jar. You can specify multiple entries by adding extra `--ignored-entry` arguments.
Expand Down