diff options
author | Sean Owen <sowen@cloudera.com> | 2014-03-15 16:43:27 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-03-15 16:44:34 -0700 |
commit | 97e4459e1e4cca8696535e10a91733c15f960107 (patch) | |
tree | 484c4a2da67cdae9c6bbc6fa96069dde69f1bfa5 | |
parent | e19044cb1048c3755d1ea2cb43879d2225d49b54 (diff) | |
download | spark-97e4459e1e4cca8696535e10a91733c15f960107.tar.gz spark-97e4459e1e4cca8696535e10a91733c15f960107.tar.bz2 spark-97e4459e1e4cca8696535e10a91733c15f960107.zip |
SPARK-1254. Consolidate, order, and harmonize repository declarations in Maven/SBT builds
This suggestion addresses a few minor suboptimalities with how repositories are handled.
1) Use HTTPS consistently to access repos, instead of HTTP
2) Consolidate repository declarations in the parent POM file, in the case of the Maven build, so that their ordering can be controlled to put the fully optional Cloudera repo at the end, after required repos. (This was prompted by the untimely failure of the Cloudera repo this week, which made the Spark build fail. #2 would have prevented that.)
3) Update SBT build to match Maven build in this regard
4) Update SBT build to not refer to Sonatype snapshot repos. This wasn't in Maven, and a build generally would not refer to external snapshots, but I'm not 100% sure on this one.
Author: Sean Owen <sowen@cloudera.com>
Closes #145 from srowen/SPARK-1254 and squashes the following commits:
42f9bfc [Sean Owen] Use HTTPS for repos; consolidate repos in parent in order to put optional Cloudera repo last; harmonize SBT build repos with Maven; remove snapshot repos from SBT build which weren't in Maven
-rw-r--r-- | examples/pom.xml | 15 | ||||
-rw-r--r-- | external/mqtt/pom.xml | 14 | ||||
-rw-r--r-- | pom.xml | 32 | ||||
-rw-r--r-- | project/SparkBuild.scala | 23 | ||||
-rw-r--r-- | streaming/pom.xml | 14 |
5 files changed, 42 insertions, 56 deletions
diff --git a/examples/pom.xml b/examples/pom.xml index 9f0e2d0b87..382a38d940 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -45,21 +45,6 @@ </profile> </profiles> - <repositories> - <repository> - <id>apache-repo</id> - <name>Apache Repository</name> - <url>https://repository.apache.org/content/repositories/releases</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - - <dependencies> <dependency> <groupId>org.apache.spark</groupId> diff --git a/external/mqtt/pom.xml b/external/mqtt/pom.xml index 06c751df7f..3710a63541 100644 --- a/external/mqtt/pom.xml +++ b/external/mqtt/pom.xml @@ -45,20 +45,6 @@ </profile> </profiles> - <repositories> - <repository> - <id>mqtt-repo</id> - <name>MQTT Repository</name> - <url>https://repo.eclipse.org/content/repositories/paho-releases</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <dependencies> <dependency> <groupId>org.apache.spark</groupId> @@ -127,7 +127,18 @@ <repository> <id>maven-repo</id> <!-- This should be at top, it makes maven try the central repo first and then others and hence faster dep resolution --> <name>Maven Repository</name> - <url>http://repo.maven.apache.org/maven2</url> + <url>https://repo.maven.apache.org/maven2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>apache-repo</id> + <name>Apache Repository</name> + <url>https://repository.apache.org/content/repositories/releases</url> <releases> <enabled>true</enabled> </releases> @@ -138,7 +149,18 @@ <repository> <id>jboss-repo</id> <name>JBoss Repository</name> - <url>http://repository.jboss.org/nexus/content/repositories/releases</url> + <url>https://repository.jboss.org/nexus/content/repositories/releases</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>mqtt-repo</id> + <name>MQTT Repository</name> + <url>https://repo.eclipse.org/content/repositories/paho-releases</url> <releases> <enabled>true</enabled> </releases> @@ -150,6 +172,12 @@ <id>cloudera-repo</id> <name>Cloudera Repository</name> <url>https://repository.cloudera.com/artifactory/cloudera-repos</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> </repository> </repositories> diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index bfc16e814b..db24f124f3 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -174,12 +174,18 @@ object SparkBuild extends Build { // Only allow one test at a time, even across projects, since they run in the same JVM concurrentRestrictions in Global += Tags.limit(Tags.Test, 1), - // also check the local Maven repository ~/.m2 - resolvers ++= Seq(Resolver.file("Local Maven Repo", file(Path.userHome + "/.m2/repository"))), - - // For Sonatype publishing - resolvers ++= Seq("sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", - "sonatype-staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/"), + resolvers ++= Seq( + "Maven Repository" at "https://repo.maven.apache.org/maven2", + "Apache Repository" at "https://repository.apache.org/content/repositories/releases", + "JBoss Repository" at "https://repository.jboss.org/nexus/content/repositories/releases/", + "MQTT Repository" at "https://repo.eclipse.org/content/repositories/paho-releases/", + "Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/", + // For Sonatype publishing + //"sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", + //"sonatype-staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/", + // also check the local Maven repository ~/.m2 + Resolver.mavenLocal + ), publishMavenStyle := true, @@ -272,10 +278,6 @@ object SparkBuild extends Build { def coreSettings = sharedSettings ++ Seq( name := "spark-core", - resolvers ++= Seq( - "JBoss Repository" at "http://repository.jboss.org/nexus/content/repositories/releases/", - "Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/" - ), libraryDependencies ++= Seq( "com.google.guava" % "guava" % "14.0.1", @@ -470,7 +472,6 @@ object SparkBuild extends Build { def mqttSettings() = streamingSettings ++ Seq( name := "spark-streaming-mqtt", - resolvers ++= Seq("Eclipse Repo" at "https://repo.eclipse.org/content/repositories/paho-releases/"), libraryDependencies ++= Seq("org.eclipse.paho" % "mqtt-client" % "0.4.0") ) } diff --git a/streaming/pom.xml b/streaming/pom.xml index 2343e381e6..2cb8bde664 100644 --- a/streaming/pom.xml +++ b/streaming/pom.xml @@ -45,20 +45,6 @@ </profile> </profiles> - <repositories> - <repository> - <id>apache-repo</id> - <name>Apache Repository</name> - <url>https://repository.apache.org/content/repositories/releases</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <dependencies> <dependency> <groupId>org.apache.spark</groupId> |