Skip to content

Mvnd dont exit with Non-zero value when error occurs. #1129

@ZhangWen-Leo

Description

@ZhangWen-Leo

Here is my java code:

public void execInstall() {
  ProcessBuilder pb = new ProcessBuilder("mvnd install").inheritIO();
  Process process = pb.start();
  process.waitFor();
  if (process.exitValue() == 0) {
    // This means suceed
  } else {
    // This means some error occured
  }
}

But this haven't act as what I want.When something wrong occurs with the "mvnd install", I didn't get a non-zero value from the process.exitValue().

When I change the mvnd to mvn, it just act as I want.

Help me plz.

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