简体   繁体   English

Jhipster Gradle构建未加载生产档案

[英]Jhipster gradle build not loading production profile

I'm new to Jhipster application and just giving it a shot. 我对Jhipster应用程序是陌生的,只是尝试一下即可。 I am unable to build project with Production profile. 我无法使用生产资料来构建项目。 Below is the command I invoked. 下面是我调用的命令。 I see it does load the "profile_prod.gradle" file but does not go inside the following block: 我看到它确实加载了“ profile_prod.gradle”文件,但没有进入以下代码块:

task setProdProperties(dependsOn: bootRun) << {
    doFirst {
        println "Not getting here"
        System.setProperty('spring.profiles.active', 'prod')
    }
}

Gradle command I invoked: 我调用的Gradle命令:

gradle -Pprofile=prod clean build

There's no doFirst block in doLast ( << ) action. doLast<< )操作中没有doFirst块。 Instead try: 而是尝试:

task setProdProperties(dependsOn: bootRun) {
    doFirst {
        println "Not getting here"
        System.setProperty('spring.profiles.active', 'prod')
    }
}

and invoke the command once again. 并再次调用该命令。

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

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