brett       2004/12/03 22:59:05

  Modified:    src/java/org/apache/maven Tag: MAVEN-1_0-BRANCH
                        ArtifactListBuilder.java
  Log:
  PR: MAVEN-1511

  allow SNAPSHOT as a JAR override
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.14.4.4  +5 -7      maven/src/java/org/apache/maven/ArtifactListBuilder.java
  
  Index: ArtifactListBuilder.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/ArtifactListBuilder.java,v
  retrieving revision 1.14.4.3
  retrieving revision 1.14.4.4
  diff -u -r1.14.4.3 -r1.14.4.4
  --- ArtifactListBuilder.java  24 Sep 2004 10:38:43 -0000      1.14.4.3
  +++ ArtifactListBuilder.java  4 Dec 2004 06:59:05 -0000       1.14.4.4
  @@ -29,9 +29,7 @@
   import java.util.List;
   
   /**
  - *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
  - *
    * @version $Id$
    */
   public class ArtifactListBuilder
  @@ -47,23 +45,23 @@
        * @param project MavenSession project.
        * @return the list of artifacts for a project
        */
  -    public static List build( final Project project  )
  +    public static List build( final Project project )
       {
           List projectArtifacts = new ArrayList();
           boolean mavenJarOverride = 
project.getContext().getMavenJarOverride().booleanValue();
   
  -        for ( Iterator i = project.getDependencies().iterator(); 
i.hasNext();)
  +        for ( Iterator i = project.getDependencies().iterator(); 
i.hasNext(); )
           {
               Dependency d = (Dependency) i.next();
               String mavenJarProperty = 
project.getContext().getMavenJarOverride( Project.standardToLegacyId( d.getId() 
) );
               Artifact artifact = DefaultArtifactFactory.createArtifact( d );
   
  -            if ( mavenJarOverride && 
StringUtils.isNotEmpty(mavenJarProperty) )
  +            if ( mavenJarOverride && StringUtils.isNotEmpty( 
mavenJarProperty ) )
               {
                   // The jar override option has been set and we have a 
property
                   // for the this dependency so override the path with the user
                   // specified value.
  -                if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) )
  +                if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) || 
mavenJarProperty.indexOf( "SNAPSHOT" ) >= 0 )
                   {
                       // User is requesting a specific version of a dependency
                       // be used.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to