从 Java 8 升级到 Java 10 后无法将 jar 部署到 S3,这是怎么回事?



从 Java 8 升级到 Java 10 后,我无法再部署到 AWS S3。我在pom的构建部分有这个.xml:

<extensions>
<extension>
<groupId>com.allogy.maven.wagon</groupId>
<artifactId>maven-s3-wagon</artifactId>
<version>1.1.0</version>
</extension>
</extensions>

然后我定义了存储库:

<distributionManagement>
<repository>
<id>projectx-aws-release</id>
<name>ProjectX AWS Release Repository</name>
<url>s3://projectx-support/maven2</url>
</repository>
<snapshotRepository>
<id>projectx-aws-snapshots</id>
<name>ProjectX AWS Snapshot Repository</name>
<url>s3://projectx-support/maven2</url>
</snapshotRepository>
</distributionManagement>

这是我得到的错误:

Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: A required class was missing while executing org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy: javax/xml/bind/Datatype

转炉

当事情开始出错时的完整输出是:

Uploading to projectx-aws-release: s3://projectx-support/maven2/tech/projectx/projectxcommon/1.0.0-beta.9/projectxcommon-1.0.0-beta.9.jar
[INFO] File permissions: Private
[INFO] Logged in - projectx-support
[INFO] Uploading: s3://projectx-support/maven2/tech/projectx/projectxcommon/1.0.0-beta.9/projectxcommon-1.0.0-beta.9.jar
[INFO] Logged off - projectx-support
[INFO] Transfers: 1 Time: 368ms Amount: 71.5k Throughput: 194.232 KB/s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.811 s
[INFO] Finished at: 2018-06-27T11:53:20+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project projectxcommon: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: A required class was missing while executing org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy: javax/xml/bind/Datatype
Converter
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/pupeno/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar
[ERROR] urls[1] = file:/C:/Users/pupeno/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[2] = file:/C:/Users/pupeno/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>tech.projectx:projectxcommon:1.0.0-beta.9, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : javax.xml.bind.DatatypeConverter
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

知道发生了什么吗?这是一个存在于Java 8中而不是Java 10中的类吗?这听起来不太可能。

我尝试以这种方式将javax.xml.bind添加到我的项目中:

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>

但这对错误没有影响。

我设法解决了将货车从 1.1.0 版更新到 1.2.0 的问题

最新更新