Allow setting platform specific classifier for aws-crt-client
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
The aws-crt package is a large JAR that contains all compiled C libraries for many different platforms (Windows, Linux, etc). However, it provides the possiblity to build platform specific JARs by setting a classifier ([Reference](https://github.com/awslabs/aws-crt-java?tab=readme-ov-file#platform-specific-jars)).
Example:
```xml
software.amazon.awssdk.crt
aws-crt
0.29.20
linux-x86_64
```
**Why:**
The size of an example project generated with the AWS SDK Maven Archetype + AWS CRT Client as an Uber-Jar as well as a GraalVM native image is significantly smaller with the classifier as it only includes the needed C libraries for the target platform:
| Artifact Type | Default Artifact Size | With Platform Classifier (osx-x86_64) | Reduction in % |
|---|---|---|---|
| Uber JAR | 24.7 MB | 8.5 MB | 65.59% | |
| GraalVM native image | 175 MB | 92.7 MB | 47.21% |
**Problem:**
When using the AWS SDK it is not possible to set the classifier on the aws-crt-client dependency directly:
```xml
software.amazon.awssdk
aws-crt-client
linux-x86_64
```
The current workaround is to exlude the aws-crt dependency and override it including the classifier. However, then also the aws-crt version has to be set:
```xml
software.amazon.awssdk
aws-crt-client
software.amazon.awssdk.crt
aws-crt
software.amazon.awssdk.crt
aws-crt
0.29.20
linux-x86_64
```
### Proposed Solution
TBD
### Other Information
_No response_
### Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS Java SDK version used
2.26.3
### JDK version used
21
### Operating System and version
OSX
Contributor guide
Assessment
This issue has not been assessed yet.