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 )