6

I'm trying to use the exec-maven-plugin as a way to integrate a 3rd party Java API. I'm using the exec:java goal to call my java main class. I need to parse the output of the API, however I do not see anything specific in the plugin that allows for this.

Is there a way in maven and/or the exec-maven-plugin to capture/save the output of the executions?

Eric B.
  • 23,425
  • 50
  • 169
  • 316

1 Answers1

7

With the exec:exec goal, you can use the outputFile parameter (or using the command line property exec.outputFile).

M A
  • 71,713
  • 13
  • 134
  • 174
  • Thanks. I should have specified that I was using the `exec:java` goal. If desperate, I guess I can use the `exec:exec` goal if noone else has another solution available. – Eric B. Jun 29 '15 at 19:42
  • `exec:java` runs within the current JVM as the Maven build. You can always fork `java` with the `exec:exec` goal. – M A Jun 29 '15 at 20:01