Hi Oliver,

> I want to call a script from my maven build so I use the maven-exec
plugin for this. The script I want to call calls in turn at some point
java and all environment variables are transmitted. I would like to
override JAVA_TOOL_OPTIONS and define an empty value for it so I used
the following configuration:

<execution>
<id>gulp-build</id>
<phase>process-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>gulp</executable>

The following is an indicator that something is wrong...

<failWithNullKeyOrValueInEnvironment>false</failWithNullKeyOrValueInEnvironment>

<environmentVariables>
   <JAVA_TOOL_OPTIONS/>

Isn't there an other option do you really need to define an empty value? What about just removing the variable completely ? Doesn't that work?


</environmentVariables>
<workingDirectory>${basedir}/src/main/resources/webapp</workingDirectory>
<arguments>
<argument>maven</argument>
</arguments>
</configuration>
</execution>

But then I end up with the same NPE that was reported in MEXEC-108
(http://jira.codehaus.org/browse/MEXEC-108) and marked as fixed in the
1.3 version although I'm using this version:

If you had carefully read the JIRA Issue you would have dertermined that the issue is exactly describing your situation and finally given the hint that the pugin can't solve the problem only fail the build by default... If there will be a commons-exec:1.3 available in the future this can be used to turn off the failure if you would change the exec-maven-plugin configuration by using commons-exec:1.3 on the classpath of the plugin.

But unfortunately it can't currently be changed cause the root cause of the problem is located in the commons-exec lib see the jira:

https://issues.apache.org/jira/browse/EXEC-80

[DEBUG] Entry: key:JAVA_TOOL_OPTIONS value:null
[WARNING] The defined environment contains an entry with null value
(key:JAVA_TOOL_OPTIONS). This could cause failures.

Which is exactly the case here...

Unfortunately this is currently not preventable cause the problem is located in the commons-exec part...

Kind regards
Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to