Cannot pass empty argument to exec goal.
----------------------------------------
Key: MEXEC-104
URL: https://jira.codehaus.org/browse/MEXEC-104
Project: Maven 2.x Exec Plugin
Issue Type: Bug
Components: exec
Affects Versions: 1.2.1
Environment: Windows.
Maven 3.0.3
Reporter: Alex Pogrebnyak
If you run this sample ( adapted from this SO question:
http://stackoverflow.com/questions/7773134/null-versus-empty-arguments-in-maven
), you will get this error from the exec plugin:
{color:red}
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(Exec test) on project test: Misconfigured argument, value is null. Set the
argument to an empty value if this is the required behaviour. -> [Help 1]
{color}
Command line executable will happily accept an empty argument.
Also, the behavior does not change if you add more white space to _my.val_
\\
\\
{code:xml}
<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/maven-v4_0_0.xsd"
>
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>test</artifactId>
<packaging>pom</packaging>
<version>0</version>
<name>test</name>
<properties>
<my.val></my.val>
</properties>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>Exec test</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<arguments>
<argument>${my.val}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email