Problem
Maven tests fail to run in IntelliJ IDEA-based IDEs when the project is located under WSL and the maven-surefire-plugin or maven-failsafe-plugin is configured with <additionalClasspathElements> in pom.xml.
The "Prepare target..." phase fails with the error:
\home\user\path\to\module: Not a valid absolute path
Error in logs:
WARN - #c.i.e.i.ExecutionManagerImpl - `\home\user\path\to\test\module`: Not a valid absolute path
com.intellij.platform.eel.path.EelPathException: `\home\user\path\to\test\module`: Not a valid absolute path
at com.intellij.platform.eel.path.EelPath$Companion.parse(EelPath.kt:29)
at com.intellij.platform.eel.provider.EelNioBridgeServiceKt.asEelPath(EelNioBridgeService.kt:172)
at com.intellij.execution.target.eel.EelTargetEnvironment$EelVolume$Companion.createFor(EelTargetEnvironmentRequest.kt:233)
Regression introduced between IntelliJ IDEA 2025.2.2 and 2025.2.3, confirmed present through 2026.1.3 and 2026.2 EAP.
Cause
The <additionalClasspathElements> configuration causes the IDE to pass a Windows-style backslash path to the EEL path parser instead of the correct POSIX path. The parser throws EelPathException because backslash paths are not valid EEL absolute paths.
Resolution
If the <additionalClasspathElements> block can be removed from pom.xml, remove it from the surefire or failsafe plugin configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<!-- remove additionalClasspathElements block -->
</configuration>
</plugin>
If the configuration is inherited from a parent POM that cannot be modified, add the following to the child pom.xml to override it with an empty value:
<additionalClasspathElements combine.self="override"></additionalClasspathElements>
Registry settings wsl.use.remote.agent.for.nio.filesystem and wsl.use.new.filesystem do not affect this issue.
Related: WSL: Unable to run tests due to "Not a valid absolute path"
Comments
0 comments
Please sign in to leave a comment.