-
Notifications
You must be signed in to change notification settings - Fork 219
Generate a Versions file to be consumed at runtime #1667
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
Generate a Versions file to be consumed at runtime #1667
Conversation
Note that this should probably be integrated with https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/Version.java, which already provides the SDK version. |
What I meant is that all these versions should be accessible via |
@metacosm I have attempted to follow your comment, unsure if this is what you meant ... |
|
||
private Versions() {} | ||
|
||
protected static final String JOSDK = "${project.version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you pls enlighten me how this supposed to work? Where are those placeholders filled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is filled by the Maven Plugin as it is in java-templates
folder as opposed to java
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to write a unit test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here: 52643d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thx!
@@ -47,6 +47,19 @@ | |||
<commitIdGenerationMode>full</commitIdGenerationMode> | |||
</configuration> | |||
</plugin> | |||
<plugin> | |||
<groupId>org.codehaus.mojo</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fill in the information that is available in Maven.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections, if this helps with the quarkus extension fine by me.
@andreaTP could you give me access to push changes to your branch, please? Or would you prefer I open a different PR based on this one with my changes? |
@metacosm as you prefer, you have an invite for my fork or you can open another PR to target the improvements or whatever. |
Didn't easily manage to push changes to the original branch so created a new PR: #1706. |
No worries, thanks @metacosm ! |
This will enable compile time checks of the versions in the Quarkus Operator SDK.
ref: quarkiverse/quarkus-operator-sdk#460
cc. @metacosm