@@ -58,7 +58,7 @@ def compile
5858 puts BUILDPACK_MESSAGE % @buildpack_version
5959
6060 container = component_detection ( 'container' , @containers , true ) . first
61- fail 'No container can run this application' unless container
61+ no_container unless container
6262
6363 component_detection ( 'JRE' , @jres , true ) . first . compile
6464 component_detection ( 'framework' , @frameworks , false ) . each ( &:compile )
@@ -71,7 +71,7 @@ def compile
7171 # @return [String] The payload required to run the application.
7272 def release
7373 container = component_detection ( 'container' , @containers , true ) . first
74- fail 'No container can run this application' unless container
74+ no_container unless container
7575
7676 commands = [ ]
7777 commands << component_detection ( 'JRE' , @jres , true ) . first . release
@@ -176,6 +176,12 @@ def names(components)
176176 components . map { |component | component . class . to_s . space_case } . join ( ', ' )
177177 end
178178
179+ def no_container
180+ fail 'No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or ' \
181+ 'artifacts using the -p command line argument or path manifest entry. Information about valid JVM ' \
182+ 'artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. '
183+ end
184+
179185 def require_component ( component )
180186 file = LOAD_ROOT + "#{ component . snake_case } .rb"
181187
0 commit comments