Hello everyone, I have a task of type: Exec, which has to be configured with PASSWORD.
project.task('undeployWebserviceApp', type: Exec) {
args = [... '-password', rootProject.wasPassword, ...]
executable = pathToWsadmin
doLast {
...
}
}
This password need to be inserted in runtime:
task credentialsWasInput {
if (project in [project(':profile_management')]) {
def wasPassword = System.console()
.readPassword("\nPlease enter password for WS AS user ${wasLogin}: ").toString()
project.ext["wasPassword"] = wasPassword
}
}
But not all tasks need to input the password! So, as i can see, i have to complete configuration of Exec task only in configuration phase with already known password (which will be available only in second phase). And in conf. phase it’s not possible to use taskGraph… How to avoid this?
Best regards, ILIA