File tree Expand file tree Collapse file tree
lib/java_buildpack/container
fixtures/container_main_spring_boot_properties_launcher/META-INF Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 parser (2.0.0 )
1313 ast (~> 1.1 )
1414 slop (~> 3.4 , >= 3.4.5 )
15- powerpack (0.0.8 )
15+ powerpack (0.0.9 )
1616 rainbow (1.1.4 )
1717 rake (10.1.0 )
1818 redcarpet (3.0.0 )
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def manifest_class_path
7676 end
7777
7878 def port
79- main_class =~ /^org\. springframework\. boot\. loader\. [JW]arLauncher $/ ? '--server.port=$PORT' : nil
79+ main_class =~ /^org\. springframework\. boot\. loader\. (?: [JW]ar|Properties)Launcher $/ ? '--server.port=$PORT' : nil
8080 end
8181
8282 end
Original file line number Diff line number Diff line change 1+ Main-Class : org.springframework.boot.loader.PropertiesLauncher
Original file line number Diff line number Diff line change @@ -154,6 +154,17 @@ module JavaBuildpack::Container
154154 expect ( command ) . to eq ( 'test-java-home/bin/java -cp . org.springframework.boot.loader.WarLauncher --server.port=$PORT' )
155155 end
156156
157+ it 'should release Spring boot applications with a PropertiesLauncher in the MANIFEST.MF by specifying a port' do
158+ command = Main . new (
159+ app_dir : 'spec/fixtures/container_main_spring_boot_properties_launcher' ,
160+ java_home : 'test-java-home' ,
161+ java_opts : [ ] ,
162+ configuration : { }
163+ ) . release
164+
165+ expect ( command ) . to eq ( 'test-java-home/bin/java -cp . org.springframework.boot.loader.PropertiesLauncher --server.port=$PORT' )
166+ end
167+
157168 it 'should release Spring boot applications with a JarLauncher in the configuration by specifying a port' do
158169 Dir . mktmpdir do |root |
159170 lib_directory = File . join ( root , '.lib' )
@@ -194,6 +205,26 @@ module JavaBuildpack::Container
194205 end
195206 end
196207
208+ it 'should release Spring boot applications with a PropertiesLauncher in the configuration by specifying a port' do
209+ Dir . mktmpdir do |root |
210+ lib_directory = File . join ( root , '.lib' )
211+ Dir . mkdir lib_directory
212+
213+ command = Main . new (
214+ app_dir : root ,
215+ java_home : 'test-java-home' ,
216+ java_opts : [ ] ,
217+ lib_directory : lib_directory ,
218+ configuration : {
219+ 'java_main_class' => 'org.springframework.boot.loader.PropertiesLauncher' ,
220+ 'arguments' => 'some arguments'
221+ }
222+ ) . release
223+
224+ expect ( command ) . to eq ( 'test-java-home/bin/java -cp . org.springframework.boot.loader.PropertiesLauncher some arguments --server.port=$PORT' )
225+ end
226+ end
227+
197228 end
198229
199230end
You can’t perform that action at this time.
0 commit comments