File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ def detect
8484 container_detections = @containers . map { |container | container . detect } . compact
8585 raise "Application can be run by more than one container: #{ container_detections . join ( ', ' ) } " if container_detections . size > 1
8686
87- container_detections . empty? ? [ ] : jre_detections . concat ( framework_detections ) . concat ( container_detections ) . flatten . compact
87+ tags = container_detections . empty? ? [ ] : jre_detections . concat ( framework_detections ) . concat ( container_detections ) . flatten . compact
88+ Buildpack . log ( 'detect tags' , tags )
89+ tags
8890 end
8991
9092 # Transforms the application directory such that the JRE, container, and frameworks can run the application
@@ -105,13 +107,15 @@ def release
105107 frameworks . each { |framework | framework . release }
106108 command = container . release
107109
108- {
110+ payload = {
109111 'addons' => [ ] ,
110112 'config_vars' => { } ,
111113 'default_process_types' => {
112114 'web' => command
113115 }
114116 } . to_yaml
117+ Buildpack . log ( 'release payload' , payload )
118+ payload
115119 end
116120
117121 # Logs data with a given title and the current time in the buildpack's log file.
Original file line number Diff line number Diff line change @@ -58,8 +58,10 @@ def compile
5858 # @return [String] the command to run the application.
5959 def release
6060 @java_opts << "-D#{ KEY_HTTP_PORT } =$PORT"
61-
62- "PATH=#{ @java_home } /bin:$PATH JAVA_HOME=#{ @java_home } ./#{ PLAY_START_SCRIPT } #{ java_opts } "
61+ # Change single quotes to double quotes with escape so that options such as
62+ # -XX:OnOutOfMemoryError='kill -9 %p' pass through the Play start script correctly.
63+ quoted_java_opts = java_opts . gsub ( "'" , '\"' )
64+ "PATH=#{ @java_home } /bin:$PATH JAVA_HOME=#{ @java_home } ./#{ PLAY_START_SCRIPT } #{ quoted_java_opts } "
6365 end
6466
6567 private
You can’t perform that action at this time.
0 commit comments