Eric B.
Eric B.

Reputation: 24411

How to capture output of exec-maven-plugin?

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?

Upvotes: 6

Views: 5197

Answers (1)

M A
M A

Reputation: 72854

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

Upvotes: 7

Related Questions