sbt / sbt-s3

sbt-s3 is a simple sbt plugin to manipulate objects on Amazon S3
Apache License 2.0
63 stars 29 forks source link

Support Java 11 #65

Open forficate opened 5 years ago

forficate commented 5 years ago

Using plugin on OpenJDK 11 produces the below errors on upload:

[info] Done packaging. 
[error] java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter 
[error]     at com.amazonaws.util.Base64.encodeAsString(Base64.java:39) 
[error]     at com.amazonaws.util.Md5Utils.md5AsBase64(Md5Utils.java:104) 
[error]     at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1489) 
[error]     at com.typesafe.sbt.S3Plugin$.$anonfun$s3Settings$1(S3Plugin.scala:179) 
[error]     at com.typesafe.sbt.S3Plugin$.$anonfun$s3Settings$1$adapted(S3Plugin.scala:176) 
[error]     at com.typesafe.sbt.S3Plugin$.$anonfun$s3InitTask$2(S3Plugin.scala:118) 

This looks to be because the current version of the AWS SDK used does not support Java 11.

The SDK would need updating to AWS SDK2 or use the hacks in the following link to bring in the dependencies https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

coding-bunny commented 3 years ago

Any update on this? I'm working around the issue by manually adding the required dependencies to my project, but obviously this blows up the size of the JAR which is an issue for AWS.

Would be nice to see this project implement the required changes to fix this.