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
1
vote
2 answers

Can we execute exec-maven-plugin before maven-surefire-plugin?

Is it possible to run exec-maven-plugin before maven-surefire-plugin, what I observe during my run is maven-surefire-plugin is executing first even though the sequence in tag is second. My scenario is to execute JAVA CLASS (using exec-maven-plugin…
1
vote
0 answers

Jacoco agent does not measure any code coverage run by exec-maven-plugin

I want measure code coverage with exec-maven-plugin and jacoco together. For now, I can execute my Main class (without cover) and I can measure my coverage of my unit tests. I want to measure code coverage when running my main class. Run my Main…
Stéphane GRILLON
  • 11,140
  • 10
  • 85
  • 154
1
vote
1 answer

How do I run the maven exec plugin multiple times in a build

Below is the relevant part of my POM - org.codehaus.mojo exec-maven-plugin 1.5.0 StartHub
Savvy
  • 547
  • 5
  • 12
1
vote
1 answer

AWS Device farm Not able to upload the test as error coming 'Could not find test jar'

I am trying to upload a test using maven on AWS device farm , But while uploading the test error coming that "There was a problem processing your file. Could not find test jar." Have added all the dependencies/jars , don't know why this error is…
Gurpreet Singh
  • 139
  • 2
  • 3
  • 10
1
vote
1 answer

not able to execute mainClass from pom.xml

I am trying to execute pom.xml having mainClass mentioned in it but it is not being executed. command : mvn test -f "path_to_pom.xml\pom.xml" Output: [INFO] Scanning for projects... [INFO] [INFO]…
Sagar
  • 13
  • 6
1
vote
0 answers

How to start java app from Maven in non-base project folder?

I'm using Intellij Idea 14 and start learning embedded Maven installation. At now Maven compile sources, generate JAR with MANIFEST.MF inside (with 'lib/' prefixes in 'Class-Path') to 'target/', copy dependencies at 'target/lib/' folder, copy folder…
lanmaster
  • 330
  • 2
  • 16
1
vote
1 answer

How to execute 'Premain' method not getting invoked with exec-maven-plugin

org.codehaus.mojo exec-maven-plugin 1.4.0 com.test.MainClass
Gaurav Goel
  • 325
  • 2
  • 14
1
vote
1 answer

Maven exec plugin build SUCCESS even if executable fails on Windows

I have a maven project in which I execute a windows .bat file using maven exec plugin. The problem is that, even if the bat execution fails (i.e. exit code is -1) the build of the project is SUCCESS. Here is my defined plugin:
vadim
  • 993
  • 13
  • 29
1
vote
0 answers

How to fix maven dependency scope conflicts (runtime-compile-provided)?

I have a project where I use multiple dependencies. I'm used to execute my code in a dev environment using mvn compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass="my.Main" That worked fine until I recently started using a dependency…
Crystark
  • 3,693
  • 5
  • 40
  • 61
1
vote
2 answers

Linux command (unzip -p) run with exec-maven-plugin

I have my.zip file under project’s target/ folder. MyProject/ -target/ -my.zip -pom.xml Inside my.zip there is a file named names.txt. If I run linux command under project root: unzip -p target/my.zip names.txt >…
user842225
  • 5,445
  • 15
  • 69
  • 119
1
vote
0 answers

Unable to grant file permission using exec-maven-plugin

I'm trying to grant file permission using next exec-maven-plugin config: org.codehaus.mojo exec-maven-plugin 1.2.1
XZen
  • 225
  • 5
  • 27
  • 49
1
vote
1 answer

Validate phase used twice with exec-maven-plugin associated with process-classes phase

I have a strange behaviour with my Maven build, using the exec-maven-plugin. I note that, even if associated with the process-classes phase, the exec-maven-plugin (using the java goal) regoes through the validate phase. I can't find any explanation…
Ardemius
  • 380
  • 4
  • 14
1
vote
1 answer

Problems with classpath with JSP using maven exec:java plugin under Windows

I'm trying to run a Jetty web framework from main(...) that loads a spring web context which loads JSPs at runtime. This works great from the command line using mvn exec:java on OSX and Linux. However on Windows, running Cygwin, I cannot get it to…
Gray
  • 115,027
  • 24
  • 293
  • 354
1
vote
1 answer

execute a batch file in maven during compile

I'm using the exec-maven-plugin to execute a batch file with maven. I had it running during the package phase, but I need it to run earlier. The compilation phase would be fine. The batch script generates a properties file that contains the svn…
Rick
  • 362
  • 5
  • 16
1
vote
1 answer

Failed to execute goal org.codehaus.mojo exec-maven-plugin while reading a config.xml file

My code is working when I run it as java application in eclipse but it fails when I run maven install with maven-exec plug-in. I know that it it fails because of it doesn't find config file but how? If I exclude the maven-exec plugin it builds…
fatihonurIRL
  • 51
  • 1
  • 9