Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 执行失败:java.io.IOException:无法运行程序;mkdir";_Maven_Ant_Maven 3 - Fatal编程技术网

Maven 执行失败:java.io.IOException:无法运行程序;mkdir";

Maven 执行失败:java.io.IOException:无法运行程序;mkdir";,maven,ant,maven-3,Maven,Ant,Maven 3,我正在尝试构建maven项目。我遇到以下错误。下面是完整的堆栈跟踪 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (rpmbuild) on project ers: An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] C:\Use

我正在尝试构建maven项目。我遇到以下错误。下面是完整的堆栈跟踪

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (rpmbuild) on project ers: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] C:\Users\XYZ-PC\git\ers\target\rpm-spec-template\rpmbuild.xml:4: Execute failed: java.io.IOException: Cannot run program "mkdir": CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<ant antfile="C:\Users\XYZ-PC\git\ers\target/rpm-spec-template/rpmbuild.xml"/>... @ 4:93 in C:\Users\XYZ-PC\git\ers\target\antrun\build-main.xml
[ERROR] -> [Help 1]
[ERROR]无法在项目ers上执行目标org.apache.maven.plugins:maven antrun plugin:1.7:run(rpmbuild):发生Ant Build异常:执行此行时发生以下错误:
[错误]C:\Users\XYZ-PC\git\ers\target\rpm spec template\rpmbuild.xml:4:执行失败:java.io.IOException:无法运行程序“mkdir”:CreateProcess ERROR=2,系统找不到指定的文件
[错误]蚂蚁部分周围……@C:\Users\XYZ-PC\git\ers\target\antrun\build-main.xml中的4:93
[错误]->[帮助1]
我已经尝试寻找这个问题,但我发现的可能是它的JRE问题,我已经检查并确保我的源代码使用的是JDK而不是JRE


我被困住了,任何帮助都将不胜感激。

这与构建RPM有关吗?RPM通常在Linux上使用,虽然在Windows上也可以使用它们(我自己还没有这样做),但您需要安装Cygwin。我想你需要从Cygwin内部运行maven。你安装了Cygwin吗?你在Cygwin中运行maven时会收到同样的消息吗?@LukeWoodward是的,实际上我正在尝试构建RPM。我尝试过Cygwin,但错误仍然是一样的。我建议你与编写你的rpmbuild xml文件的人谈谈。您可能需要在RPM的目标操作系统上运行此构建。