quarkus: [Maven] Don't change finalName with runner classifier

Description When uberJar is true, the Quarkus Maven Plugin will change the generated artifact of the project with a runner classifier. This generates a JAR with a different finalName than what the user is expecting.

Implementation ideas Either stop appending a different classifier, ultimately generating an uberJar as the final build artifact, or add a configuration option, where the default is no classifier.

Source: https://github.com/quarkusio/quarkus/blob/master/devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java#L206-L208

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 25 (12 by maintainers)

Most upvoted comments

I’d like to use this feature too, at the moment, it still adds the suffix -runner.jar instead <finalName>

I got the same problem for my use case, so I could resolve with the following workaround:

Defined the final name in pom.xml as:

  <finalName>${artifactId}</finalName>

And declared the following properties in application.properties file:

quarkus.package.type=uber-jar
quarkus.package.runner-suffix=-${version}

That configuration allows me to build the runner package as artifactId-version.jar file, as I needed for my CICD pipelines.

HTH

I have startet work setting runner as main artifact (https://github.com/computerlove/quarkus/commit/597c6766bed50abbaaa4f58c61f9fe400820d30c) Need to make sure that all required steps in contributing requirements are met before creating a PR.

we’ll take a look at this. thanks for your patience. Clever workaround @faermanj

Same issue here. I wanted the binary to be called exactly “kubectl-task”, so this workaround…

quarkus.package.output-name=kubectl-tas 
quarkus.package.runner-suffix=k

Is there a way to define quarkus.package.runner-suffix as an empty string?

Documenting here, after the update, achieved my objective removing the suffix by using the following settings in application.properties

quarkus.package.add-runner-suffix=false
ls -lha build/
-rw-rw-r--  1 typer typer  34M fev 18 20:00 dns-proxy-server-3.0.0.jar

I’d like to use this feature too…please !

@computerlove any updates on the PR? Great work. I would like to use this feature.

As a comparison, Spring Boot repackages the JAR of the application with the runnable uber jar. If the user really wants a new file, he/she needs to set a classifier manually: https://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/repackage-classifier.html

I believe this is a better, commonly expected behavior, that allows users (and other plugins) to rely on ${project.build.finalName}.jar.