Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/306.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.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
Java 在JAXBRI示例中,ant脚本给出了一些我不理解的xjc错误_Java_Jaxb_Jaxb2 - Fatal编程技术网

Java 在JAXBRI示例中,ant脚本给出了一些我不理解的xjc错误

Java 在JAXBRI示例中,ant脚本给出了一些我不理解的xjc错误,java,jaxb,jaxb2,Java,Jaxb,Jaxb2,我从https://github.com/javaee/jaxb-v2,执行了mvn清洁安装,并转到target/stage/samples目录中的modify marshal。在那里,我创建了ant,并创建了Java类,但随后ant停止了,因为出现了一些我不理解的错误: compile: [echo] Compiling the schema... [xjc] C:\Users\ervelden\java\jaxb-v2\jaxb-ri\bundles\ri\target

我从
https://github.com/javaee/jaxb-v2
,执行了
mvn清洁安装
,并转到target/stage/samples目录中的modify marshal。在那里,我创建了
ant
,并创建了Java类,但随后ant停止了,因为出现了一些我不理解的错误:

compile:
     [echo] Compiling the schema...
      [xjc] C:\Users\ervelden\java\jaxb-v2\jaxb-ri\bundles\ri\target\stage\jaxb-ri\samples\modify-marshal\gen-src\primer.po is not found and thus excluded from the dependency check
      [xjc] Compiling file:/C:/Users/ervelden/java/jaxb-v2/jaxb-ri/bundles/ri/target/stage/jaxb-ri/samples/modify-marshal/po.xsd
      [xjc] Writing output to C:\Users\ervelden\java\jaxb-v2\jaxb-ri\bundles\ri\target\stage\jaxb-ri\samples\modify-marshal\gen-src
      [xjc] Command invoked: xjc"C:\Program Files\Java\jdk1.8.0_144\jre\bin\java.exe"
      [xjc] failure in the XJC task. Use the Ant -verbose switch for more details
在ant build.xml中有:

   <xjc schema="po.xsd" package="primer.po" destdir="gen-src">
      <produces dir="gen-src/primer.po" includes="**/*.java" />
    </xjc>


我也有同样的问题。我下载了jaxb-ri-2.3.0.zip,并创建了一个很小的build.xml文件。没有成功。@BOC我在中添加了fork=“true”,非常感谢,它工作得非常好。