|
54 | 54 | expect(component.detect).to be_nil |
55 | 55 | end |
56 | 56 |
|
| 57 | + it 'links additional libraries to the lib directory', |
| 58 | + app_fixture: 'container_main_spring_boot_jar_launcher' do |
| 59 | + |
| 60 | + component.compile |
| 61 | + |
| 62 | + lib = app_dir + 'lib' |
| 63 | + |
| 64 | + test_jar_1 = lib + 'test-jar-1.jar' |
| 65 | + test_jar_2 = lib + 'test-jar-2.jar' |
| 66 | + expect(test_jar_1).to exist |
| 67 | + expect(test_jar_1).to be_symlink |
| 68 | + expect(test_jar_1.readlink).to eq((additional_libs_directory + 'test-jar-1.jar').relative_path_from(lib)) |
| 69 | + |
| 70 | + expect(test_jar_2).to exist |
| 71 | + expect(test_jar_2).to be_symlink |
| 72 | + expect(test_jar_2.readlink).to eq((additional_libs_directory + 'test-jar-2.jar').relative_path_from(lib)) |
| 73 | + end |
| 74 | + |
57 | 75 | context do |
58 | 76 | include_context 'explicit_main_class' |
59 | 77 |
|
|
88 | 106 | end |
89 | 107 | end |
90 | 108 |
|
91 | | - it 'releases Spring boot applications with a JarLauncher in the MANIFEST.MF by specifying a port', |
| 109 | + it 'releases Spring boot applications with a JarLauncher in the MANIFEST.MF by specifying a port', :show_output, |
92 | 110 | app_fixture: 'container_main_spring_boot_jar_launcher' do |
93 | 111 |
|
94 | 112 | expect(component.release).to eq('JAVA_OPTS="test-opt-2 test-opt-1" && test-var-2 test-var-1 SERVER_PORT=$PORT ' \ |
95 | 113 | "eval exec #{qualify_path java_home.root, droplet.root}/bin/java $JAVA_OPTS " \ |
96 | | - '-cp $PWD/.:$PWD/.additional_libs/test-jar-1.jar:$PWD/.additional_libs/' \ |
97 | | - 'test-jar-2.jar org.springframework.boot.loader.JarLauncher') |
| 114 | + '-cp $PWD/. org.springframework.boot.loader.JarLauncher') |
98 | 115 | end |
99 | 116 |
|
100 | 117 | it 'releases Spring boot applications with a WarLauncher in the MANIFEST.MF by specifying a port', |
101 | 118 | app_fixture: 'container_main_spring_boot_war_launcher' do |
102 | 119 |
|
103 | 120 | expect(component.release).to eq('JAVA_OPTS="test-opt-2 test-opt-1" && test-var-2 test-var-1 SERVER_PORT=$PORT ' \ |
104 | 121 | "eval exec #{qualify_path java_home.root, droplet.root}/bin/java $JAVA_OPTS " \ |
105 | | - '-cp $PWD/.:$PWD/.additional_libs/test-jar-1.jar:$PWD/.additional_libs/' \ |
106 | | - 'test-jar-2.jar org.springframework.boot.loader.WarLauncher') |
| 122 | + '-cp $PWD/. org.springframework.boot.loader.WarLauncher') |
107 | 123 | end |
108 | 124 |
|
109 | 125 | it 'releases Spring boot applications with a PropertiesLauncher in the MANIFEST.MF by specifying a port', |
110 | 126 | app_fixture: 'container_main_spring_boot_properties_launcher' do |
111 | 127 |
|
112 | 128 | expect(component.release).to eq('JAVA_OPTS="test-opt-2 test-opt-1" && test-var-2 test-var-1 SERVER_PORT=$PORT ' \ |
113 | 129 | "eval exec #{qualify_path java_home.root, droplet.root}/bin/java $JAVA_OPTS " \ |
114 | | - '-cp $PWD/.:$PWD/.additional_libs/test-jar-1.jar:$PWD/.additional_libs/' \ |
115 | | - 'test-jar-2.jar org.springframework.boot.loader.PropertiesLauncher') |
| 130 | + '-cp $PWD/. org.springframework.boot.loader.PropertiesLauncher') |
116 | 131 | end |
117 | 132 |
|
118 | 133 | end |
0 commit comments