简体   繁体   English

Gradle build停留在compileJava

[英]`gradle build` stuck at compileJava

I execute the following command 我执行以下命令

gradle clean build --debug --scan --info --stacktrace gradle clean build --debug --scan --info --stacktrace

the terminal shows 终端显示

... ...

Task :compileJava Resolving global dependency management for project 'mooncake' Excluding [org.apache.tomcat:tomcat-annotations-api, com.google.protobuf:protobuf-java] Excluding [] Custom actions are attached to task ':compileJava'. 任务:compileJava解决项目'mooncake'的全局依赖项管理,但不包括[org.apache.tomcat:tomcat-annotations-api,com.google.protobuf:protobuf-java]不包括[]自定义操作附加到任务':compileJava'。 Caching disabled for task ':compileJava' because: Build cache is disabled Task ':compileJava' is not up-to-date because: No history is available. 禁用任务':compileJava'的高速缓存,原因是:生成缓存已禁用任务':compileJava'的更新不是最新的,因为:没有可用的历史记录。 All input files are considered out-of-date for incremental task ':compileJava'. 对于增量任务':compileJava',所有输入文件都被视为过时的。 Full recompilation is required because no incremental change information is available. 由于没有可用的增量更改信息,因此需要完全重新编译。 This is usually caused by clean builds or changing compiler arguments. 这通常是由干净的生成或更改编译器参数引起的。 Compiling with JDK Java compiler API. 使用JDK Java编译器API进行编译。 <=------------> 7% EXECUTING [9m 25s] :compileJava <= ------------> 7%执行[9m 25s]:compileJava

It takes too long to compile 编译时间太长

gradle 5.6.2 OS: Mac OS X 10.14.6 x86_64 gradle 5.6.2操作系统:Mac OS X 10.14.6 x86_64

build.gradle build.gradle

plugins {
    id 'org.springframework.boot' version '2.1.7.RELEASE'
    id 'io.spring.dependency-management' version '1.0.8.RELEASE'
    id 'java'
}
//apply plugin: 'idea'

group = 'com.xxx'
version = '0.0.1'
sourceCompatibility = '1.8'

repositories {
    mavenCentral()
    jcenter()
    //maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.projectlombok:lombok:1.18.8'
    annotationProcessor 'org.projectlombok:lombok:1.18.8'
    implementation "mysql:mysql-connector-java"
    implementation "com.h2database:h2"
    implementation "com.googlecode.plist:dd-plist:1.21"
    implementation "net.dongliu:apk-parser:2.6.9"
    implementation "org.springframework.boot:spring-boot-starter-validation"
    implementation "org.springframework.boot:spring-boot-starter-security"
    implementation 'com.auth0:java-jwt:3.8.2'
    implementation 'com.alibaba:fastjson:1.2.59'
    implementation 'org.apache.commons:commons-lang3:3.9'
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    testImplementation "junit:junit"
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    testImplementation 'org.projectlombok:lombok:1.18.8'
    testAnnotationProcessor 'org.projectlombok:lombok:1.18.8'
    testImplementation "mysql:mysql-connector-java"
    testImplementation "com.h2database:h2"
    testImplementation "com.googlecode.plist:dd-plist:1.21"
    testImplementation "net.dongliu:apk-parser:2.6.9"
    testImplementation "org.springframework.boot:spring-boot-starter-validation"
    testImplementation "org.springframework.boot:spring-boot-starter-security"
    testImplementation 'com.auth0:java-jwt:3.8.2'
    testImplementation 'com.alibaba:fastjson:1.2.59'
    testImplementation 'org.apache.commons:commons-lang3:3.9'
    testImplementation fileTree(dir: 'libs', include: ['*.jar'])

}

现在,我通过将jdk更新为openjdk@1.13.0来修复了它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM