簡體   English   中英

Maven XML構建失敗

[英]maven xml build is getting failed

運行mvn xmlbeans時出現以下錯誤:xmlbeans

我正在使用Maven版本3.5.0

D:\\ home \\ Code \\ abc-xmlbeans> MVN全新安裝

D:\\ home \\ Code \\ abc-xmlbeans> MVN Castor:generate

運行正常唯一的問題是以下錯誤:

D:\home\Code\abc-xmlbeans>mvn xmlbeans:xmlbeans
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WBILL XMLBEANS 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- xmlbeans-maven-plugin:2.3.3:xmlbeans (default-cli) @ abc-xmlbeans ---
java.io.IOException: Cannot run program "D:\home\Code\abc-xmlbeans\javac": CreateProcess error=2, The system cannot find the file specified
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "D:\home\Code\abc-xmlbeans\javac": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:231)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1154)
        at org.codehaus.mojo.xmlbeans.AbstractXmlBeansPlugin.execute(AbstractXmlBeansPlugin.java:280)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        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:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 28 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.688 s
[INFO] Finished at: 2018-10-11T16:52:57+05:30
[INFO] Final Memory: 10M/212M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:xmlbeans-maven-plugin:2.3.3:xmlbeans (default-cli) on project abc-xmlbeans: XmlBeans compile failed:
[ERROR]  xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List1.xsd
[ERROR] xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List2.xsd
[ERROR] xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List3.xsd
[ERROR] xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List4.xsd
[ERROR] xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List5.xsd
[ERROR] xml ErrorLoading schema file D:\home\Code\abc-xmlbeans\src\main\xsd\List6.xsd
[ERROR]
[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/MojoExecutionException

誰能幫助我解決此問題?

謝謝伊扎茲

轉到您的pom.xml,其中將包含xmlbeans-maven-plugin的定義信息。

只需在其定義中添加配置:

<configuration>

                <compiler>Path to your javac.exe....</compiler>
</configuration>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM