New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing VM args to apps in conjunction with Gradle plugin's bootRun task #406

Closed
cbeams opened this Issue Feb 26, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@cbeams
Contributor

cbeams commented Feb 26, 2014

[5:50 PM] Chris Beams: @philwebb or @dsyer, how can I supply VM args to a boot app being run with gradle :bootRun? The default Gradle 'application' plugin lets you do it with the following:

[5:51 PM] Chris Beams: applicationDefaultJvmArgs = [ "-XX:MaxPermSize=128M" ], per http://www.gradle.org/docs/1.7/release-notes#specify-default-jvm-arguments-for-the-application-plugin but trying to get away from the application plugin, and just go with bootRun for everything.

[6:01 PM] Phillip Webb: @ChrisBeams not sure if we implemented support for that. Not at my computer at the mo. Could you raise an issue?
[6:01 PM] Chris Beams: yeah

@dsyer

This comment has been minimized.

Member

dsyer commented Feb 26, 2014

You should be able to use the application plugin settings (i.e. just configure memory and JVM settings as you would for the "run" task). Please try it (I'm no gradler so I don't know what that looks like - I assume the same as that link you just pasted).

@cbeams

This comment has been minimized.

Contributor

cbeams commented Feb 26, 2014

Thanks, Dave. Actually, the snippet and link above is the way that you configure the default application plugin.

See https://github.com/spring-io/sagan/blob/master/sagan-site/build.gradle#L57, where we're still setting this value. It works for :sagan-site:run (where we don't get OutOfMemoryErrors), but it doesn't for :sagan-site:bootRun (where we still do).

@dsyer

This comment has been minimized.

Member

dsyer commented Feb 26, 2014

What version are you using? Try with a snapshot of boot plugin? E.g.

apply plugin: 'spring-boot'
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8", "-verbose:class"]

N.B. the typo in the gradle docs makes the file-encoding invalid.

@dsyer

This comment has been minimized.

Member

dsyer commented Feb 27, 2014

Works for me.

@dsyer dsyer closed this Feb 27, 2014

@philwebb philwebb added the invalid label Feb 27, 2014

@cbeams

This comment has been minimized.

Contributor

cbeams commented Feb 28, 2014

Will try when I'm back, thx

cbeams added a commit to spring-io/sagan that referenced this issue Mar 14, 2014

@cbeams

This comment has been minimized.

Contributor

cbeams commented Mar 14, 2014

Confirming that we're indeed good with passing VM args during :bootRun. See commit above. Thanks, Dave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment