I want to read the current artifact version of my maven-project inside my of a RESTful service. My code is written in JAX-RS (Quarkus).
I am using a the following pom.xml
snippet:
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
I read the version with the following java snippet:
String vendor = getClass().getPackage().getImplementationVendor();
It seems to me that the quarkus-maven-plugin
is ignoring that line since maven-jar-plugin
is working perfectly fine (I used this in a different project):
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
I do not have a really profound knowledge of maven and quarkus yet.
Am I making a mistake setting up the quarkus-maven-plugin
?
Is there a workaround which does not include reading directly from the pom.xml
?
Thank you for helping me.
EDIT: I will mark this thread as "answered" as soon as the following issue is resolved (opend by @Guillaume Smet): https://github.com/quarkusio/quarkus/issues/5023
EDIT: Issue is resolved as of today. https://github.com/quarkusio/quarkus/issues/5100