Closed
Description
If the build directory is on a different drive than the source directory, compilation fails with the following call stack:
Caused by: java.lang.IllegalArgumentException: 'other' has different root
at sun.nio.fs.WindowsPath.relativize (WindowsPath.java:420)
at sun.nio.fs.WindowsPath.relativize (WindowsPath.java:42)
at org.codehaus.plexus.compiler.AbstractCompiler.logCompiling (AbstractCompiler.java:286)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:150)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1140)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
...
The problem seems to be that org.codehaus.plexus.compiler.AbstractCompiler.logCompiling
calls relativize
with a path from a different drive.
The workaround is to use Maven's -q
option since the offending call is skipped if Info logging is not enabled. However, it would be nice if this could work also for "non-quiet" builds.
Metadata
Metadata
Assignees
Labels
No labels