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

Can you define both an exec and java goal for maven exec plugin?

I'm trying to do a couple tasks with the maven exec plugin. One is to run a script to generate some external data that the app will use. The second is to run a chunk of java code to do some convenience work during the compile…
andematt
  • 403
  • 4
  • 10
4
votes
3 answers

How to set the file.encoding property at exec-maven-plugin?

I trying to exec my standalone application via exec-maven-plugin, but it started with WIN encoding, not UTF-8. I read about Java command line key -Dfile.encoding=UTF-8. How to set this property to my application? Thanx. maven pom:
4
votes
2 answers

Re-installing maven dependency project causes NoClassDefFoundError in already running application

Let's say I have a very simple maven project ProjA which has no dependencies itself. This project ProjA has classes X and Y as follows: class X package proja; public class X { static { System.out.println("X loaded"); } public…
Antonio Tomac
  • 438
  • 5
  • 12
4
votes
1 answer

Run a goal of a plugin inside a profile

integration-tests integrations true
Alkis Kalogeris
  • 17,044
  • 15
  • 59
  • 113
4
votes
3 answers

Using Maven to install Bower components with Bower installed globally

I have bower installed globally using NPM. In my Maven project I have a bower.json file, I am using the exec-maven-plugin to install the bower components on build, however it failed because it "cannot run the program 'bower' in directory" which…
Tom
  • 330
  • 1
  • 3
  • 17
4
votes
1 answer

How to exclude project dependency from classpath used by maven plugin

I am using the Exec Maven Plugin to run a java program inside of my maven build. I have a problem when executing this java program using the exec plugin, because it executes with a classpath which contains the project's dependencies, including an…
Marko Previsic
  • 1,820
  • 16
  • 30
4
votes
2 answers

how to execute multiple command prompt commands using maven in single pom.xml

I want to run multiple command prompt commands in maven using single pom.xml. How can I do that? For ex: I have 2 commands to execute. I am executing the first command by using exec-maven-plugin. Below is the portion of my pom.xml to execute the…
galme
  • 603
  • 3
  • 10
  • 24
4
votes
1 answer

Maven exec plugin - user args from console after hardcoded args

I'm implementing a simple RMI server and client. I wanted to speed up the tedious task of adding server codebase each time (lots of terminal-bloating text), so I decided to use the maven exec plugin. Here's how a part of my pom.xml looks…
Wojtek
  • 2,514
  • 5
  • 26
  • 31
4
votes
1 answer

Always run lifecycle phase (e.g. package) before goal (e.g. exec:exec)

I'm trying to get into maven and started writing just a small library. As part of the library code I want to have a small demo java application one can use to see what the library is doing and how to use it. One thing that really annoys me right now…
Jan Olaf Krems
  • 2,274
  • 1
  • 14
  • 11
4
votes
1 answer

Exec Maven Plugin to Command Line

I have an application developed in NetBeans/Maven that can be started via command line with: mvn exec:exec "-Dexec.executable=C:\\Java\\jdk1.6.0_33\\bin\\java.exe" "-Dexec.args=-Dlog4j.properties=... -classpath %classpath com.xxx.MyLauncher"…
mistercaste
  • 236
  • 2
  • 4
3
votes
1 answer

Maven Exec Plugin is Blocked and HTTP Server starts after Integration Tests are executed

I have been trying to convert our Integration tests to use the Maven Exec Plugin to start a server but it will only start the HTTP Server after the Integration tests have been executed, even though I have pre-integration-test…
M_K
  • 3,247
  • 6
  • 30
  • 47
3
votes
2 answers

exec-maven-plugin plugin error

I use the exec-maven-plugin as follow exec-maven-plugin org.codehaus.mojo 1.6.0
flamant
  • 733
  • 4
  • 15
  • 41
3
votes
1 answer

How to compile java files which are getting generated at run time

I am looking to compile classes which is generating at runtime by Code Generate.java. I am successfully able to run the Generate.java at run time by exec-maven-plugin. It is generating code in generated-source-java. But this code is not getting…
3
votes
1 answer

Same plugin with different configurations

I'm using Maven 3.3.9. Is it possible to have the same goal for the same plugin with different configurations? I mean something like this ...
Schizoping
  • 137
  • 10
3
votes
0 answers

How do you get output from a maven plugin in Eclipse when using the m2e lifecycle-mapping?

I'm unable to get any output from the custom java class (SchemaGenerator) to output in the Eclipse Maven console. Is there a way to do this? The class currently uses sys out and sys err, which appears in the output when using mvn from command…
Jitesh Vassa
  • 477
  • 5
  • 12