exec-maven-plugin

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

一世执手 提交于 2019-12-08 01:32:51
问题 edit 2: I found the problem. The quick answer is that the lack of an <id> 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 source files. I am trying to use the exec-maven-plugin to call this ruby script during the generate-sources phase of the default lifecycle. Here's what I've added to my POM to achieve this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli)

非 Y 不嫁゛ 提交于 2019-12-06 18:09:38
问题 Im working on Smooks - Camel Integration .Im stuck with an error.The Build Fails when I try to Run it using mvn exec:java [ERROR]: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli) on project camel-example-smooks-integration: My console log reads as follows: [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException C:\apache

Is it possible to run multiple maven-exec-plugin executions in parallel?

大城市里の小女人 提交于 2019-12-05 14:52:27
Is it possible to run multiple exec-maven-plugin executions in parallel somehow? We want to have different database types deployed for DAL integration testing, and while it's obviously possible to do this in sequence, it's a huge waste of time. <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>first-dbtype-deployment</id> <goals> <goal>java</goal> </goals> <configuration> <mainClass>com.example.DeployDBTypeOne</mainClass> </configuration> </execution> <execution> <id>second-dbtype-deployment</id> <goals>

Class Not Found exception with exec-maven-plugin when run on Linux

旧时模样 提交于 2019-12-05 09:25:59
问题 I am trying to run TestNG tests. My Project organization is - src->test->java->com->shn->library The below command works well in Windows but fails in Linux. mvn -X clean exec:java -Dexec.mainClass="com.shn.library.RunSuitesInParallel" -Dexec.classpathScope=test -e Error Seen in Linux on running the same command - [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project UAF: An exception occured while executing the Java class. com.shn.library

Passing Working Directory to npm in exec-maven-plugin

放肆的年华 提交于 2019-12-05 06:08:43
问题 I am trying to run npm as part of my maven build. I am using exec-maven-plugin and here is my plugin section from pom.xml <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>exec-npm-install</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>npm</executable> <arguments> <argument>build</argument> </arguments> <workingDirectory>${basedir}/src/main/webapp</workingDirectory> <

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli)

做~自己de王妃 提交于 2019-12-04 22:15:42
Im working on Smooks - Camel Integration .Im stuck with an error.The Build Fails when I try to Run it using mvn exec:java [ERROR]: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli) on project camel-example-smooks-integration: My console log reads as follows: [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException C:\apache-camel-2.11.0\examples\camel-example-smooks-integration>mvn exec:java [INFO] Scanning for projects...

From Maven, how do I run a class that lives under src/test/java?

孤街醉人 提交于 2019-11-30 10:43:42
I have inherited a codebase :) Under src/test/java/ there's a file that I need to run (I need to run its public static void main(String[] args) , not a @Test method within it). The closest I have got is: mvn -e exec:java -Dexec.mainClass="com.me.packagex.RunFile" -Dexec.classpathScope="test" but that then fails, and it appears to be because RunFile wants to use classes that exist under src/main/java/com/me/packagex/ (notice, /main/, not /test/). The files under there are in the same package as RunFile, i.e. 'package com.me.packagex;'. If I remove the -Dexec.classpathScope="test" then it can't

From Maven, how do I run a class that lives under src/test/java?

∥☆過路亽.° 提交于 2019-11-29 11:07:51
问题 I have inherited a codebase :) Under src/test/java/ there's a file that I need to run (I need to run its public static void main(String[] args) , not a @Test method within it). The closest I have got is: mvn -e exec:java -Dexec.mainClass="com.me.packagex.RunFile" -Dexec.classpathScope="test" but that then fails, and it appears to be because RunFile wants to use classes that exist under src/main/java/com/me/packagex/ (notice, /main/, not /test/). The files under there are in the same package

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

别说谁变了你拦得住时间么 提交于 2019-11-29 07:29:38
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> <configuration> <mainClass>com.laco.projectmaster.util.LanguageGenerator</mainClass> <arguments>

maven calls external script on both Linux and Windows platforms

扶醉桌前 提交于 2019-11-28 16:53:29
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> <workingDirectory>${basedir}/src/main/cpp</workingDirectory> </configuration> </execution> </executions> </plugin