Skip to content
Snippets Groups Projects
  • Mark Grover's avatar
    a9b630f4
    [SPARK-14477][BUILD] Allow custom mirrors for downloading artifacts in build/mvn · a9b630f4
    Mark Grover authored
    ## What changes were proposed in this pull request?
    
    Allows to override locations for downloading Apache and Typesafe artifacts in build/mvn script.
    
    ## How was this patch tested?
    By running script like
    ````
    # Remove all previously downloaded artifacts
    rm -rf build/apache-maven*
    rm -rf build/zinc-*
    rm -rf build/scala-*
    
    # Make sure path is clean and doesn't contain mvn, for example.
    ...
    
    # Run a command without setting anything and make sure it succeeds
    build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Run a command setting the default location as mirror and make sure it succeeds
    APACHE_MIRROR=http://mirror.infra.cloudera.com/apache/ build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Do the same without the trailing slash this time and make sure it succeeds
    APACHE_MIRROR=http://mirror.infra.cloudera.com/apache build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Do it with a bad URL and make sure it fails
    APACHE_MIRROR=xyz build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    ````
    
    Author: Mark Grover <mark@apache.org>
    
    Closes #12250 from markgrover/spark-14477.
    a9b630f4
    History
    [SPARK-14477][BUILD] Allow custom mirrors for downloading artifacts in build/mvn
    Mark Grover authored
    ## What changes were proposed in this pull request?
    
    Allows to override locations for downloading Apache and Typesafe artifacts in build/mvn script.
    
    ## How was this patch tested?
    By running script like
    ````
    # Remove all previously downloaded artifacts
    rm -rf build/apache-maven*
    rm -rf build/zinc-*
    rm -rf build/scala-*
    
    # Make sure path is clean and doesn't contain mvn, for example.
    ...
    
    # Run a command without setting anything and make sure it succeeds
    build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Run a command setting the default location as mirror and make sure it succeeds
    APACHE_MIRROR=http://mirror.infra.cloudera.com/apache/ build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Do the same without the trailing slash this time and make sure it succeeds
    APACHE_MIRROR=http://mirror.infra.cloudera.com/apache build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    
    # Do it with a bad URL and make sure it fails
    APACHE_MIRROR=xyz build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
    ````
    
    Author: Mark Grover <mark@apache.org>
    
    Closes #12250 from markgrover/spark-14477.