bmuschko / gradle-cargo-plugin

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

On setting the `cargo` directory #167

Closed cdancy closed 6 years ago

cdancy commented 6 years ago

Hey Ben. We use this plugin to standup a tomcat instance as part of our gradle build. We'd ideally like the generated /tmp/cargo directory to be instead created at <project-dir>/build/cargo but can't seem to find the right config/property to do so. Any ideas?

bmuschko commented 6 years ago

I looked through the Cargo Ant documentation and it seems like there's no way you can change. Maybe you can double-check. If it is available then we can expose a property for it.

Alternatively, you may also want to ask on the Cargo mailing list.

cdancy commented 6 years ago

Looks like THIS is where they are creating the directory path. Maybe just passing along java.io.tmpdir as a systemProperty would work?

bmuschko commented 6 years ago

I guess it would work but what a hack. ;-) Plus anything that's created in the tmp dir will end up under build. Likely not what you'll want. Maybe you can just request the feature on the Cargo list.

cdancy commented 6 years ago

Yeah didn't work anyway. Tried even setting the jvmargs but still nothing. Oh well ... maybe I'll open up a PR with cargo.

bmuschko commented 6 years ago

You'd probably have to set the system property in your Gradle start script. I am going to close this for now. We can reopen when Cargo adds the feature.

cdancy commented 6 years ago

Yeah thought about that as well but that would definitely be a BIG nono for us :)