mirror of https://github.com/apache/maven.git
[MNG-3141] only canonicalize paths on Windows (to prevent path length issues, but not obliterate symlinks on unix)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@567954 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ca0450d220
commit
959ce3f30f
|
@ -57,6 +57,7 @@ import org.codehaus.plexus.context.ContextException;
|
|||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.Os;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.dag.CycleDetectedException;
|
||||
|
||||
|
@ -498,13 +499,18 @@ public class DefaultMaven
|
|||
moduleFile = new File( basedir, name + "/" + Maven.POMv4 );
|
||||
}
|
||||
|
||||
try
|
||||
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
|
||||
{
|
||||
moduleFile = moduleFile.getCanonicalFile();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenExecutionException( "Unable to canonicalize file name " + moduleFile, e );
|
||||
// we don't canonicalize on unix to avoid interfering with symlinks
|
||||
|
||||
try
|
||||
{
|
||||
moduleFile = moduleFile.getCanonicalFile();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenExecutionException( "Unable to canonicalize file name " + moduleFile, e );
|
||||
}
|
||||
}
|
||||
|
||||
moduleFiles.add( moduleFile );
|
||||
|
|
Loading…
Reference in New Issue