Method: Buildr::Artifact#initialize
- Defined in:
- lib/buildr/packaging/artifact.rb
#initialize(*args) ⇒ Artifact
:nodoc:
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/buildr/packaging/artifact.rb', line 406 def initialize(*args) #:nodoc: super enhance do |task| # Default behavior: download the artifact from one of the remote repositories # if the file does not exist. But this default behavior is counter productive # if the artifact knows how to build itself (e.g. download from a different location), # so don't perform it if the task found a different way to create the artifact. task.enhance do if download_needed? task info "Downloading #{to_spec}" download pom.invoke rescue nil if pom && pom != self && classifier.nil? end end end end |