@@ -45,9 +45,8 @@ def detect
4545
4646 # (see JavaBuildpack::Component::BaseComponent#compile)
4747 def compile
48- if @spring_boot_utils . is? ( @application )
49- @droplet . additional_libraries . link_to ( @spring_boot_utils . lib ( @droplet ) )
50- end
48+ return unless @spring_boot_utils . is? ( @application )
49+ @droplet . additional_libraries . link_to ( @spring_boot_utils . lib ( @droplet ) )
5150 end
5251
5352 # (see JavaBuildpack::Component::BaseComponent#release)
@@ -60,7 +59,8 @@ def release
6059 @droplet . additional_libraries . insert 0 , @application . root
6160 end
6261
63- release_text
62+ classpath = @spring_boot_utils . is? ( @application ) ? '-cp $PWD/.' : @droplet . additional_libraries . as_classpath
63+ release_text ( classpath )
6464 end
6565
6666 private
@@ -71,29 +71,19 @@ def release
7171
7272 private_constant :ARGUMENTS_PROPERTY , :CLASS_PATH_PROPERTY
7373
74- def release_text
75- release = [
74+ def release_text ( classpath )
75+ [
7676 @droplet . java_opts . as_env_var ,
7777 '&&' ,
7878 @droplet . environment_variables . as_env_vars ,
7979 'eval' ,
8080 'exec' ,
8181 "#{ qualify_path @droplet . java_home . root , @droplet . root } /bin/java" ,
82- '$JAVA_OPTS'
83- ]
84-
85- if @spring_boot_utils . is? ( @application )
86- release << '-cp $PWD/.'
87- else
88- release << @droplet . additional_libraries . as_classpath
89- end
90-
91- release << [
82+ '$JAVA_OPTS' ,
83+ classpath ,
9284 main_class ,
9385 arguments
94- ]
95-
96- release . flatten . compact . join ( ' ' )
86+ ] . flatten . compact . join ( ' ' )
9787 end
9888
9989 def arguments
0 commit comments