Class: Ivy4r

Inherits:
Object
  • Object
show all
Defined in:
lib/ivy4r.rb

Constant Summary collapse

VERSION =
'0.1.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*opts) ⇒ Ivy4r

Returns a new instance of Ivy4r.



18
19
20
21
# File 'lib/ivy4r.rb', line 18

def initialize(*opts)
  @ant = opts[0] if opts.size == 1
  raise "To many parameters to create Ivy4r use none, or 1 to set ANT!" if opts.size > 1
end

Instance Attribute Details

#antObject

Returns the __antwrap__ instance to use for all internal calls creates a default instance if no instance has been set before.



117
118
119
120
121
122
# File 'lib/ivy4r.rb', line 117

def ant
  @ant ||= ::Antwrap::AntProject.new(:ant_home => ant_home, :name => "ivy-ant",
    :basedir => Dir.pwd, :declarative => true)
  init(@ant) if should_init?
  @ant
end

#ant_homeObject

Set the ant home directory to load ant classes from if no custom __antwrap__ is provided



8
9
10
# File 'lib/ivy4r.rb', line 8

def ant_home
  @ant_home
end

#lib_dirObject

Defines the directory to load ivy libs and its dependencies from



11
12
13
# File 'lib/ivy4r.rb', line 11

def lib_dir
  @lib_dir
end

#project_dirObject

Returns the value of attribute project_dir.



13
14
15
# File 'lib/ivy4r.rb', line 13

def project_dir
  @project_dir
end

Instance Method Details

#artifactproperty(*params) ⇒ Object

Calls the __artifactproperty__ ivy target with given parameters and returns map with all defined properties



87
88
89
# File 'lib/ivy4r.rb', line 87

def artifactproperty(*params)
  Ivy::Artifactproperty.new(ant).execute(*params)
end

#artifactreport(*params) ⇒ Object

Calls the __artifactreport__ ivy target with given parameters and returns the created xml.



99
100
101
# File 'lib/ivy4r.rb', line 99

def artifactreport(*params)
  Ivy::Artifactreport.new(ant).execute(*params)
end

#buildlist(*params) ⇒ Object

Calls the __buildlist__ ivy target with given parameters and returns the resulting buildlist



93
94
95
# File 'lib/ivy4r.rb', line 93

def buildlist(*params)
  Ivy::Buildlist.new(ant).execute(*params)
end

#buildnumber(*params) ⇒ Object

Calls the __buildnumber__ ivy target with given parameters and returns info as hash.



44
45
46
# File 'lib/ivy4r.rb', line 44

def buildnumber(*params)
  Ivy::Buildnumber.new(ant).execute(*params)
end

#cachepath(*params) ⇒ Object

Calls the __cachepath__ ivy target with given parameters and returns array containing absolute file paths to all artifacts contained in result



75
76
77
# File 'lib/ivy4r.rb', line 75

def cachepath(*params)
  Ivy::Cachepath.new(ant).execute(*params)
end

#cleancache(*params) ⇒ Object

Calls the __cleancache__ ivy target with given parameters.



24
25
26
# File 'lib/ivy4r.rb', line 24

def cleancache(*params)
  Ivy::Cleancache.new(ant).execute(*params)
end

#configure(*params) ⇒ Object

Calls the __configure__ ivy target with given parameters.



34
35
36
# File 'lib/ivy4r.rb', line 34

def configure(*params)
  Ivy::Configure.new(ant).execute(*params)
end

#findrevision(*params) ⇒ Object

Calls the __findrevision__ ivy target with given parameters and returns array containing absolute file paths to all artifacts contained in result



81
82
83
# File 'lib/ivy4r.rb', line 81

def findrevision(*params)
  Ivy::Findrevision.new(ant).execute(*params)
end

#info(*params) ⇒ Object

Calls the __info__ ivy target with given parameters and returns info as hash.



39
40
41
# File 'lib/ivy4r.rb', line 39

def info(*params)
  Ivy::Info.new(ant).execute(*params)
end

#listmodules(*params) ⇒ Object

Calls the __listmodules__ ivy target with given parameters and returns info as hash.



49
50
51
# File 'lib/ivy4r.rb', line 49

def listmodules(*params) #:nodoc:
  Ivy::Listmodules.new(ant).execute(*params)
end

#makepom(*params) ⇒ Object

Calls the __makepom__ ivy target with given parameters and returns pom content.



54
55
56
# File 'lib/ivy4r.rb', line 54

def makepom(*params)
  Ivy::Makepom.new(ant).execute(*params)
end

#propertyObject

Used to get or set an ant properties

set

property['name'] = value sets the ant property with name to given value no overwrite

get

<tt>property/tt> gets property that is equal via case equality operator (+===+)



111
112
113
# File 'lib/ivy4r.rb', line 111

def property
  AntPropertyHelper.new(ant_properties)
end

#publish(*params) ⇒ Object

Calls the __publish__ ivy target with given parameters.



69
70
71
# File 'lib/ivy4r.rb', line 69

def publish(*params)
  Ivy::Publish.new(ant).execute(*params)
end

#report(*params) ⇒ Object

Calls the __report__ ivy target with given parameters



104
105
106
# File 'lib/ivy4r.rb', line 104

def report(*params)
  Ivy::Report.new(ant).execute(*params)
end

#resolve(*params) ⇒ Object

Calls the __resolve__ ivy target with given parameters and returns info as hash.



59
60
61
# File 'lib/ivy4r.rb', line 59

def resolve(*params)
  Ivy::Resolve.new(ant).execute(*params)
end

#retrieve(*params) ⇒ Object

Calls the __retrieve__ ivy target with given parameters.



64
65
66
# File 'lib/ivy4r.rb', line 64

def retrieve(*params)
  Ivy::Retrieve.new(ant).execute(*params)
end

#settings(*params) ⇒ Object

Calls the __settings__ ivy target with given parameters.



29
30
31
# File 'lib/ivy4r.rb', line 29

def settings(*params)
  Ivy::Settings.new(ant).execute(*params)
end