grails 3 system properties pain

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

grails 3 system properties pain

Rick LaBanca-2
Giving a try at migrating an app to 3.. finally.  So I am trying to settle the small things.
I normally have a ton of -D options for setting things in the JVM and a few for grails such as the port.

When doing run-app those don't get passed. So I saw the idea of copying them all in the bootRun section.

That works, but then the issue is if I set up a debugger or jmx port, it gets set on the main vm and also the spawned one, and of course fails.

In production all the settings will be fine of course, it's this vm spawning that is the issue. Is there a way to just run tomcat without spawning?

If not has anyone come up with a handy way of managing the system props that would be common, and also unique to the main vm and spawned vm?




--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/5694885c-387b-42bc-b1fa-16cf8155cc7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: grails 3 system properties pain

amal.shehadeh
In order for your application to read the -D options that you pass, you need to add the following to your build.gradle:

tasks.withType(JavaExec) {
    // Assign all Java system properties from the command line to the JavaExec task.
    systemProperties System.properties
}

It should work then...


On Saturday, November 24, 2018 at 12:31:20 AM UTC+1, Rick LaBanca wrote:
Giving a try at migrating an app to 3.. finally.  So I am trying to settle the small things.
I normally have a ton of -D options for setting things in the JVM and a few for grails such as the port.

When doing run-app those don't get passed. So I saw the idea of copying them all in the bootRun section.

That works, but then the issue is if I set up a debugger or jmx port, it gets set on the main vm and also the spawned one, and of course fails.

In production all the settings will be fine of course, it's this vm spawning that is the issue. Is there a way to just run tomcat without spawning?

If not has anyone come up with a handy way of managing the system props that would be common, and also unique to the main vm and spawned vm?




--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/0c805b98-aa4e-437f-a8d4-7238994474fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.