Include mime.types in sdk-core native image resources - #7064
Closed
sjh9714 wants to merge 1 commit into
Closed
Conversation
Contributor
|
Thank you for your contribution! Merged through #7065 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Fixes #7063.
sdk-coreloadssoftware/amazon/awssdk/core/util/mime.typesfor default MIME type detection, but the native-image resource configuration did not include that resource. In GraalVM native images, known file extensions can then fall back toapplication/octet-streambecause the MIME table is unavailable.This submission was generated by AI tools and reviewed by sjh9714.
Modifications
mime.typesresource toresource-config.jsonfor native-image builds.MimetypeTestassertion that the native-image resource config includes the MIME table resource.Testing
./mvnw -q -pl :sdk-core -am -Dtest=MimetypeTest#nativeImageResourceConfig_includesMimeTypes -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dspotbugs.skip=true -Dcheckstyle.skip=true test./mvnw -q -pl :sdk-core -am -Dtest=MimetypeTest#nativeImageResourceConfig_includesMimeTypes -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dspotbugs.skip=true -Dcheckstyle.skip=true test./mvnw -q -pl :sdk-core -am -Dtest=MimetypeTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dspotbugs.skip=true -Dcheckstyle.skip=true testJAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -q -pl :sdk-core -am -Dtest=MimetypeTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false testNote: I also tried the Java 21 targeted reactor without skipping SpotBugs, but SpotBugs failed before reaching
sdk-corewithDirectoryNotEmptyExceptionforcore/annotations/target/classes. The Java 17 command above uses the repository's Java-17 profile, which skips SpotBugs and runs the focused test class successfully.Screenshots (if appropriate)
N/A
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License