vertx-gradle-plugin
vertx-gradle-plugin copied to clipboard
Not able to use multiple deployment profiles
I'm trying to setup multiple deployment profiles just as described in the README. Everyting works as long as I use the default profile mod. As soon as I choose a different name for the the profile or even specify more than one I get the following error on execution of the run task
» ./gradlew runModCfg
:myproject:runModCfg FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myproject:runModCfg'.
> Cannot get property 'module' on null object
The part of the stack trace which seems to be relevant is the following:
Caused by: java.lang.NullPointerException: Cannot get property 'module' on null object
at com.darylteo.vertx.gradle.tasks.RunVertx.exec(RunVertx.groovy:35)
org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
...
The gradle build-script contains the following:
vertx {
...
deployments {
modCfg {
platform {
version '2.1.4'
cluster()
instances 1
}
}
}
...
}
The config does not automatically take the project you're running.
Set module property to the project you want to launch.
I am slowly workin on a new version for version 3.0 so sorry for the inconvenience.
Daryl
On Sunday, November 9, 2014, Ivo Senner [email protected] wrote:
I'm trying to setup multiple deployment profiles just as described in the README. Everyting works as long as I use the default profile mod. As soon as I choose a different name for the the profile or even specify more than one I get the following error on execution of the run task
» ./gradlew runModCfg :myproject:runModCfg FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':myproject:runModCfg'.
Cannot get property 'module' on null object
The part of the stack trace which seems to be relevant is the following:
Caused by: java.lang.NullPointerException: Cannot get property 'module' on null object at com.darylteo.vertx.gradle.tasks.RunVertx.exec(RunVertx.groovy:35) org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) ...
The gradle build-script contains the following:
vertx { ... deployments { modCfg { platform { version '2.1.4' cluster() instances 1 } } } ... }
— Reply to this email directly or view it on GitHub https://github.com/darylteo/vertx-gradle-plugin/issues/23.
Thanks for the response. The following deployment profile did the job for me:
vertx {
...
deployments {
modCfg {
deploy project.vertx.getVertxName()
platform {
version '2.1.4'
cluster()
instances 1
}
}
}
...
}
Furthermore I had to add an additional run Task for every profile to add hazlecast to the classpath and consequently be able to use clustering again (see Issue #11) If you know a better way to do so, I'd appreciate your suggestions.
deploy project
should do the trick
All deployments come with a run task automatically you shouldn't need to add new ones. But yes you still need to manually add hazel cast as I never updated it since they made it not part of core.
Daryl
On Monday, November 10, 2014, Ivo Senner [email protected] wrote:
Thanks for the response. The following deployment profile did the job for me:
vertx { ... deployments { modCfg { deploy project.vertx.getVertxName() platform { version '2.1.4' cluster() instances 1 } } } ... }
Furthermore I had to add an additional run Task for every profile to add hazlecast to the classpath and consequently be able to use clustering again (see Issue #11 https://github.com/darylteo/vertx-gradle-plugin/issues/11 ) If you know a better way to do so, I'd appreciate your suggestions.
— Reply to this email directly or view it on GitHub https://github.com/darylteo/vertx-gradle-plugin/issues/23#issuecomment-62325314 .