Skip to content

Commit 9d0293b

Browse files
committed
Merge 70085176-spring-boot-tomcat to master
[Completes #70085176]
2 parents 8a2d325 + 415861c commit 9d0293b

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

lib/java_buildpack/buildpack.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,19 @@ def require_component(component)
159159
end
160160

161161
def tag_detection(type, components, unique)
162-
tags = components.map { |component| component.detect }.compact
163-
fail "Application can be run by more than one #{type}: #{names components}" if unique && tags.size > 1
162+
detected = []
163+
tags = []
164+
165+
components.each do |component|
166+
result = component.detect
167+
168+
if result
169+
detected << component
170+
tags << result
171+
end
172+
end
173+
174+
fail "Application can be run by more than one #{type}: #{names detected}" if unique && tags.size > 1
164175
tags
165176
end
166177

lib/java_buildpack/container/ratpack.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def id
4242

4343
# (see JavaBuildpack::Container::DistZipLike#supports?)
4444
def supports?
45-
@ratpack_utils.is? @application
45+
start_script(root) && start_script(root).exist? && @ratpack_utils.is?(@application)
4646
end
4747

4848
private

lib/java_buildpack/container/spring_boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def id
4747

4848
# (see JavaBuildpack::Container::DistZipLike#supports?)
4949
def supports?
50-
@spring_boot_utils.is? @application
50+
start_script(root) && start_script(root).exist? && @spring_boot_utils.is?(@application)
5151
end
5252

5353
private

0 commit comments

Comments
 (0)