Azure-pipelines-tasks: Maven@3 task setting mavenVersionOption=path doesn't work

Created on 18 Oct 2019  路  3Comments  路  Source: microsoft/azure-pipelines-tasks

The documentation for this task says that one could set mavenVersionOption to path to specify a custom maven installation path.

 #mavenVersionOption: 'Default' # Options: default, path

But this doesn't work. Looking at the source code, it appears to be a case sensitive comparison that is causing the issue. Could we have a case insensitive check for all the arguments or update the document to make it clear?

if (mavenVersionSelection == 'Path') {
    // The path to Maven has been explicitly specified
    tl.debug('Using Maven path from user input');
    var mavenPath = tl.getPathInput('mavenPath', true, true);
    mvnExec = path.join(mavenPath, 'bin', 'mvn');

    // Set the M2_HOME variable to a custom Maven installation path?
    if (tl.getBoolInput('mavenSetM2Home')) {
        tl.setVariable('M2_HOME', mavenPath);
    }
}
CrossPlatform bug stale

Most helpful comment

@salvmd that would be me. I've assigned it to myself and will look into the suggestions above

All 3 comments

@leantk (per https://github.com/microsoft/azure-pipelines-tasks/blob/master/.github/CODEOWNERS), could you help us route this to the team that owns the Maven task?

@salvmd that would be me. I've assigned it to myself and will look into the suggestions above

This issue is stale because it has been open for a year with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Was this page helpful?
0 / 5 - 0 ratings