spring 5.1.x 本地构建 build.gradle文件配置

遇到的报错:

  1. Could not GET ‘https://repo.spring.io/plugins-release/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom’. Received status code 401 from server:
  2. Could not find io.spring.gradle:propdeps-plugin:0.0.9.RELEASE.
buildscript {
//	repositories {
//		gradlePluginPortal()
//		maven { url "https://repo.spring.io/plugins-release" }
//	}
//	dependencies {
//		classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
//		classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16")
//	}ext {springBootVersion = '2.0.3.BUILD-SNAPSHOT'}repositories {mavenCentral()maven { url 'https://repo.spring.io/snapshot' }
//        maven { url "https://repo.spring.io/plugins-release" }maven{ url "http://maven.aliyun.com/nexus/content/groups/public" }//阿里云新库maven { url "https://maven.aliyun.com/repository/central" }maven { url "https://maven.aliyun.com/repository/google" }maven { url "https://maven.aliyun.com/repository/gradle-plugin" }maven { url "https://maven.aliyun.com/repository/jcenter" }maven { url "https://maven.aliyun.com/repository/spring" }maven { url "https://maven.aliyun.com/repository/spring-plugin" }maven { url "https://maven.aliyun.com/repository/public" }maven { url "https://maven.aliyun.com/repository/releases" }maven { url "https://maven.aliyun.com/repository/snapshots" }maven { url "https://maven.aliyun.com/repository/grails-core" }maven { url "https://maven.aliyun.com/repository/mapr-public" }maven { url "http://repo.springsource.org/plugins-release" }}dependencies {classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
//        classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16")classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"}
}// 3rd party plugin repositories can be configured in settings.gradle
plugins {id "io.spring.dependency-management" version "1.0.7.RELEASE" apply falseid "org.jetbrains.kotlin.jvm" version "1.2.71" apply falseid "org.jetbrains.dokka" version "0.9.18"id "org.asciidoctor.convert" version "1.5.8"
}ext {linkHomepage = "https://spring.io/projects/spring-framework"linkCi = "https://build.spring.io/browse/SPR"linkIssue = "https://github.com/spring-projects/spring-framework/issues"linkScmUrl = "https://github.com/spring-projects/spring-framework"linkScmConnection = "scm:git:git://github.com/spring-projects/spring-framework.git"linkScmDevConnection = "scm:git:ssh://git@github.com:spring-projects/spring-framework.git"moduleProjects = subprojects.findAll {!it.name.equals("spring-build-src") && !it.name.equals("spring-framework-bom")}aspectjVersion       = "1.9.6"freemarkerVersion    = "2.3.28"groovyVersion        = "2.5.9"hsqldbVersion        = "2.4.1"jackson2Version      = "2.9.9"jettyVersion         = "9.4.31.v20200723"junit5Version        = "5.3.2"kotlinVersion        = "1.2.71"log4jVersion         = "2.11.2"nettyVersion         = "4.1.51.Final"reactorVersion       = "Californium-SR23"rxjavaVersion        = "1.3.8"rxjavaAdapterVersion = "1.2.1"rxjava2Version       = "2.2.19"slf4jVersion         = "1.7.30"	  // spring-jcl + consistent 3rd party depstiles3Version        = "3.0.8"tomcatVersion        = "9.0.37"undertowVersion      = "2.0.32.Final"gradleScriptDir = "${rootProject.projectDir}/gradle"withoutJclOverSlf4j = {exclude group: "org.slf4j", module: "jcl-over-slf4j"}
}configure(allprojects) { project ->group = "org.springframework"version = qualifyVersionIfNecessary(version)apply plugin: "java"apply plugin: "kotlin"apply plugin: "checkstyle"apply plugin: "propdeps"apply plugin: "test-source-set-dependencies"apply plugin: "io.spring.dependency-management"apply from: "${gradleScriptDir}/ide.gradle"dependencyManagement {resolutionStrategy {cacheChangingModulesFor 0, "seconds"}applyMavenExclusions = falsegeneratedPomCustomization {enabled = false}}configurations.all {// Check for updates every buildresolutionStrategy.cacheChangingModulesFor 0, "seconds"// Consistent slf4j version (e.g. clashes between slf4j versions)resolutionStrategy.eachDependency { DependencyResolveDetails details ->if (details.requested.group == "org.slf4j") {details.useVersion slf4jVersion}}}def commonCompilerArgs =["-Xlint:serial", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann","-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides","-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-options"]compileJava.options*.compilerArgs = commonCompilerArgs +["-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes","-Xlint:deprecation", "-Xlint:unchecked", "-Werror"]compileTestJava.options*.compilerArgs = commonCompilerArgs +["-Xlint:-varargs", "-Xlint:-fallthrough", "-Xlint:-rawtypes","-Xlint:-deprecation", "-Xlint:-unchecked"]compileJava {sourceCompatibility = 1.8  // can be switched to 11 for testingtargetCompatibility = 1.8options.encoding = "UTF-8"}compileTestJava {sourceCompatibility = 1.8  // can be switched to 11 for testingtargetCompatibility = 1.8options.encoding = "UTF-8"options.compilerArgs += "-parameters"}compileKotlin {kotlinOptions {jvmTarget = "1.8"freeCompilerArgs = ["-Xjsr305=strict"]apiVersion = "1.1"languageVersion = "1.1"}}compileTestKotlin {kotlinOptions {jvmTarget = "1.8"freeCompilerArgs = ["-Xjsr305=strict"]}}test {systemProperty("java.awt.headless", "true")systemProperty("testGroups", project.properties.get("testGroups"))systemProperty("io.netty.leakDetection.level", "paranoid")scanForTestClasses = falseinclude(["**/*Tests.class", "**/*Test.class"])// Since we set scanForTestClasses to false, we need to filter out inner// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to// run MyTests by itself will fail if MyTests contains any inner classes.exclude(["**/Abstract*.class", '**/*$*'])}checkstyle {toolVersion = "8.38"configDir = rootProject.file("src/checkstyle")}repositories {//本地仓库,地址是maven本地仓库路径
//		mavenLocal()//maven私服。此处设置为ali的旧库,地址是urlmaven{ url "http://maven.aliyun.com/nexus/content/groups/public" }//阿里云新库maven { url "https://maven.aliyun.com/repository/central" }maven { url "https://maven.aliyun.com/repository/google" }maven { url "https://maven.aliyun.com/repository/gradle-plugin" }maven { url "https://maven.aliyun.com/repository/jcenter" }maven { url "https://maven.aliyun.com/repository/spring" }maven { url "https://maven.aliyun.com/repository/spring-plugin" }maven { url "https://maven.aliyun.com/repository/public" }maven { url "https://maven.aliyun.com/repository/releases" }maven { url "https://maven.aliyun.com/repository/snapshots" }maven { url "https://maven.aliyun.com/repository/grails-core" }maven { url "https://maven.aliyun.com/repository/mapr-public" }maven { url "http://repo.springsource.org/plugins-release" }}dependencies {testCompile("junit:junit:4.12") {exclude group: "org.hamcrest", module: "hamcrest-core"}testCompile("org.mockito:mockito-core:2.28.2") {exclude group: "org.hamcrest", module: "hamcrest-core"}testCompile("com.nhaarman:mockito-kotlin:1.6.0") {exclude module: "kotlin-stdlib"exclude module: "kotlin-reflect"exclude module: "mockito-core"}testCompile("org.hamcrest:hamcrest-all:1.3")testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")// JSR-305 only used for non-required meta-annotationscompileOnly("com.google.code.findbugs:jsr305:3.0.2")testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.7")}ext.javadocLinks = ["https://docs.oracle.com/javase/8/docs/api/","https://docs.oracle.com/javaee/7/api/","https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ"https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/","https://glassfish.java.net/nonav/docs/v3/api/","https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/","https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/","https://tiles.apache.org/tiles-request/apidocs/","https://tiles.apache.org/framework/apidocs/","https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/","https://www.ehcache.org/apidocs/2.10.4/","https://www.quartz-scheduler.org/api/2.3.0/","https://fasterxml.github.io/jackson-core/javadoc/2.9/","https://fasterxml.github.io/jackson-databind/javadoc/2.9/","https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/","https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/","https://junit.org/junit4/javadoc/4.12/","https://junit.org/junit5/docs/${junit5Version}/api/"] as String[]
}configure(subprojects - project(":spring-build-src")) { subproject ->apply from: "${gradleScriptDir}/publish-maven.gradle"jar {manifest.attributes["Implementation-Title"] = subproject.namemanifest.attributes["Implementation-Version"] = subproject.versionmanifest.attributes["Automatic-Module-Name"] = subproject.name.replace('-', '.')  // for Jigsawmanifest.attributes["Created-By"] ="${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"from("${rootProject.projectDir}/src/docs/dist") {include "license.txt"include "notice.txt"into "META-INF"expand(copyright: new Date().format("yyyy"), version: project.version)}}javadoc {description = "Generates project-level javadoc for use in -javadoc jar"options.encoding = "UTF-8"options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTEDoptions.author = trueoptions.header = project.nameoptions.use = trueoptions.links(project.ext.javadocLinks)options.addStringOption("Xdoclint:none", "-quiet")// Suppress warnings due to cross-module @see and @link references.// Note that global 'api' task does display all warnings.logging.captureStandardError LogLevel.INFOlogging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message}task sourcesJar(type: Jar, dependsOn: classes) {duplicatesStrategy = DuplicatesStrategy.EXCLUDEclassifier = "sources"from sourceSets.main.allSource// Don't include or exclude anything explicitly by default. See SPR-12085.}task javadocJar(type: Jar) {classifier = "javadoc"from javadoc}artifacts {archives sourcesJararchives javadocJar}
}configure(rootProject) {description = "Spring Framework"apply plugin: "groovy"apply from: "${gradleScriptDir}/jdiff.gradle"apply from: "${gradleScriptDir}/docs.gradle"dependencyManagement {imports {mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"}}// Don't publish the default jar for the root projectconfigurations.archives.artifacts.clear()dependencies {  // for integration teststestCompile(project(":spring-aop"))testCompile(project(":spring-beans"))testCompile(project(":spring-context"))testCompile(project(":spring-core"))testCompile(project(":spring-expression"))testCompile(project(":spring-jdbc"))testCompile(project(":spring-orm"))testCompile(project(":spring-test"))testCompile(project(":spring-tx"))testCompile(project(":spring-web"))testCompile("javax.inject:javax.inject:1")testCompile("javax.resource:javax.resource-api:1.7.1")testCompile("javax.servlet:javax.servlet-api:3.1.0")testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")testCompile("org.hibernate:hibernate-core:5.1.17.Final")}artifacts {archives docsZiparchives schemaZiparchives distZip}wrapper {doLast() {def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"File wrapperFile = file("gradlew")wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=","GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")File wrapperBatFile = file("gradlew.bat")wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=","set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")}}
}/** Support publication of artifacts versioned by topic branch.* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.* If <TOPIC> starts with 'SPR-', change version*     from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT*     e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT*/
def qualifyVersionIfNecessary(version) {if (rootProject.hasProperty("BRANCH_NAME")) {def qualifier = rootProject.getProperty("BRANCH_NAME")if (qualifier.startsWith("SPR-")) {return version.replace("BUILD", qualifier)}}return version
}

参考文章1
参考文章2

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/101789.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Yocto Project 编译imx-第1节(下载和编译)

Yocto Project 编译imx-第1节&#xff08;下载和编译&#xff09; 前言说明参考文章版本说明Ubuntu 系统说明和建议必备软件安装设置Git用户名和密码解决git报错使用FastGithub 获取repo获取Yocto项目设置Yocto源获取Yocto版本&#xff08;https://source.codeaurora.org废弃&a…

记录用命令行将项目打包成war包

记录用命令行将项目打包成war包 找到项目的pom.xml 在当前路径下进入cmd 输入命令 mvn clean package 发现报错了 Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project MMS: Error assembling WAR: webxml attribute is req…

将Eureka服务注册到Eureka中心

1、在微服务的pom.xml引入依赖文件中 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency>2、在微服务的application.yml配置文件中加上…

前端面试回答不好的问题总结

vue生命周期&#xff1a; beforeCreated、created、beforeMount、mount、beforeUptade、uptade、beforeDestroy、destroyed、 Activated、Deactivated 闭包&#xff1a; ECMAScript中&#xff0c;闭包指的是&#xff1a; 从理论角度&#xff1a;所有的函数。因为它们都在创…

排序算法-快速排序法(QuickSort)

排序算法-快速排序法&#xff08;QuickSort&#xff09; 1、说明 快速排序法是由C.A.R.Hoare提出来的。快速排序法又称分割交换排序法&#xff0c;是目前公认的最佳排序法&#xff0c;也是使用分而治之&#xff08;Divide and Conquer&#xff09;的方式&#xff0c;会先在数…

统计子岛屿的数量

统计子岛屿 题目描述 给你两个 m x n 的二进制矩阵 grid1 和 grid2 &#xff0c;它们只包含 0 &#xff08;表示水域&#xff09;和 1 &#xff08;表示陆地&#xff09;。一个 岛屿 是由 四个方向 &#xff08;水平或者竖直&#xff09;上相邻的 1 组成的区域。任何矩阵以外…

【C++】手撕STL系列——string篇

文章导读 本章我们将参照STL源码&#xff0c;来模拟实现string类&#xff0c;但不一定非要与库中完全相同。我们将其中重要的、常用的接口进行模拟实现&#xff0c;旨在加深string类的学习与记忆。 为了代码更好地复用&#xff0c;本篇模拟的函数接口的顺序大概为构造类——》…

京东商品价格监控API 高并发实时数据

随着电子商务的飞速发展&#xff0c;商品价格监控变得越来越重要。对于电商平台而言&#xff0c;实时监控商品价格不仅可以及时调整市场策略&#xff0c;还可以优化库存管理&#xff0c;提高销售额。本文以“京东商品价格监控API高并发实时数据”为标题&#xff0c;将探讨如何使…

序列化与反序列化And存入redis中的数据为什么要序列化

一、序列化与反序列化 序列化&#xff1a;指堆内存中的java对象数据&#xff0c;通过某种方式把对存储到磁盘文件中&#xff0c;或者传递给其他网络节点&#xff08;网络传输&#xff09;。这个过程称为序列化&#xff0c;通常是指将数据结构或对象转化成二进制的过程。 即将…

【STM32单片机】防盗报警器设计

文章目录 一、功能简介二、软件设计三、实验现象联系作者 一、功能简介 本项目使用STM32F103C8T6单片机控制器&#xff0c;使用按键、动态数码管、蜂鸣器、指示灯、热释电人体红外传感器等。 主要功能&#xff1a; 系统运行后&#xff0c;默认处于布防状态&#xff0c;D1指示灯…

Excel 规范录入数据

文章目录 录入日期录入百分比 快捷键&#xff1a; tab&#xff1a;向右切换单元格 enter&#xff1a;向下切换行 shift tab&#xff1a;向左切换单元格 shiftenter&#xff1a;向上切换行 录入日期 输入今天的日期的快捷键&#xff1a;Ctrl ; 输入当时的时间的快捷键&a…

Java反射获取抽象类方法属性问题讲解

Java反射获取抽象类方法属性问题讲解 结论一、案例准备二、测试方法&#xff1a;使用反射获取抽象类私有方法和私有属性具体操作&#xff08;获取私有方法&#xff09;具体操作&#xff08;获取私有属性&#xff09; 结论 Java 通过反射可以获得抽象类的任何修饰符&#xff08…

Gin框架中的Cookie怎么搞(会话控制)

参考地址 设置和获取 Cookie | Gin Web Framework (gin-gonic.com)https://gin-gonic.com/zh-cn/docs/examples/cookie/ 什么是cookie cookie在互联网上随处可见,具体体现如下: 保持登录状态 保存浏览器的历史记录 大数据随心配,按喜好推送讯息 购物网站加入购物车 都会…

flink中使用外部定时器实现定时刷新

背景&#xff1a; 我们经常会使用到比如数据库中的配置表信息&#xff0c;而我们不希望每次都去查询db&#xff0c;那么我们就想定时把db配置表的数据定时加载到flink的本地内存中&#xff0c;那么如何实现呢&#xff1f; 外部定时器定时加载实现 1.在open函数中进行定时器的…

【RealTek sdk-3.4.14b】RTL8197FH-VG+RTL8367+RTL8812F WiFi to LAN 和WiFi to WAN吞吐量

LAN <----------> 2.4G WiFi Throughput 天线频宽模式协议连接速率TX(Mbps)RX(Mbps)TX&RX(Mbps)2X240MHz802.11nTCP300Mbps2051922112X240MHz802.11nUDP300Mbps224234231 LAN <----------> 5G WiFi Throughput 天线频宽模式协议连接速率TX(Mbps)RX(Mbps)TX&…

IntelliJ IDEA Maven 项目的依赖分析

在一个 maven 的项目中&#xff0c;我们需要知道我们的项目中使用的包可能有哪些冲突。 这个在 IntelliJ IDEA 中提供了贴心的查看。 选择 Maven 项目中的分析依赖。 随后&#xff0c;IntelliJ IDEA 将会打开一个依赖分析的标签页。 在这个标签页中&#xff0c;我们可以看到…

用例图 UML从入门到放弃系列之三

1.说明 关于用例图&#xff0c;这篇文章我将直接照搬罗伯特.C.马丁老爷子在《敏捷开发》一书种的第17章&#xff0c;并配上自己的理解&#xff0c;因为这一章写的实在是太精彩了&#xff0c;希望能够分享给大家&#xff0c;共勉。以下是老爷子的原文中文翻译以及豆芽的个人解读…

Ultra-Fast-Lane-Detection 车道线学习资料整理

目录 官方版本 两个优化 数据标注,降低参数量 1 数据标注 2降低参数量

代码随想录算法训练营Day50|动态规划9

代码随想录算法训练营Day50|动态规划9 文章目录 代码随想录算法训练营Day50|动态规划9一、198.打家劫舍二、213.打家劫舍II三、337.打家劫舍 III 一、198.打家劫舍 class Solution {public int rob(int[] nums) {if (nums null || nums.length 0) return 0;if (nums.length …

C++程序员入门怎么学?

1 背景 经常听到不少朋友在吐槽C太难学了&#xff0c;说什么从入门到放弃等等&#xff1b;做为一名C老兵&#xff0c;从2003年开始入坑C到今年2023年&#xff0c;整整20年的C开发从业者的我&#xff0c;今天尝试给有兴趣从事C开发的程序员提些建议&#xff0c;希望可以帮到大家…