Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Compile failure in the modify-marshal sample with <xjc/> but fixed it somehow. #1147

@ericjvandervelden

Description

@ericjvandervelden

Hello,

In the build.xml of the modify-marshal sample there is:

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
    <classpath refid="classpath" />
 </taskdef>
  
<xjc schema="po.xsd" package="primer.po" destdir="gen-src">
      <produces dir="gen-src/primer.po" includes="**/*.java" />
</xjc> 

This does not work on my machine with java 8.
When I do in the modify-marshal sample (in eclipse) : ant compile, then the Java files are generated, but then I see an error:

compile:
     [echo] Compiling the schema...
    [mkdir] Created dir: C:\Users\ervelden\java\jaxb-v2\jaxb-ri\bundles\ri\target\stage\jaxb-ri\samples\modify-marshal\gen-src
      [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

BUILD FAILED
C:\Users\ervelden\java\jaxb-v2\jaxb-ri\bundles\ri\target\stage\jaxb-ri\samples\modify-marshal\build.xml:65: xjc failed

I saw that com.sun.tools.xjc.XJCFacade de main class is in de executable jaxb-xjc.jar.
So instead of the `<xjc/>` above, I do :
``` or, ``` ``` This works with java 8. I wanted to do: ``` ``` but XJCFacade has no execute method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions