{"action":"created","issue":{"url":"https://api.github.com/repos/puniverse/capsule/issues/47","labels_url":"https://api.github.com/repos/puniverse/capsule/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/puniverse/capsule/issues/47/comments","events_url":"https://api.github.com/repos/puniverse/capsule/issues/47/events","html_url":"https://github.com/puniverse/capsule/issues/47","id":53769238,"number":47,"title":"Unable to set CAPSULE_CACHE_DIR env var in capsule manifest","user":{"login":"ryan-self","id":1077426,"avatar_url":"https://avatars.githubusercontent.com/u/1077426?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-self","html_url":"https://github.com/ryan-self","followers_url":"https://api.github.com/users/ryan-self/followers","following_url":"https://api.github.com/users/ryan-self/following{/other_user}","gists_url":"https://api.github.com/users/ryan-self/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-self/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-self/subscriptions","organizations_url":"https://api.github.com/users/ryan-self/orgs","repos_url":"https://api.github.com/users/ryan-self/repos","events_url":"https://api.github.com/users/ryan-self/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-self/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-01-08T16:25:23Z","updated_at":"2015-01-09T00:13:36Z","closed_at":"2015-01-08T23:57:26Z","body":"Let me begin by saying that capsule is a great tool, that has many amazing features to streamline java app deployment and startup!\r\n\r\nMy setup is the following:\r\n* JRE 1.7.0_25-b15\r\n* Using [Gradle Capsule Plugin](https://github.com/danthegoodman/gradle-capsule-plugin) to build a fat jar\r\n\r\nThe gradle task looks like:\r\ntask fatCapsule(type:FatCapsule) {\r\n    applicationClass '######'\r\n    capsuleManifest {\r\n      environmentVariables = [\r\n          'CAPSULE_CACHE_DIR': '######'\r\n      ]\r\n  }\r\n}\r\n\r\nThe output capsule manifest looks like:\r\nManifest-Version: 1.0\r\nMain-Class: Capsule\r\nApplication-Class: #######\r\nEnvironment-Variables: CAPSULE_CACHE_DIR=#######\r\n\r\nI am working with capsule in a production system, in which it is not possible to write into the process' user home dir. I have tried the following approaches:\r\n* Set `Extract-Capsule` to `false` in the capsule manifest. I have verified that capsule no longer writes all the jars to the cache; however, capsule still creates the dir, which is undesirable. Also, when executing the capsule jar, there's an error that the capsule can't be found.\r\n* Set the 'Environment-Variables' manifest property to update the CAPSULE_CACHE_DIR. When I looked at the output of `ps -ef | grep capsule`, the second jvm process spawned is still using the default home dir setting.\r\n* Make a bash wrapper for my capsule-jar that will manually set the CAPSULE_CACHE_DIR, if it's not set, to avoid deployment overhead. This works; however, I would like to have this without a bash wrapper, for users that will interact with the capsule jar directly."},"comment":{"url":"https://api.github.com/repos/puniverse/capsule/issues/comments/69273947","html_url":"https://github.com/puniverse/capsule/issues/47#issuecomment-69273947","issue_url":"https://api.github.com/repos/puniverse/capsule/issues/47","id":69273947,"user":{"login":"ryan-self","id":1077426,"avatar_url":"https://avatars.githubusercontent.com/u/1077426?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-self","html_url":"https://github.com/ryan-self","followers_url":"https://api.github.com/users/ryan-self/followers","following_url":"https://api.github.com/users/ryan-self/following{/other_user}","gists_url":"https://api.github.com/users/ryan-self/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-self/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-self/subscriptions","organizations_url":"https://api.github.com/users/ryan-self/orgs","repos_url":"https://api.github.com/users/ryan-self/repos","events_url":"https://api.github.com/users/ryan-self/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-self/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T00:13:36Z","updated_at":"2015-01-09T00:13:36Z","body":"My main interaction would be attaching a remote debugger to the bootstrapping process itself, if I wanted to debug it. If I try to attach one now, through normal setup, the second process will already have tried to bind to the same port."}}