Uploaded image for project: 'WildFly Maven Plugin'
  1. WildFly Maven Plugin
  2. WFMP-165

Failure with multiple module paths on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.2.Final, 4.0.0.Beta1
    • 2.0.2.Final
    • None
    • None

      They come through as "C:\pathA;C:\pathB" and are passed in to the Launcher's Environment.addModuleDirs() as a single entry. The check in Environment.addModuleDirs()

        // Validate the path
        final Path path = Paths.get(moduleDir).normalize();
        modulesDirs.add(path.toString());

      then errors as follows:

      $ java Test Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 17: C:\Users\IEUser;c:\WK at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69)

      (this is from a manual test by Yeray, since I don't have access to a Windows VM).

      On Mac/Linux a similar check for e.g. "/pathA:/pathB" does not give an error, but simply returns the first element.

              kkhan1@redhat.com Kabir Khan
              kkhan1@redhat.com Kabir Khan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: