-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Move from quarkus-extension.json to .yaml #4935
Conversation
d4f4da2
to
fcd77df
Compare
...-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java
Outdated
Show resolved
Hide resolved
"META-INF" + File.separator + BootstrapConstants.EXTENSION_PROPS_JSON_FILE_NAME); | ||
if (!extensionFile.exists()) { | ||
// if does not exist look for fallback .json | ||
extensionFile = new File(extensionFile.getParent(), "quarkus-extension.json"); |
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.
ultimately I would like to have the extensionFile be null and then look for yaml first, json second but didn't find api
...-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java
Outdated
Show resolved
Hide resolved
...-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java
Show resolved
Hide resolved
...atform-descriptor-json-plugin/src/main/java/io/quarkus/maven/ValidateExtensionsJsonMojo.java
Show resolved
Hide resolved
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.
LGTM, added some minor comments
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.
LGTM
fcd77df
to
d715747
Compare
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.
At least some of the commits should be squashed: we don't want commits with formatting fixes.
Also the ignore rule for uberjars must be updated here: https://github.com/quarkusio/quarkus/blob/master/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java#L102 .
Why: Humans read and write .yaml better than .json and yaml is a superset of json. This change addreses the need by: * ExtensionDescriptorMojo updated to read .yaml OR .json and then still massage the structure into new structure for backwards compatability. * GenerateExtensonsMojo reads .yaml or .json per extension. Still some javax.json code present so do a double-parse to convert back to java.json. * Not pretty but minimal change for v1 that can be cleaned up afterwards. * ValidateExtensionJsonMojo just updated to check if .yaml or .json file exists and can be read. + minor cleanup based on review
9f7fd75
to
6257c4b
Compare
Done.
good catch - sorry for missing that. fixed. |
Why:
and yaml is a superset of json.
This change addreses the need by:
the structure into new structure for backwards compatability.
present so do a double-parse to convert back to java.json.
Not pretty but minimal change for v1 that can be cleaned up
afterwards.
read.