File tree Expand file tree Collapse file tree 5 files changed +7
-29
lines changed
spec/java_buildpack/container Expand file tree Collapse file tree 5 files changed +7
-29
lines changed Original file line number Diff line number Diff line change 1717# Note that the repository is shared with the Play Auto Reconfiguration framework and should be kept in step to
1818# avoid conflicts.
1919---
20- version : 1.0.0_ +
20+ version : 1.1. +
2121repository_root : " {default.repository.root}/spring-boot-cli"
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def release
8282 'default_process_types' => { 'web' => command }
8383 } . to_yaml
8484
85- @logger . debug { "Release Payload\n #{ payload } " }
85+ @logger . debug { "Release Payload: \n #{ payload } " }
8686
8787 payload
8888 end
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ def initialize(context)
4141 # (see JavaBuildpack::Component::BaseComponent#compile)
4242 def compile
4343 download_tar
44- @droplet . additional_libraries . link_to lib_dir
4544 end
4645
4746 # (see JavaBuildpack::Component::BaseComponent#release)
@@ -52,6 +51,7 @@ def release
5251 'SERVER_PORT=$PORT' ,
5352 qualify_path ( @droplet . sandbox + 'bin/spring' , @droplet . root ) ,
5453 'run' ,
54+ @droplet . additional_libraries . as_classpath ,
5555 relative_groovy_files
5656 ] . flatten . compact . join ( ' ' )
5757 end
@@ -66,10 +66,6 @@ def supports?
6666
6767 private
6868
69- def lib_dir
70- @droplet . sandbox + 'lib'
71- end
72-
7369 def relative_groovy_files
7470 JavaBuildpack ::Util ::GroovyUtils . groovy_files ( @application ) . map { |gf | gf . relative_path_from ( @application . root ) }
7571 end
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ module Util
2525 class SpringBootUtils < JarFinder
2626
2727 def initialize
28- super ( /.*spring-boot-([^-] *)\. jar/ )
28+ super ( /.*spring-boot-([\d ]. *)\. jar/ )
2929 end
3030
3131 end
Original file line number Diff line number Diff line change 8484 expect ( sandbox + 'bin/spring' ) . to exist
8585 end
8686
87- it 'should link classpath JARs' ,
88- app_fixture : 'container_spring_boot_cli_valid_app' ,
89- cache_fixture : 'stub-spring-boot-cli.tar.gz' do
90-
91- component . compile
92-
93- lib = sandbox + 'lib'
94-
95- jar_1 = lib + 'test-jar-1.jar'
96- expect ( jar_1 ) . to exist
97- expect ( jar_1 ) . to be_symlink
98- expect ( jar_1 . readlink ) . to eq ( ( additional_libs_directory + 'test-jar-1.jar' ) . relative_path_from ( lib ) )
99-
100- jar_2 = lib + 'test-jar-2.jar'
101- expect ( jar_2 ) . to exist
102- expect ( jar_2 ) . to be_symlink
103- expect ( jar_2 . readlink ) . to eq ( ( additional_libs_directory + 'test-jar-2.jar' ) . relative_path_from ( lib ) )
104- end
105-
10687 it 'should return command' ,
10788 app_fixture : 'container_spring_boot_cli_valid_app' do
10889
10990 expect ( component . release ) . to eq ( "#{ java_home . as_env_var } JAVA_OPTS=#{ java_opts_str } SERVER_PORT=$PORT " \
110- '$PWD/.java-buildpack/spring_boot_cli/bin/spring run directory/pogo_4.groovy ' \
111- 'invalid.groovy pogo_1.groovy pogo_2.groovy pogo_3.groovy' )
91+ '$PWD/.java-buildpack/spring_boot_cli/bin/spring run ' \
92+ '-cp $PWD/.additional_libs/test-jar-1.jar:$PWD/.additional_libs/test-jar-2.jar ' \
93+ 'directory/pogo_4.groovy invalid.groovy pogo_1.groovy pogo_2.groovy pogo_3.groovy' )
11294 end
11395
11496 def java_opts_str
You can’t perform that action at this time.
0 commit comments