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 uberJar mojo parameter and log a warning when used #14886

Merged
merged 1 commit into from
Feb 8, 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 @@ -53,7 +53,11 @@ public abstract class QuarkusBootstrapMojo extends AbstractMojo {
@Parameter(defaultValue = "${project.build.finalName}")
private String finalName;

/**
* @deprecated use {@code quarkus.package.type} instead
*/
@Parameter(property = "uberJar", defaultValue = "false")
@Deprecated
private boolean uberJar;

/**
Expand Down Expand Up @@ -145,6 +149,10 @@ protected String[] ignoredEntries() {
}

protected boolean uberJar() {
if (uberJar) {
getLog().warn(
"The parameter uberJar 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/maven-tooling#uber-jar-maven");
}
return uberJar;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<quarkus-plugin.version>{quarkus.maven-plugin.version}</quarkus-plugin.version>
<compiler-plugin.version>{maven-compiler-plugin.version}</compiler-plugin.version>
<surefire-plugin.version>{maven-surefire-plugin.version}</surefire-plugin.version>
{#if uberjar}
<quarkus.package.type>uber-jar</quarkus.package.type>
{/if}
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -102,11 +105,6 @@
<artifactId>{quarkus.maven-plugin.artifact-id}</artifactId>
<version>$\{quarkus-plugin.version}</version>
<extensions>true</extensions>
{#if uberjar}
<configuration>
<uberJar>true</uberJar>
</configuration>
{/if}
<executions>
<execution>
<goals>
Expand Down
3 changes: 2 additions & 1 deletion docs/src/main/asciidoc/maven-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ If you have not used <<project-creation,project scaffolding>>, add the following
[[uber-jar-maven]]
=== Uber-Jar Creation

Quarkus Maven plugin supports the generation of Uber-Jars by specifying a `quarkus.package.type=uber-jar` configuration option in your `application.properties`.
Quarkus Maven plugin supports the generation of Uber-Jars by specifying a `quarkus.package.type=uber-jar` configuration option in your `application.properties`
(or `<quarkus.package.type>uber-jar</quarkus.package.type>` in your `pom.xml`).

The original jar will still be present in the `target` directory but it will be renamed to contain the `.original` suffix.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<functionResourceGroup>${resourceGroup}</functionResourceGroup>
<function>${function}</function>
<stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -79,9 +80,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<configuration>
<uberJar>true</uberJar>
</configuration>
<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -54,7 +55,6 @@
</executions>
<configuration>
<argsString>plugin pom config</argsString> <!-- dev goal parameter -->
<uberJar>true</uberJar> <!-- build goal parameter -->
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -44,7 +45,6 @@
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<configuration>
<uberJar>true</uberJar>
<ignoredEntries>
<ignoredEntry>META-INF/swagger-ui-files/swagger-ui-bundle.js.map</ignoredEntry>
<ignoredEntry>META-INF/swagger-ui-files/swagger-ui-standalone-preset.js.map</ignoredEntry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -58,9 +59,6 @@
<goal>generate-code-tests</goal>
<goal>build</goal>
</goals>
<configuration>
<uberJar>true</uberJar>
</configuration>
</execution>
</executions>
</plugin>
Expand Down