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

the generated jar file has wrong name xxx-unspecified-runner.jar #70

Open
lfarkas opened this issue Feb 16, 2021 · 6 comments
Open

the generated jar file has wrong name xxx-unspecified-runner.jar #70

lfarkas opened this issue Feb 16, 2021 · 6 comments
Labels
kind/documentation Improvements or additions to documentation priority: p4 type: bug Something isn't working

Comments

@lfarkas
Copy link

lfarkas commented Feb 16, 2021

it seems the quarkus plugin generate wrong filename. ie: xxx-unspecified-runner.jar in stead of xxx-runner.jar
what i should have to change to generate good filename?

this is the output of a build:

./gradlew xxx:jib

> Task :xxx:quarkusGenerateCode
preparing quarkus application

> Task :xxx:jib FAILED
Running extension: com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension
Running Quarkus Jib extension

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':xxx:jib'.
> error running extension 'com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension': /home/lfarkas/work/test/java/xxx/build/xxx-runner.jar doesn't exist; did you run the Qaurkus Gradle plugin ('quarkusBuild' task)?

anyway if i rename xxx-unspecified-runner.jar to xxx-runner.jar then the result is working.

@chanseokoh
Copy link
Member

chanseokoh commented Feb 16, 2021

It's the Quarkus plugin that generates *-runner.jar. I am not sure if it is a bug in Quarkus that the name contains "unspecified", it is working as intended, or there is a way to control it. I looked into their code, and this code seems to determine the filename, while the "baseName" seems to be set here. But I haven't dug into further. @geoand any idea?

In any case, the Jib Quarkus extension simply uses the filename based on the jar task. If you configure the jar task so that the artifact name becomes xxx-unspecified.jar, I think at least it will work? Not that this is a good workaround.

@geoand
Copy link

geoand commented Feb 17, 2021

Hh... I don't see how that could happen TBH.

Is there any quarkus configuration being set?

@lfarkas
Copy link
Author

lfarkas commented Feb 17, 2021

not. this is default everything.

@geoand
Copy link

geoand commented Feb 17, 2021

Do you have an example application I can run to see this issue?

@lfarkas
Copy link
Author

lfarkas commented Feb 17, 2021

after further investigation the quarkus jib plugin only use the jar name and rename it. the unspecified refer to the version. and our quarkus project has no version. after we add a version it's works as the jar task and everything working. good to know that the version is a must! same as the mainClass (even if it's bogus). imho it'd be also useful to document it.

@lfarkas lfarkas closed this as completed Feb 17, 2021
@chanseokoh chanseokoh added type: bug Something isn't working kind/documentation Improvements or additions to documentation labels Feb 17, 2021
@chanseokoh
Copy link
Member

There may be something the Jib extension can do to make it work when the version is unspecified. I'll leave this issue open for tracking purposes, so that we may look into it when we have time (low priority).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation priority: p4 type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants