lib/liberty_buildpack/container/liberty.rb
# Get a list of web applications that are in the server directory
#
# @return [Array<String>] :array of file names of discovered applications
Get a list of web applications that are in the server directory
Get a list of web applications that are in the server directory
def apps
      apps_found = []
      server_xml = Liberty.server_xml(@app_dir)
      if Liberty.web_inf(@app_dir)
        apps_found = [@app_dir]
      elsif Liberty.meta_inf(@app_dir)
        apps_found = [@app_dir]
        wars = Dir.glob(File.expand_path(File.join(@app_dir, '*.war')))
        Liberty.expand_apps(wars)
      elsif server_xml
        ['*.war', '*.ear'].each { |suffix| apps_found += Dir.glob(File.expand_path(File.join(server_xml, '..', '**', suffix))) }
        Liberty.expand_apps(apps_found)
      end
      apps_found
    end
def apps apps_found = [ ] server_xml = Liberty . server_xml ( @app_dir ) if Liberty . web_inf ( @app_dir ) apps_found = [ @app_dir ] elsif Liberty . meta_inf ( @app_dir ) apps_found = [ @app_dir ] wars = Dir . glob ( File . expand_path ( File . join ( @app_dir , '*.war' ) ) ) Liberty . expand_apps ( wars ) elsif server_xml [ '*.war' , '*.ear' ] . each { | suffix | apps_found += Dir . glob ( File . expand_path ( File . join ( server_xml , '..' , '**' , suffix ) ) ) } Liberty . expand_apps ( apps_found ) end apps_found end
Get a list of web applications that are in the server directory
Get a list of web applications that are in the server directory
:array of file names of discovered applications
: array of file names of discovered applications
Array<String>