首页 > 解决方案 > 构建项目时发生 Maven MojoExecutionException

问题描述

我正面临这个问题,当我使用 Maven 部署我的应用程序时,请提出一些解决方案。

错误日志

[ERROR] Failed to execute goal org.apache.cxf:cxf-xjc-plugin:3.1.0:xsdtojava (generate-xsd-sources) on project coin-model: Could not create runtime jar: The system cannot find the path specified -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-xjc-plugin:3.1.0:xsdtojava (generate-xsd-sources) on project coin-model: Could not create runtime jar
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
...
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not create runtime jar
        at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.runForked(AbstractXSDToJavaMojo.java:509)
        at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.run (http://org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.run)(AbstractXSDToJavaMojo.java:342)
        at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:238)
        ... 22 more
Caused by: java.io.IOException: The system cannot find the path specified
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createTempFile(File.java:2024)
        at java.io.File.createTempFile(File.java:2070)
        at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.runForked(AbstractXSDToJavaMojo.java:465)
        ... 24 more

标签: javamaven

解决方案


提供的 jar 路径可能不正确。


推荐阅读