Skip to content
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

Duplicated -X entries with etc-default-template #211

Closed
muuki88 opened this issue Apr 2, 2014 · 3 comments
Closed

Duplicated -X entries with etc-default-template #211

muuki88 opened this issue Apr 2, 2014 · 3 comments

Comments

@muuki88
Copy link
Contributor

muuki88 commented Apr 2, 2014

My etc-default contains this line

-J-Xmx256m

when I install my debian package and call the script with -d I get the following output

-Xms1024m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=128m
-Dconfig.file=/usr/share/mukis-application-conf/conf/application.conf
-Xmx256m

According to Stackoverflow this is not a good idea.

@jsuereth
Copy link
Member

jsuereth commented Apr 2, 2014

Yeah, it's super bad. This is an issue with the -mem option. However, I thought we had something to detect -X options and not use the -mem hooks if the user directly specifies something with -J-X....

If not, we should merge this fix back into the native-packager:

https://github.com/sbt/sbt-launcher-package/blob/master/src/universal/bin/sbt-launch-lib.bash#L82-L96

@muuki88
Copy link
Contributor Author

muuki88 commented Apr 2, 2014

Even it's not ham-fisted, we have it already in our code:
https://github.com/sbt/sbt-native-packager/blob/master/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template#L157-L165

But it doesn't work :)

@muuki88
Copy link
Contributor Author

muuki88 commented May 9, 2014

I think this is the last blocker for our 0.7.0 release. @jsuereth , @aparkinson , @kardapoltsev , any objections?

@muuki88 muuki88 self-assigned this May 10, 2014
kardapoltsev added a commit that referenced this issue May 12, 2014
FIX #211 and #232. Checking $java_args[@] for memory settings, too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants