[GR-64832] [GR-64725] Gracefully handle '--enable-sbom' in CE builds #11191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for gracefully handling the case when a user incorrectly enables the SBOM feature for Community Edition. The SBOM feature is only supported for Oracle GraalVM.
This is implemented by creating a
SBOMFeature
class that defines the SBOM API and that ensures aUnsupportedSBOMValueValidator
displays a helpful error message if the SBOM feature is activated. Specifically, two failure modes are added:--enable-sbom
option is used without values or if values are used butfalse
is not the last value. For instance,--enable-sbom=false,export
will produce the following error:native-image.properties
). Native Image only supports subtractive option usage from the CLI. For instance, includingArgs = --enable-sbom=false
in anative-image.properties
file will produce the following error: