mirror of https://github.com/apache/maven.git
don't zero out files that are the same
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@290380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b44ccee57
commit
4330db96ab
|
@ -83,7 +83,15 @@ public class DigestVerifier
|
|||
{
|
||||
try
|
||||
{
|
||||
FileUtils.copyFile( digestSourceFile, digestTargetFile );
|
||||
if ( digestTargetFile == null )
|
||||
{
|
||||
reporter.error( "No target digest file for path [" + artifactSource +
|
||||
"] from source to target for digest algorithm: \'" + digestAlgorithm + "\'." );
|
||||
}
|
||||
else if ( !digestSourceFile.getCanonicalFile().equals( digestTargetFile.getCanonicalFile() ) )
|
||||
{
|
||||
FileUtils.copyFile( digestSourceFile, digestTargetFile );
|
||||
}
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ public class DefaultArtifactDiscoverer
|
|||
Artifact result;
|
||||
|
||||
List pathParts = new ArrayList();
|
||||
StringTokenizer st = new StringTokenizer( path, "/" );
|
||||
StringTokenizer st = new StringTokenizer( path, "/\\" );
|
||||
while ( st.hasMoreTokens() )
|
||||
{
|
||||
pathParts.add( st.nextToken() );
|
||||
|
@ -80,7 +80,7 @@ public class DefaultArtifactDiscoverer
|
|||
|
||||
if ( pathParts.size() < 4 )
|
||||
{
|
||||
reporter.error( "Not enough parts (4) in path " + path );
|
||||
reporter.error( "Not enough parts (" + pathParts.size() + "/4) in path " + path );
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -456,9 +456,10 @@ public class RewritePhase
|
|||
boolean reportOnly )
|
||||
throws IOException, DigestException, ReportWriteException
|
||||
{
|
||||
if ( source.exists() )
|
||||
if ( source.exists() && !source.getCanonicalFile().equals( target.getCanonicalFile() ) )
|
||||
{
|
||||
File targetParent = target.getParentFile();
|
||||
|
||||
if ( !targetParent.exists() )
|
||||
{
|
||||
targetParent.mkdirs();
|
||||
|
@ -516,6 +517,11 @@ public class RewritePhase
|
|||
{
|
||||
File artifactSource = artifact.getFile();
|
||||
|
||||
if ( artifactSource.getCanonicalFile().equals( artifactTarget.getCanonicalFile() ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
InputStream inStream = null;
|
||||
OutputStream outStream = null;
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue