Skip to content

Commit

Permalink
Merge pull request #14886 from famod/uberJar
Browse files Browse the repository at this point in the history
Deprecate uberJar mojo parameter and log a warning when used
  • Loading branch information
gsmet authored Feb 8, 2021
2 parents 4251c42 + 4340bba commit 3af53cc
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
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

0 comments on commit 3af53cc

Please sign in to comment.