Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Not able to use multiple deployment profiles #23

Open
s0x opened this issue Nov 9, 2014 · 3 comments
Open

Not able to use multiple deployment profiles #23

s0x opened this issue Nov 9, 2014 · 3 comments

Comments

@s0x
Copy link

s0x commented Nov 9, 2014

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
      }
    }
  }
  ...
}
@darylteo
Copy link
Owner

darylteo commented Nov 9, 2014

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 notifications@github.com 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
#23.

@s0x
Copy link
Author

s0x commented Nov 9, 2014

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.

@darylteo
Copy link
Owner

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 notifications@github.com 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 #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
#23 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants