Open lfarkas opened 3 years ago
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.
Hh... I don't see how that could happen TBH.
Is there any quarkus configuration being set?
not. this is default everything.
Do you have an example application I can run to see this issue?
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.
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).
For others coming here:
./gradlew build -Dquarkus.application.version=1.0.0
Won't do the job. unspecified
comes from Gradle's version
property. So instead, you want:
./gradlew build -Pversion=1.0.0
it seems the quarkus plugin generate wrong filename. ie:
xxx-unspecified-runner.jar
in stead ofxxx-runner.jar
what i should have to change to generate good filename?this is the output of a build:
anyway if i rename
xxx-unspecified-runner.jar
toxxx-runner.jar
then the result is working.