[
https://issues.apache.org/jira/browse/MTOOLCHAINS-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128661#comment-16128661
]
Nicolas Radde commented on MTOOLCHAINS-18:
------------------------------------------
While you can do without, i do believe adding support for environment variables
is a plus, especially for big deployment.
We have an install of Jenkins with a good number of slaves. For maintenance
purpose, we use the automatic installation feature of the maven tool and the
config plugin to provide config files like {noformat}settings.xml{noformat} and
{noformat}toolchains.xml{noformat}.
For now, we need to have more or less one {noformat}toolchains.xml{noformat}
file per slave (some slaves have the same path fortunately), while for the
{noformat}settings.xml{noformat} i can have only one. It is relatively easy to
setup environment variables in the Jenkins node configuration page.
If i can add another argument it would be that environment variables works in
{noformat}pom.xml{noformat} and {noformat}settings.xml{noformat}, why not in
{noformat}toolchains.xml{noformat} ?
> toolchain.xml file should support environment variables
> -------------------------------------------------------
>
> Key: MTOOLCHAINS-18
> URL: https://issues.apache.org/jira/browse/MTOOLCHAINS-18
> Project: Maven Toolchains Plugin
> Issue Type: Improvement
> Affects Versions: 1.1
> Environment: Windows 7 64bit
> Reporter: Nicolas Radde
> Priority: Minor
>
> When the toolchain.xml file is configured as follow :
> {code:xml}
> <toolchain>
> <type>jdk</type>
> <provides>
> <version>1.8</version>
> <vendor>sun</vendor>
> </provides>
> <configuration>
> <jdkHome>${env.JDK_HOME_8}</jdkHome>
> </configuration>
> </toolchain>
> {code}
> The execution of a maven compile fail with the following error :
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-toolchains-plugin:
> 1.1:toolchain (default) on project monitoring-mq-web: Misconfigured
> toolchains.
> Non-existing JDK home configuration at
> L:\test-monitoring-mq\${env.JDK_HOME_8} -> [Help 1]
> {noformat}
> While the environment variable *JDK_HOME_8* exist.
> Using environment variable is a very convenient way to have the same
> toolchain.xml file for all developers or jenkins slaves and would be a nice
> addition to the plugin.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)