Reputation: 519
I'm new to Jhipster application and just giving it a shot. 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:
task setProdProperties(dependsOn: bootRun) << {
doFirst {
println "Not getting here"
System.setProperty('spring.profiles.active', 'prod')
}
}
Gradle command I invoked:
gradle -Pprofile=prod clean build
Upvotes: 2
Views: 549
Reputation: 84786
There's no doFirst
block in doLast
(<<
) action. Instead try:
task setProdProperties(dependsOn: bootRun) {
doFirst {
println "Not getting here"
System.setProperty('spring.profiles.active', 'prod')
}
}
and invoke the command once again.
Upvotes: 1