I am creating a simple project, just to run the calculator:
<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"> <modelVersion>4.0.0</modelVersion> <groupId>test.maven.executable</groupId> <artifactId>exe1</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>TestExe</name> <description>test execute with maven different excutables</description> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>Version Calculation</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>calc</executable> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
But when I run:
mvn exec:exec
I get an error message:
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] One or more required plugin parameters are invalid/missing for 'exec:exec' [0] Inside the definition for plugin 'exec-maven-plugin' specify the following: <configuration> ... <executable>VALUE</executable> </configuration> -OR- on the command line, specify: '-Dexec.executable=VALUE'
But I have:
<configuration> <executable>calc</executable> </configuration>
What is VALUE? I thought this was the name of the executable ...
When I use -Dexec.executable = VALUE, for example -Dexec.executable=calc
, it works. Another problem is in the plugin docs:
exec:exec execute programs and Java programs in a separate process.
But when I start with -Dexec.executable = calc-maven, wait until I close the calculator! Where is a separate process?
source share