kafka1.0 源码导入idea gradle 失败

直接开始:
1.设置 aliyun 代理 build.gradle

buildscript {
  repositories {
	// mavenCentral()  //原有注释
	//新增
    maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    jcenter()
  }
}

allprojects {
  apply plugin: 'idea'
  apply plugin: "jacoco"

  repositories {
	//    mavenCentral()  //原有注释
	//新增
    maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
  }
}

buildscript.gradle

repositories {
  repositories {
    // For license plugin.
    maven {
	  //url 'http://dl.bintray.com/content/netflixoss/external-gradle-plugins/'  //原有注释
	  //新增
      url 'http://maven.aliyun.com/nexus/content/groups/public/'
    }
  }
}

2.build.gradle 中 dependencies 修改

dependencies {
    // For Apache Rat plugin to ignore non-Git files
    classpath "org.ajoberstar:grgit:1.9.3"
    classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
    classpath 'org.scoverage:gradle-scoverage:2.5.0'    // 将2.1.0修改为2.5.0
    classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
  }

你可能感兴趣的:(kafka)