exec-maven-plugin

How to pass systemProperties when invoking exec:java plugin in maven?

微笑、不失礼 提交于 2019-11-28 13:16:46
I want to use the exec:java plugin to invoke the main class from command line. I can pass arguments from the command line using -Dexec.args="arg0 arg1 arg2" , I don't know how to pass system properties. I tried '-Dexec.systemProperties="key=value"` but with no effect. pom.xml looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <configuration> <mainClass>ibis.structure.Structure</mainClass> </configuration> </plugin> Sean Patrick Floyd There is no way to set the <systemProperties> parameter on the command line. However, since exec:java is

Maven & Java: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid

梦想的初衷 提交于 2019-11-28 08:58:42
My Java EE proj builds fine, but when trying to execute get following error: gert@gert-VirtualBox:~/workspace/CDBOOKSTORE$ mvn exec:java [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building CDBOOKSTORE 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ CDBOOKSTORE >>> [INFO] [INFO] --- maven-dependency-plugin:2.8:copy (default) @ CDBOOKSTORE --- [INFO] [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @

Maven exec:java goal on a multi-module project

偶尔善良 提交于 2019-11-28 08:01:33
I'm trying to run exec-maven-plugin 's exec:java goal on a simple two-module project where one module depends on the other. So far I can't find a configuration that works. Here's a boiled-down test case: exec-multi-module-test/ pom.xml module1/ pom.xml src/ main/ java/ HelloPrinter.java module2/ pom.xml src/ main/ java/ MyMain.java Here's the parent pom: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

Running daemon with exec-maven-plugin avoiding `IllegalThreadStateException`

余生颓废 提交于 2019-11-27 21:04:41
I would like to run a daemon thread which should start on maven package phase. This is what I have in pom.xml: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>com.test.Startup</mainClass> <cleanupDaemonThreads>true</cleanupDaemonThreads> </configuration> </plugin> </plugins> </build> And here is the content of the class Startup: public class Startup { public static class

How to pass systemProperties when invoking exec:java plugin in maven?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 07:34:50
问题 I want to use the exec:java plugin to invoke the main class from command line. I can pass arguments from the command line using -Dexec.args="arg0 arg1 arg2" , I don't know how to pass system properties. I tried '-Dexec.systemProperties="key=value"` but with no effect. pom.xml looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <configuration> <mainClass>ibis.structure.Structure</mainClass> </configuration> </plugin> 回答1: There is no way to

Maven exec:java goal on a multi-module project

只愿长相守 提交于 2019-11-27 02:02:30
问题 I'm trying to run exec-maven-plugin 's exec:java goal on a simple two-module project where one module depends on the other. So far I can't find a configuration that works. Here's a boiled-down test case: exec-multi-module-test/ pom.xml module1/ pom.xml src/ main/ java/ HelloPrinter.java module2/ pom.xml src/ main/ java/ MyMain.java Here's the parent pom: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema

Running daemon with exec-maven-plugin avoiding `IllegalThreadStateException`

为君一笑 提交于 2019-11-26 23:00:49
问题 I would like to run a daemon thread which should start on maven package phase. This is what I have in pom.xml: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>com.test.Startup</mainClass> <cleanupDaemonThreads>true</cleanupDaemonThreads> </configuration> </plugin> </plugins>

Run batch script as admin during Maven build

南笙酒味 提交于 2019-11-26 18:37:52
问题 I'm trying to set up a build process during which, a Windows service has to be started and stopped. I tried doing that by using the exec-maven-plugin : <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.6.0</version> <executions> <execution> <id>startServer</id> <goals> <goal>exec</goal> </goals> <configuration> <executable>${project.basedir}/bin/startService.cmd</executable> <workingDirectory>${project.basedir}/bin</workingDirectory> <