Sha256: 2f357230525eaf70c1a91a20f00522bc3f4a49c8afb604cd64f0793d921a0665

Contents?: true

Size: 867 Bytes

Versions: 9

Compression:

Stored size: 867 Bytes

Contents

require_relative '../../feature/java/merge_jar'
require_relative '../../feature/java/merge_exec'

module IronWorkerNG
  module Code
    module Runtime
      module Java
        include IronWorkerNG::Feature::Java::MergeJar::InstanceMethods
        include IronWorkerNG::Feature::Java::MergeExec::InstanceMethods

        def runtime_run_code(local = false)
          classpath_array = []

          @features.each do |f|
            if f.respond_to?(:code_for_classpath)
              classpath_array << f.send(:code_for_classpath)
            end
          end

          classpath = classpath_array.join(':')

          IronCore::Logger.info 'IronWorkerNG', "Collected '#{classpath}' classpath"

          <<RUN_CODE
java -cp #{classpath} #{@exec.klass.nil? ? "-jar #{File.basename(@exec.path)}" : @exec.klass} "$@"
RUN_CODE
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iron_worker_ng-0.10.2 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.10.1 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.10.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.6 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.5 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.4 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.2 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.1 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.9.0 lib/iron_worker_ng/code/runtime/java.rb