maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it Verifier.java
Date Wed, 13 Apr 2005 08:06:19 GMT
brett       2005/04/13 01:06:19

  Modified:    maven-core-it-verifier/src/main/java/org/apache/maven/it
                        Verifier.java
  Log:
  remove snapshot metadata too
  
  Revision  Changes    Path
  1.29      +19 -5     maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java
  
  Index: Verifier.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Verifier.java	5 Apr 2005 06:48:46 -0000	1.28
  +++ Verifier.java	13 Apr 2005 08:06:19 -0000	1.29
  @@ -147,7 +147,7 @@
                       continue;
                   }
   
  -                line = replaceArtifacts( line );
  +                lines.addAll( replaceArtifacts( line ) );
   
                   lines.add( line );
               }
  @@ -161,7 +161,7 @@
           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 @@
               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 )
  
  
  

Mime
View raw message