zoukankan      html  css  js  c++  java
  • maven/gradle版本统一示例

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Dalston.SR3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    dependencyManagement {
        imports {
            mavenBom 'org.springframework.boot:spring-boot-starter-parent:1.5.6.RELEASE'
            mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.SR3'
        }
    }
    buildscript {
        dependencies {
            classpath "io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE"
            classpath "org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE"
        }
        repositories {
            maven { url "http://maven.aliyun.com/nexus/content/groups/public" }
        }
    }
    
    apply plugin: 'java'
    apply plugin: 'idea'
    apply plugin: 'maven'
    apply plugin: 'io.spring.dependency-management'
    
    group = 'com'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '1.8'
    
    dependencyManagement {
        imports {
            mavenBom 'org.springframework.boot:spring-boot-starter-parent:1.5.6.RELEASE'
            mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.SR3'
        }
    }
    
    
    repositories {
        maven { url "http://maven.aliyun.com/nexus/content/groups/public" }
    }
    
    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
        implementation 'org.json:json:20180813'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
    }
  • 相关阅读:
    maven父子项目
    编写简单的maven插件
    使用nexus搭建maven私服
    nexus安装
    Maven 配置tomcat和findbug插件(在eclipse建立的项目中)
    Maven打包时,不包含jar包
    pom文件解析
    android post(HTTP设置参数,仿html表单提交)
    在Eclipse中进行UI设计时xml界面横屏竖屏设置方法
    有声相机开发
  • 原文地址:https://www.cnblogs.com/lu51211314/p/10474602.html
Copyright © 2011-2022 走看看