From 877eeb9a409f52f36b903bbde93f2dbe9a4b7ea9 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 13 Apr 2005 08:06:19 +0000 Subject: [PATCH] remove snapshot metadata too git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163932 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/it/Verifier.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java b/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java index 05878e16d6..9a1cc4d0d6 100644 --- a/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java +++ b/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java @@ -147,7 +147,7 @@ public class Verifier continue; } - line = replaceArtifacts( line ); + lines.addAll( replaceArtifacts( line ) ); lines.add( line ); } @@ -161,7 +161,7 @@ public class Verifier return lines; } - private static String replaceArtifacts( String line ) + private static List replaceArtifacts( String line ) { String MARKER = "${artifact:"; int index = line.indexOf( MARKER ); @@ -178,9 +178,23 @@ public class Verifier newLine += convertArtifact( artifact ); newLine += line.substring( index + 1 ); - line = replaceArtifacts( newLine ); + index = newLine.indexOf( "SNAPSHOT" ); + if ( index >= 0 ) + { + List l = new ArrayList(); + l.add( newLine ); + l.add( newLine.substring( 0, index ) + "SNAPSHOT.version.txt" ); + return l; + } + else + { + return Collections.singletonList( line ); + } + } + else + { + return Collections.singletonList( line ); } - return line; } private static String convertArtifact( String artifact )