gradle-cargo-plugin icon indicating copy to clipboard operation
gradle-cargo-plugin copied to clipboard

Unnecessary deployables validation in CargoStopLocal

Open kennymacleod opened this issue 10 years ago • 3 comments

When I try to execute a CargoStopLocal task, the build fails with "No deployables assigned!". This error is thrown by AbstractCargoContainerTask. This seems wrong - why should I need to declare deployables for CargoStopLocal task? Shouldn't that check be pushed down into the CargoStart[..] tasks instead?

I'm using the cargo-base plugin, and defining my own tomcat start/stop tasks using the plugin's task types.

More generally, it's hard to tell what configuration is actually necessary for a CargoStopLocal task. The examples all seem to assume the shared config used for both start and stop tasks, and the code seems to make many of the same assumptions (shared validation logic, etc). What's the bare minimum CargoStopLocal task config required to just shut the container down?

kennymacleod avatar Aug 26 '14 05:08 kennymacleod

The input properties are mainly driven through the Cargo Ant tasks. The required Ant attributes are not documented in Cargo per action.

I agree. Stopping a container shouldn't require deployable artifacts. It would make sense to separate the logic. Would you be interested in providing the change as a pull request?

bmuschko avatar Aug 29 '14 15:08 bmuschko

This should be fixable if the issues mentioned here is fixed: https://github.com/bmuschko/gradle-cargo-plugin/issues/147#issuecomment-450896611

jutoft avatar Jan 02 '19 15:01 jutoft

#181 should fix this.

jutoft avatar Jan 21 '19 20:01 jutoft