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

Run cargo/jboss without war deployment

Open spyhunter99 opened this issue 8 years ago • 2 comments

I have a use case to run integration tests on a JAR project which interacts with a jboss based web application. The goal is to fire up jboss instance that's preconfigured with war files, etc before running integration junit tests, run the tests, then stop jboss after the tests have been completed. Right now i'm running "gradle cargoStartLocal" with the following snippet

cargo{ local{ homeDir=file("$rootDir/jboss") } containerId='jboss61x' port = 8888 }

And I'm running into the "Cannot get property 'cannonicalPath' on a null object, thrown by LocalCargoContainerTask.validateConfiguration, line 138.

Is this a supported configuration or anything I can do to force it to work this way?

spyhunter99 avatar May 19 '16 15:05 spyhunter99

Have you tried if it works if you use the CargoBasePlugin? The CargoPlugin is definently broken when handling an empty list of deployables.

Here is a few things that might brake the list of deployables. https://github.com/bmuschko/gradle-cargo-plugin/blob/b2c9c217163c6781df55ce1da228c9d796ba469f/src/main/groovy/com/bmuschko/gradle/cargo/util/ProjectInfoHelper.groovy#L28-L35 Here i do not know if a default file object will be returned or null. If it's a default file object then a invalid file will be added to the list.

https://github.com/bmuschko/gradle-cargo-plugin/blob/b2c9c217163c6781df55ce1da228c9d796ba469f/src/main/groovy/com/bmuschko/gradle/cargo/CargoPlugin.groovy#L122-L133 Is definently broken, it will add an item even though you do not want it to, it will even fallback to an invalid file if you define a path to a file that doesn't exist.

jutoft avatar Jan 02 '19 15:01 jutoft

#181 should fix this

jutoft avatar Jan 21 '19 20:01 jutoft