Maven does not correctly resolve Windows mapped network drives with Java 25
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
### Affected version
3.9.11
### Bug description
I have an H: drive mapped in Windows to a network path `\\colo-01-fs02\developers$\ollie`. Required by my workplace.
I can build my projects just fine in Java 21 and below.
When I build with OpenJDK 25 - literally no difference except to repoint `JAVA_HOME` - then Maven incorrectly expands the network location and suffixes it onto the drive:
```
H:\work\html-uis\konsolidator>mvn compile -X
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: C:\Programs\apache-maven-3.9.11
Java version: 25, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-25
Default locale: en_GB, platform encoding: UTF-8
OS name: "windows server 2022", version: "10.0", arch: "amd64", family: "windows"
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/C:/Programs/apache-maven-3.9.11/lib/guice-5.1.0-classes.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
[DEBUG] Reading global settings from C:\Programs\apache-maven-3.9.11\conf\settings.xml
...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM H:\colo-01-fs02\developers$\ollie\work\html-uis\konsolidator\pom.xml: H:\colo-01-fs02\developers$\ollie\work\html-uis\konsolidator\pom.xml (The system cannot find the path specified) @ H:\colo-01-fs02\developers$\ollie\work\html-uis\konsolidator\pom.xml
```
The correct path here should of course either be `H:\work\...` or the network path `\\colo-01-fs02\...`.
Contributor guide
Assessment
This issue has not been assessed yet.