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
3
votes
1 answer

Package JRE for Java application

My goal is to to package a standalone JRE alongside with my Java application via Maven, automatically. In order to achieve this, I use exec-maven-plugin and javapackager from JDK. My POM setting looks like this:
PAX
  • 1,056
  • 15
  • 33
3
votes
2 answers

exec-maven-plugin cannot execute .sh script: permission denied

I have a bash script which I want maven to run after the compilation phase, since the script is supposed to deploy bundles. Here is the plugin I am trying to utilize in my release module:
Schütze
  • 1,044
  • 5
  • 28
  • 48
3
votes
1 answer

How to execute a cleanup script on exec-maven-plugin:exec failure?

I'm currently using the maven plugin exec-maven-plugin to execute a script, this script launches several java programs corresponding to an integration test, if the test passes, everything is stopped properly by a cleanup script executed later in the…
Nicolas Filotto
  • 43,537
  • 11
  • 94
  • 122
3
votes
2 answers

Maven shade executable uber jar NoClassDefFoundError

I am creating a executable uber jar with the maven shade plugin, it has a dependency on some classes in a local system jar (mobile-dock-support.jar) that I want it to include during the package phase, so I have the shade plugin configured like…
PDStat
  • 5,513
  • 10
  • 51
  • 86
3
votes
2 answers

Maven Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3

hi im using maven to compile a jersey web services project and im getting error compiling it in windows 2008 server. Here is the error: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights…
chrizonline
  • 4,779
  • 17
  • 62
  • 102
3
votes
2 answers

Convert a list of bash arguments to a quoted single string

I'm trying to create a simple bash script to run a mvn command with some specific arguments and "sub" arguments, using the exec plugin. Seems simple, but I'm having problems to achieve the desired effect: here is the command to run: mvn exec:java…
user259923
  • 91
  • 4
3
votes
1 answer

2 exec-maven-plugin defined in POM - not working

I have two Java main classes that I need executed during different parts of a build process. One needs to execute ALWAYS as part of my standard build process during the generate-sources phase. The other needs to execute as part of a profile, but…
citress
  • 889
  • 3
  • 13
  • 35
3
votes
1 answer

Can I run maven plugin only if file changed after last build?

We are using maven-exec-plugin during prepare resources phase to create binary file which is later packaged into jar. Exec launches script which reads excel sheet and creates sqlite db. Now the script is run always, even if I don't run clean. How to…
Jarosław Jaryszew
  • 1,414
  • 1
  • 12
  • 13
3
votes
1 answer

Passing line.separator to maven

I would like to pass line.separator to exec plugin but it seems that I do not correctly passing it. I have tried many combinations but could not find the solution. What is the correct way? org.codehaus.mojo
Cemo
  • 5,370
  • 10
  • 50
  • 82
2
votes
2 answers

"exec-maven-plugin" does not execute

I have the following profile which I am executing successfully ("mvn exec:exec -DrunMule"): runMule runMule
TERACytE
  • 7,553
  • 13
  • 75
  • 111
2
votes
0 answers

How to ensure cleanup after a failure in pre-integration-test?

I am trying to set up integration testing in maven (v2) to be executed via Jenkins. I'm bringing up a large software stack (via the exec-maven-plugin) in the pre-integration-test phase of the maven POM. Unfortunately, this bring-up sometimes fails…
2
votes
1 answer

How do I call a ruby script as part of the Maven build process?

edit 2: I found the problem. The quick answer is that the lack of an for my newly configured execution was causing the problem. I'll leave the question here in case it helps someone else. I have a ruby script which generates some of my jUnit…
MrDrews
  • 2,139
  • 2
  • 22
  • 22
2
votes
1 answer

How to resolve the path to an artifact in a maven pom without being a project dependency?

I would like to know if it is possible to resolve the path for a maven artifact without having this artifact as a dependency in the project? What I am trying to do is to execute an external java code generator via exec-maven-plugin or…
PowerStat
  • 3,757
  • 8
  • 32
  • 57
2
votes
1 answer

ClassNotFoundException when running mvn exec:java on Windows

I am trying to run my program via the command line using Maven. The location of the class which starts everything off is projectFolder -> src -> frogger -> game -> MainMenu.java I've tried running mvn evec:java and I am getting the following…
mievvin
  • 55
  • 1
  • 7
2
votes
0 answers

Get annotations when exec-maven-plugin runs Main does not work

I would like to run a Main class with exec-maven-plugin and from my dependencies generate documentation like a swagger file. The annotation that I care is javax.ws.rs.Path which has @Retention(RetentionPolicy.RUNTIME) My Java code public class…
Sorin Penteleiciuc
  • 653
  • 1
  • 10
  • 26