bmuschko / gradle-cargo-plugin

Gradle plugin that provides deployment capabilities to local and remote containers via Cargo
Apache License 2.0
258 stars 61 forks source link

Unnecessary deployables validation in CargoStopLocal #99

Open kennymacleod opened 10 years ago

kennymacleod commented 10 years ago

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?

bmuschko commented 10 years ago

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?

jutoft commented 5 years ago

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

jutoft commented 5 years ago

181 should fix this.