Class: IronWorkerNG::Feature::Java::MergeJar::Feature
- Defined in:
- lib/iron_worker_ng/feature/java/merge_jar.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #build_command ⇒ Object
- #bundle(container) ⇒ Object
- #code_for_classpath ⇒ Object
-
#initialize(code, path) ⇒ Feature
constructor
A new instance of Feature.
Methods inherited from Base
Constructor Details
#initialize(code, path) ⇒ Feature
Returns a new instance of Feature.
8 9 10 11 12 |
# File 'lib/iron_worker_ng/feature/java/merge_jar.rb', line 8 def initialize(code, path) super(code) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/iron_worker_ng/feature/java/merge_jar.rb', line 6 def path @path end |
Instance Method Details
#build_command ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/iron_worker_ng/feature/java/merge_jar.rb', line 22 def build_command if @code.remote_build_command || @code.full_remote_build if @code.full_remote_build && IronWorkerNG::Fetcher.remote?(rebase(@path)) "jar '#{rebase(@path)}'" else "jar '#{@code.dest_dir}#{File.basename(@path)}'" end else nil end end |
#bundle(container) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/iron_worker_ng/feature/java/merge_jar.rb', line 14 def bundle(container) IronCore::Logger.debug 'IronWorkerNG', "Bundling java jar with path='#{@path}'" if (not @code.full_remote_build) || (not IronWorkerNG::Fetcher.remote?(rebase(@path))) container_add(container, File.basename(@path), rebase(@path)) end end |
#code_for_classpath ⇒ Object
34 35 36 |
# File 'lib/iron_worker_ng/feature/java/merge_jar.rb', line 34 def code_for_classpath File.basename(@path) end |