File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
lib/java_buildpack/framework
spec/java_buildpack/framework Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def release
6262
6363 if @droplet . java_home . java_9_or_later?
6464 @droplet . root_libraries << luna_provider_jar
65+
66+ @droplet . environment_variables . add_environment_variable (
67+ 'LD_LIBRARY_PATH' , "$LD_LIBRARY_PATH:#{ ld_lib_path } "
68+ )
6569 else
6670 @droplet . extension_directories << ext_dir
6771 end
@@ -128,6 +132,10 @@ def lib_cklog
128132 @droplet . sandbox + 'libs/64/libcklog2.so'
129133 end
130134
135+ def ld_lib_path
136+ qualify_path ( @droplet . sandbox , @droplet . root ) + '/jsp/64/'
137+ end
138+
131139 def setup_ext_dir
132140 FileUtils . mkdir ext_dir
133141 [ luna_provider_jar , luna_api_so ] . each do |file |
Original file line number Diff line number Diff line change 219219 delegate
220220 end
221221
222- it 'adds JAR to classpath during compile in Java 9' ,
222+ it 'adds JAR to classpath during compile in Java 9+ ' ,
223223 cache_fixture : 'stub-luna-security-provider.tar' do
224224
225225 component . compile
226226
227227 expect ( root_libraries ) . to include ( droplet . sandbox + 'jsp/LunaProvider.jar' )
228228 end
229229
230- it 'adds JAR to classpath during release in Java 9' do
230+ it 'adds JAR to classpath during release in Java 9+ ' do
231231 component . release
232232
233233 expect ( root_libraries ) . to include ( droplet . sandbox + 'jsp/LunaProvider.jar' )
234234 end
235235
236- it 'adds does not add extension directory in Java 9' do
236+ it 'does not add extension directory in Java 9+ ' do
237237 component . release
238238
239239 expect ( extension_directories ) . not_to include ( droplet . sandbox + 'ext' )
240240 end
241241
242+ it 'updates environment variables for Java 9+' do
243+ component . release
244+ expect ( environment_variables ) . to include (
245+ 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/.java-buildpack/luna_security_provider/jsp/64/'
246+ )
247+ end
242248 end
243249
244250 context do
You can’t perform that action at this time.
0 commit comments