jira-importer opened a new issue, #565: URL: https://github.com/apache/maven-invoker-plugin/issues/565
**[James Nord](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jnord_cbs)** opened **[MINVOKER-334](https://issues.apache.org/jira/browse/MINVOKER-334?redirect=false)** and commented When run on windows the pluigin munges the value of basedir to something that is not correct. in windows the canonical case of a drive letter us upper case, and the file system can be case sensitive but is nearly always always case preserving (on NTFS) the plugin however lower cases the basedir leading to incorrect test results when run on windows. jshell showing correct info ``` jshell> File f = new File(".").getCanonicalFile() f ==> C:\workarea\source\github\jenkinsci\maven-hpi-plugin jshell> Path p = f.toPath() p ==> C:\workarea\source\github\jenkinsci\maven-hpi-plugin jshell> p.toRealPath() $3 ==> C:\workarea\source\github\jenkinsci\maven-hpi-plugin ``` sample output from the invoker plugin ``` [INFO] --- invoker:3.5.0:install (integration-test) @ maven-hpi-plugin --- [INFO] Installing c:\workarea\source\github\jenkinsci\maven-hpi-plugin\target\maven-hpi-plugin-3.42-SNAPSHOT.jar to c:\workarea\source\github\jenkinsci\maven-hpi-plugin\target\local-repo\org\jenkins-ci\tools\maven-hpi-plugin\3.42-SNAPSHOT\maven-hpi-plugin-3.42-SNAPSHOT.jar [INFO] Installing c:\workarea\source\github\jenkinsci\maven-hpi-plugin\target\maven-hpi-plugin-3.42-SNAPSHOT.pom to c:\workarea\source\github\jenkinsci\maven-hpi-plugin\target\local-repo\org\jenkins-ci\tools\maven-hpi-plugin\3.42-SNAPSHOT\maven-hpi-plugin-3.42-SNAPSHOT.pom ``` this can also be observed in a `verify.groovy` script that is expecting a specific output to be written in a log of a run plugin. ``` List lines = new File(basedir, 'plugins.txt').readLines('UTF-8') // invoker plugin is brain dead and sets incorrect path // like c:\foo\bar when it should be C:\foo\bar // so we need to canonicalize the basedir def projectRoot = basedir.getCanonicalPath() + File.separator assert lines.get(0).contains("$basedir") ``` which causes a failure like: ``` [INFO] Assertion failed: assert lines.get(0).contains("${basedir}") | | | | | | false c:\workarea\source\github\jenkinsci\maven-hpi-plugin\target\its\list-plugins-aggregator | 'whizzbang\t1.0-SNAPSHOT\tC:\\workarea\\source\\github\\jenkinsci\\maven-hpi-plugin\\target\\its\\list-plugins-aggregator\\a-plugin' ['whizzbang\t1.0-SNAPSHOT\tC:\\workarea\\source\\github\\jenkinsci\\maven-hpi-plugin\\target\\its\\list-plugins-aggregator\\a-plugin', 'list-plugins-plugin1\t1.0-SNAPSHOT\tC:\\workarea\\source\\github\\jenkinsci\\maven-hpi-plugin\\target\\its\\list-plugins-aggregator\\first-module'] ``` --- **Affects:** 3.5.0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
