maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/verifier ProjectVerifier.java
Date Mon, 02 Dec 2002 05:36:37 GMT
jvanzyl     2002/12/01 21:36:37

  Modified:    src/java/org/apache/maven/verifier ProjectVerifier.java
  Log:
  o cleanups
  
  Revision  Changes    Path
  1.5       +22 -31    jakarta-turbine-maven/src/java/org/apache/maven/verifier/ProjectVerifier.java
  
  Index: ProjectVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/verifier/ProjectVerifier.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProjectVerifier.java	2 Dec 2002 05:01:04 -0000	1.4
  +++ ProjectVerifier.java	2 Dec 2002 05:36:37 -0000	1.5
  @@ -66,9 +66,7 @@
   import org.apache.maven.repository.DefaultArtifactFactory;
   import org.apache.maven.util.HttpUtils;
   
  -import java.io.BufferedReader;
   import java.io.File;
  -import java.io.FileReader;
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.ArrayList;
  @@ -115,9 +113,6 @@
       /** Map of failed downloads. Key is URL, value is Boolean */
       private Map failedDownloads = new HashMap();
   
  -    /** JARs that cannot be distributed by Maven. */
  -    private static final String NON_DIST_JAR_LIST = "non-distributable-jars.list";
  -
       /** Maven Jelly context being used. */
       private MavenJellyContext context;
   
  @@ -140,7 +135,7 @@
        * Gets the context attribute.
        * @return the Maven Jelly Context being used
        */
  -    public org.apache.maven.jelly.MavenJellyContext getContext()
  +    public MavenJellyContext getContext()
       {
           return context;
       }
  @@ -233,22 +228,10 @@
               Dependency dependency = (Dependency) i.next();
               String jar = dependency.getJar();
   
  -            if ( log.isDebugEnabled() )
  -            {
  -                log.debug( "id: " + dependency.getId() );
  -                log.debug( "version: " + dependency.getVersion() );
  -                log.debug( "jar: " + dependency.getJar() );
  -            }
  -
               Artifact artifact = DefaultArtifactFactory.createArtifact( dependency );
               String path = artifact.getPath();
               File jarFile = new File( getContext().getMavenRepoLocal(), path );
   
  -            if ( log.isDebugEnabled() )
  -            {
  -                log.debug( "Looking for " + jarFile.getCanonicalPath() + "\n\n" );
  -            }
  -
               // So we want to pull down the checksum as well the first time
               // the resource is pulled down to make sure that everything
               // is cool.
  @@ -316,25 +299,33 @@
               return false;
           }
   
  -        boolean gotFile = false;
  -        Iterator i = getContext().getMavenRepoRemote().iterator();
  -
  -        while ( gotFile == false && i.hasNext() )
  +        for ( Iterator i = getContext().getMavenRepoRemote().iterator(); i.hasNext(); )
           {
               String remoteRepo = (String) i.next();
   
               try
               {
  +                // The username and password parameters are not being
  +                // used here. Those are the "" parameters you see below.
                   String url = remoteRepo + "/" + remoteFile;
                   url = StringUtils.replace( url, "//", "/" );
                   url = StringUtils.replace( url, "http:/", "http://" );
  -                gotFile = HttpUtils.getFile( new URL( url ),
  -                                             localFile, url, verbose,
  -                                             ignoreErrors, useTimestamp, "", "",
  -                                             getContext().getProxyHost(),
  -                                             getContext().getProxyPort(),
  -                                             getContext().getProxyUserName(),
  -                                             getContext().getProxyPassword() );
  +                boolean gotFile = HttpUtils.getFile( new URL( url ),
  +                                                     localFile,
  +                                                     url,
  +                                                     verbose,
  +                                                     ignoreErrors,
  +                                                     useTimestamp,
  +                                                     "",
  +                                                     "",
  +                                                     getContext().getProxyHost(),
  +                                                     getContext().getProxyPort(),
  +                                                     getContext().getProxyUserName(),
  +                                                     getContext().getProxyPassword() );
  +                if ( gotFile )
  +                {
  +                    return true;
  +                }
               }
               catch ( MalformedURLException mue )
               {
  @@ -343,6 +334,6 @@
               }
           }
   
  -        return gotFile;
  +        return false;
       }
   }
  
  
  

Mime
View raw message