Add suport to Java 9+
fincatto opened this issue · 5 comments
mvn beanstalk:upload-source-bundle
javax/xml/bind/DatatypeConverter: javax.xml.bind.DatatypeConverter
Can you please elaborate on this?
Sure.
When we try to run this goal mvn beanstalk:upload-source-bundle
using java9 ou newer, this error occurs:
[INFO] --- beanstalk-maven-plugin:1.5.0:upload-source-bundle (default-cli) @ jbear-admin --- [INFO] Target Path: s3://elasticbeanstalk-us-east-1-123456789/jbear-admin/jbear-admin-20180522203549.war [INFO] Uploading artifact file: /Users/diego/Projects/wmix/jbear-admin/target/jbear-admin##20180522203549.war 0,00% 0 bytes/61 MiB [WARNING] You should encrypt your passwords. See http://beanstalker.ingenieux.com.br/security.html for more information 0,00% 0 bytes/61 MiB [WARNING] FAILURE com.amazonaws.AmazonClientException: Unable to complete transfer: javax/xml/bind/DatatypeConverter at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.unwrapExecutionException (AbstractTransfer.java:277) at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.rethrowExecutionException (AbstractTransfer.java:261) at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.waitForCompletion (AbstractTransfer.java:103) at br.com.ingenieux.mojo.aws.util.BeanstalkerS3Client.putObject (BeanstalkerS3Client.java:115) at br.com.ingenieux.mojo.beanstalk.bundle.UploadSourceBundleMojo.executeInternal (UploadSourceBundleMojo.java:119) at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute (AbstractAWSMojo.java:375) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290) at org.apache.maven.cli.MavenCli.main (MavenCli.java:194) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
This happen because java removed the package javax.xml from core, so you need to declare it on your maven dependencies.
I believe you can temporarily lift those restrictions by overriding the aws-sdk-java dependency (plugin-wide) on the POM
I can confirm that adding the following to the plugin configuration resolves the issue.
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.478</version>
</dependency>
</dependencies>
@aldrinleal do you plan to create a new release with this fix? I'm asking because this plugin hasn't been updated in nearly two years. Should we consider it deprecated?
In #117 aws-java-sdk
was upgraded, so this issue can be closed.