Questions tagged [exec-maven-plugin]

Use this tag for questions specifically related to the usage of the Exec Maven Plugin, which allows to execute arbitrary programs or other Java programs during a Maven build.

The plugin offers two goals: exec:exec and exec:java. The first one can be used to run arbitrary programs. The second to run other Java programs, however the latter does not spawn a new process.

More Info

229 questions
6
votes
1 answer

Running a class file through "mvn exec:exec"

I am new to maven and facing problems while running a class file through maven It runs fine with mvn exec:java -Dexec.mainClass="com.test.Test" But not with mvn exec:exec -Dexec.executable=java -Dexec.mainClass="com.test.Test" It asks for java…
Ravi Sahu
  • 890
  • 1
  • 11
  • 24
5
votes
3 answers

exec-maven-plugin goal is not started during build

Hallo, I try to run a main method during my maven build process. Hence, I added the exec-maven-plugin and the following snippet to my pom.xml
andreas
  • 1,483
  • 1
  • 15
  • 36
5
votes
1 answer

Using exec-maven-plugin to a maven phase

I am using the exec-maven-plugin to execute a java application to do some code generation in my project: org.codehaus.mojo exec-maven-plugin
Yashu
  • 485
  • 1
  • 10
  • 22
5
votes
2 answers

Passing an enviornment variable to executed process in Maven

I've been banging my head against a wall for about an hour on this: I'm trying to pass a simple property (java.library.path) to exec-maven-plugin. The goal is to have it integrate with Netbeans Right Click file > Run File procedure. So I set my POM…
TheLQ
  • 14,830
  • 14
  • 69
  • 107
5
votes
1 answer

exec maven plugin: exit code

I am having the following plugin to run a .sh script: exec-maven-plugin org.codehaus.mojo deploy-bundles install
Schütze
  • 1,044
  • 5
  • 28
  • 48
5
votes
1 answer

Maven - pass argument to use in exec-maven-plugin

in my pom I've added the exec-maven-plugin to call a java class which will generate a file. This class requires some parameters to be passed to the main method, one of those is the location of an input file (outside the project). Until now I've been…
Stijn Geukens
  • 15,454
  • 8
  • 66
  • 101
5
votes
1 answer

Use maven-exec-plugin to run command line

I want to use maven-exec-plugin to run command line (cmd) for converting a Markdown file to a PDF file using Pandoc. To do that manually, I've executed these commands: pandoc ReadMe.md -o ReadMe.html pandoc ReadMe.html --latex-engine=xelatex -o…
Jonathan Anctil
  • 1,025
  • 3
  • 20
  • 44
5
votes
1 answer

exec-maven-plugin difference between arguments and commandlineArgs

I'm trying to use exec-maven-plugin with the java goal. However, I am confused by the difference between the two options: arguments commandlineArgs If I try using arguments, the call to my java class fails. The signature of my class being called…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
5
votes
1 answer

Passing Working Directory to npm in exec-maven-plugin

I am trying to run npm as part of my maven build. I am using exec-maven-plugin and here is my plugin section from pom.xml org.codehaus.mojo exec-maven-plugin
Sateesh K
  • 1,071
  • 3
  • 19
  • 45
5
votes
1 answer

How to get "[DEBUG] Executing command line:" when running exec-maven-plugin java

I am running someone else's pom.xml which has: org.codehaus.mojo exec-maven-plugin 1.3.2
user3722575
  • 71
  • 1
  • 2
  • 8
5
votes
2 answers

Is it possible to run multiple maven-exec-plugin executions in parallel?

Is it possible to run multiple exec-maven-plugin executions in parallel somehow? We want to have different database types deployed for DAL integration testing, and while it's obviously possible to do this in sequence, it's a huge waste of…
mac
  • 2,672
  • 4
  • 31
  • 43
5
votes
2 answers

java maven exec-maven-plugin not executing on mvn clean install

Follow-up to a previous question: Maven run class before test phase: exec-maven-plugin exec:java not executing class. I am running jUnit4 tests, built with maven, on a jenkins box. I need to run a specific main-method java program before before the…
bobanahalf
  • 829
  • 1
  • 11
  • 23
5
votes
3 answers

Maven run class before test phase: exec-maven-plugin exec:java not executing class

I am running jUnit4 tests, built with Maven, on a Jenkins box. My goal is to restore a test database before executing the tests. It looks like exec-maven-plugin is the way to go, but I cannot get it running. Any pointers? Although there are lots of…
bobanahalf
  • 829
  • 1
  • 11
  • 23
5
votes
4 answers

exec-maven-plugin could not find or load main class but output runs fine on the command line

I try to use the exec-maven-plugin to run a Java program. I use the following pom snippet: org.codehaus.mojo exec-maven-plugin
vogella
  • 24,574
  • 4
  • 29
  • 26
5
votes
1 answer

How to run non-Java tests within maven-failsafe?

I am building a webapp project using Maven, using maven-failsafe-plugin for my integration tests. A cargo Glassfish3x container is started bound to the pre-integration-test phase, and stopped as part of the post-integration-test phase. However, my…
1 2
3
15 16