ctrl-c ./gradlew bootRun

时间:2017-05-12 19:28:25

标签: gradle spring-boot command-line

我在./gradlew bootRun收到终端中的ctrl-c出口时尝试删除docker容器。

我的bootRun配置:

bootRun {

  systemProperties = System.properties
  dependsOn pathingJar
  doFirst {
    classpath = files("$buildDir/classes/main", "$buildDir/resources/main", pathingJar.archivePath)
  }
  ignoreExitValue true // what I was hoping would work
}

任务清单:

$ ./gradlew bootrun -m
:compileJava SKIPPED
:generateGitProperties SKIPPED
:processResources SKIPPED
:classes SKIPPED
:composeUp SKIPPED
:findMainClass SKIPPED
:pathingJar SKIPPED
:bootRun SKIPPED
:composeDown SKIPPED

当发出ctrl-c时,希望ignoreExitValue会导致gradle继续执行下一个任务;但是,这不起作用。

如何强制gradle运行composeDown?

0 个答案:

没有答案