无法使用maven-jaxb2-plugin编译

rkttyhzu  于 2021-07-06  发布在  Java
关注(0)|答案(0)|浏览(308)

由于某些原因,当我在circleci管道中运行mvn包时,我得到以下错误


# !/bin/bash -eo pipefail

mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------------< net:******>-----------------------------
[INFO] Building******0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @******---
[INFO] 
[INFO] --- maven-jaxb2-plugin:0.14.0:generate (default) @******---
[INFO] Sources are not up-to-date, XJC will be executed.
[ERROR] Error while parsing schema(s).Location [ file:/home/circleci/******-server/src/main/resources/wsdl/simpleBinding.xjb{8,58}].
com.sun.istack.SAXParseException2: The "jaxb:globalBindings" customization is not associated with any schema element.
    at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError (Internalizer.java:599)
    at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError (Internalizer.java:593)
    at com.sun.tools.xjc.reader.internalizer.Internalizer.move (Internalizer.java:402)
    at com.sun.tools.xjc.reader.internalizer.Internalizer.transform (Internalizer.java:153)
    at com.sun.tools.xjc.reader.internalizer.Internalizer.transform (Internalizer.java:107)
    at com.sun.tools.xjc.reader.internalizer.DOMForest.transform (DOMForest.java:440)
    at com.sun.tools.xjc.ModelLoader.buildDOMForest (ModelLoader.java:327)
    at com.sun.tools.xjc.ModelLoader.loadWSDL (ModelLoader.java:373)
    at com.sun.tools.xjc.ModelLoader.load (ModelLoader.java:158)
    at com.sun.tools.xjc.ModelLoader.load (ModelLoader.java:117)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.loadModel (XJC23Mojo.java:50)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:40)
    at org.jvnet.mjiip.v_2_3.XJC23Mojo.doExecute (XJC23Mojo.java:28)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute (RawXJC2Mojo.java:478)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute (RawXJC2Mojo.java:320)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

但由于某些原因,当我在计算机上本地运行mvn clean包时,它运行得很好。我已经确保mvn和java是同一个版本。原因是什么?


# !/bin/bash -eo pipefail

mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven
Java version: 14.0.1, vendor: AdoptOpenJDK, runtime: /usr/local/jdk-14.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-1077-aws", arch: "amd64", family: "unix"
CircleCI received exit code 0

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题