buildscript { ext { springBootVersion = '1.5.9.RELEASE' } repositories { maven { url 'https://plugins.gradle.org/m2/' } maven { url 'http://repo.spring.io/plugins-release' } maven { url 'http://113.105.74.141:8081/artifactory/libs-release-local' } jcenter() } dependencies { classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5") classpath("com.uas.demo.mesh:spring-boot-docker-plugin:1.0.2") classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } plugins { id 'java' id 'maven' id 'eclipse' id 'maven-publish' } group 'com.uas.cloud.mall' version '0.1.4-MESH' apply plugin: "org.springframework.boot" apply plugin: 'com.uas.docker.spring.boot' apply plugin: "org.sonarqube" sourceCompatibility = 1.8 repositories { maven { url 'http://10.10.101.21:8081/artifactory/libs-snapshot' } maven { url 'http://10.10.101.21:8081/artifactory/libs-release' } jcenter() mavenCentral() } ext { springCloudVersion = 'Edgware.RELEASE' } dependencies { compile("org.springframework.boot:spring-boot-actuator") compile("org.springframework.boot:spring-boot-starter-web") compile("org.springframework.boot:spring-boot-starter-data-mongodb") compile("org.springframework.cloud:spring-cloud-starter-consul-discovery") testCompile("org.springframework.boot:spring-boot-starter-test") } dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } } // 配置Docker插件 customDocker { baseImage 'hub.c.163.com/library/java:8-jre-alpine' registry '10.10.100.200:5000' } task sourceJar(type: Jar) { from sourceSets.main.allSource } publishing { publications { release(MavenPublication) { groupId project.group artifactId project.name version project.version from components.java artifact sourceJar { classifier 'sources' } } } repositories { maven { credentials { username "yingp" password "111111" } url "http://113.105.74.141:8081/artifactory/libs-release-local" } } }