exec-maven-plugin

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

喜你入骨 提交于 2019-12-25 09:26:59
问题 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 ) which generates my testng.xml and can run that using (maven-surefire-plugin). 回答1: First of all, if you have an execution of the exec-maven-plugin bound to the test phase, it is normal that this execution is performed after the one of the maven

Using Maven to install Bower components with Bower installed globally

此生再无相见时 提交于 2019-12-23 15:09:06
问题 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 makes sense because Bower is not locally installed in the project directory. However I want to use the global version of Bower so I don't have separate Bower programs in all my projects, it works if I go to the directory in terminal and manual run

Using Maven to install Bower components with Bower installed globally

大憨熊 提交于 2019-12-23 15:06:24
问题 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 makes sense because Bower is not locally installed in the project directory. However I want to use the global version of Bower so I don't have separate Bower programs in all my projects, it works if I go to the directory in terminal and manual run

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

半城伤御伤魂 提交于 2019-12-23 03:39:09
问题 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 first command: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <id>load files</id> <phase>install</phase> <goals> <goal>exec</goal> </goals> </execution> <

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

最后都变了- 提交于 2019-12-18 05:02:32
问题 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 using a relative path for this which works fine: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> </execution> </executions>

maven calls external script on both Linux and Windows platforms

笑着哭i 提交于 2019-12-17 21:53:01
问题 I need to run an external script on both Linux and MS-Windows platforms. Do I use the right plugin exec-maven-plugin ? Is there a more suitable plugin? What filename should I put in <executable>....</executable> ? <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <id>compile-jni</id> <phase>compile</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>./compile-jni</executable>

Launching a windows batch script using Maven exec plugin blocks the build even though the script uses “start”

大憨熊 提交于 2019-12-17 18:17:25
问题 I am trying to perform integration tasting of the deployment of my application on the top of a custom container. Since my container is custom, I cannot use Maven Cargo plugin to setup the container. My container: Has to be started though a proper bat file, which is in the path of the machine where the tests are run. Can be manually closed since I have a single maven module containing all my integration tests, even if one day I would like to know how to shut the process down after my tests are

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

 ̄綄美尐妖づ 提交于 2019-12-17 16:18:59
问题 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

Run multiple classes using Maven

风格不统一 提交于 2019-12-13 07:52:31
问题 I have a package with several classes (each one encapsulating an executable program, i.e. with a main() method), i.e.: com.myorg.examples.classA com.myorg.examples.classB etc. All the classes belong to the same package ( com.myorg.examples ). I know I can use maven to run one of such classes, eg: mvn exec:java -D"exec.mainClass"="com.myorg.examples.classA" I also know I can configure exec-maven-plugin in order to do the same using a shorter command, eg: <plugin> <groupId>org.codehaus.mojo<

Caliper test using exec-maven-plugin is saying main method signature isn't valid

北城余情 提交于 2019-12-13 05:18:30
问题 I'm trying to get Caliper working with maven, I haven't successfully ran a caliper benchmark test as of yet. Caliper version: 1.0-beta-1 My benchmark: public class MyXercesSAXHandlerBenchmark extends Benchmark{ @Param({"10", "100", "1000", "10000"}) private int length; public void timeNanoTime(int reps) { for (int i = 0; i < reps; i++) { System.nanoTime(); } } public static void main(String[] args) { CaliperMain.main(MyXercesSAXHandlerBenchmark.class, args); } } My maven pom.xml has: