zoukankan      html  css  js  c++  java
  • Gradle 使用笔记

    Springboot2.0 多模块打包问题

    打包命令由gradle build 变成 gradle bootJar 或 gradle bootWar

    buildscript {
        repositories {
            mavenCentral()
            maven { url "https://repo.spring.io/snapshot" }
            maven { url "https://repo.spring.io/milestone" }
        }
        dependencies {
            classpath "org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}"
        }
    }
    
    allprojects {
        apply plugin: "java"
        apply plugin: 'org.springframework.boot'
        apply plugin: 'io.spring.dependency-management'
        apply plugin: 'application'
    
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    
        dependencies {
            compile("org.projectlombok:lombok")
            compile("org.springframework.boot:spring-boot-starter")
        }
    
        repositories {
            repositories {
                maven { url ALY_MAVEN_REPOURL }
                maven { url "https://repo.spring.io/snapshot" }
                maven { url "https://repo.spring.io/milestone" }
    
            }
        }
    
        configurations {
            all*.exclude module: 'commons-logging'
        }
    
        //这里一定得要。在多模块下,不然编译失败,因为不会把信赖模块给打包。
        jar {
            enabled = true
        }
    
        bootJar {
            classifier = 'app'
        }
    }

    另外这个错误解决是:

    你启动的bootJar命令,必须在有启动类的项目下执行bootJar。 不然会遇到下面这个问题,springBoot默认是根据找当前目录下的引导类.

      解决错误:The value of a manifest attribute must not be null (Key=Start-Class).

    转自:https://my.oschina.net/tangdu/blog/1625336

    参考资料

    • https://blog.csdn.net/maosidiaoxian/article/details/40656311
    • https://www.jianshu.com/p/4e25e25b62c2/
  • 相关阅读:
    Storm分布式实时流计算框架相关技术总结
    上手开源项目的几点建议【转】
    笔试面试的路上——努力ing
    Storm配置项详解【转】
    storm UI
    leetcode-单词探索
    leetcode-全排列详解(回溯算法)
    leetcode-生成括号(回溯算法)
    leetcode-递增的三元子序列
    leetcode-最长无重复字符的子串
  • 原文地址:https://www.cnblogs.com/fqybzhangji/p/9799002.html
Copyright © 2011-2022 走看看