Skip to content

Commit

Permalink
SchemaGenTask fails without fork
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Grigoriadi <[email protected]>
  • Loading branch information
Roman Grigoriadi committed Dec 5, 2018
1 parent c5bb550 commit 6f51ad9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,19 @@ public void setFile(String fileName) {
@Override
protected void compile() {
try {
boolean ok = false;
if (getFork()) {
setupCommand();
setupForkCommand("com.sun.tools.jxc.SchemaGeneratorFacade");
int status = run(getCommandline().getCommandline());
ok = (status == 0);
if (status != 0) {
if (!getVerbose()) {
log("Command invoked: " + "schemagen" + getCommandline().toString());
}
throw new BuildException("schemagen" + " failed", getLocation());
}
} else {
super.compile();
}
if (!ok) {
if (!getVerbose()) {
log("Command invoked: " + "schemagen" + getCommandline().toString());
}
throw new BuildException("schemagen" + " failed", getLocation());
}
} catch (Exception ex) {
if (ex instanceof BuildException) {
throw (BuildException) ex;
Expand Down

0 comments on commit 6f51ad9

Please sign in to comment.