ivy4r 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,9 @@ Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
5
  bin/ivy4r
6
+ jars/lib/ant-1.7.1.jar
7
+ jars/lib/ant-launcher-1.7.1.jar
8
+ jars/lib/ant-trax-1.7.1.jar
6
9
  lib/buildr/ivy_extension.rb
7
10
  lib/ivy/artifactproperty.rb
8
11
  lib/ivy/artifactreport.rb
data/Rakefile CHANGED
@@ -23,3 +23,20 @@ rescue LoadError
23
23
  end
24
24
 
25
25
  # vim: syntax=ruby
26
+
27
+ ENV['IVY_EXT_DIR'] ||= '../Ivy'
28
+
29
+ task 'ivy:publish' do#=> ['test', 'test:plugins', 'war:clean', 'war'] do
30
+ raise 'ANT_HOME missing in environment!' unless ENV['ANT_HOME']
31
+ require 'ivy4r'
32
+ ivy = Ivy4r.new
33
+ #ivy.ant_home = ENV['ANT_HOME']
34
+ ext_dir = File.expand_path(ENV['IVY_EXT_DIR'])
35
+ ivy.project_dir = ext_dir
36
+ home = File.join(ext_dir, 'ivy-home')
37
+ ivy.lib_dir = File.join(home, 'jars')
38
+ ivy.property['ivy.home'] = home
39
+ ivy.property['ivy.status'] = 'release'
40
+ ivy.settings :file => File.join(ext_dir, 'ant-scripts', 'ivysettings.xml')
41
+ ivy.resolve :file => File.join(File.dirname(__FILE__), 'ivy.xml') #options = {:status => status, :pubrevision => revision, :artifactspattern => "#{publish_from}/[artifact].[ext]"}
42
+ end
Binary file
@@ -64,7 +64,7 @@ module Buildr
64
64
  @ant
65
65
  end
66
66
 
67
- # Returns name of publish target to use for this project
67
+ # Returns name of the project the ivy file belongs to.
68
68
  def file_project
69
69
  own_file? ? @project : @base_ivy.file_project
70
70
  end
@@ -1,10 +1,44 @@
1
1
  require 'antwrap'
2
2
  require 'ivy/targets'
3
3
 
4
+ =begin rdoc
5
+ Simple wrapper that maps the ant ivy targets one to one to ruby. See the {Apache Ivy}[http://ant.apache.org/ivy/index.html]
6
+ for more informations about the parameters for a call. All ivy ant targets have the equivalent
7
+ name in this class.
8
+
9
+ The standard parameters are provided as Hash, i.e.:
10
+ <ivy:configure file="settings.xml" settingsId="my.id" />
11
+ is
12
+ ivy4r.configure :file => "settings.xml", :settingsId => 'my.id'
13
+
14
+ You can use nested options via the nested attribute:
15
+ <ivy:buildlist reference="testpath">
16
+ <fileset dir="target/p1" includes="buildfile" />
17
+ </ivy:buildlist>
18
+ is
19
+ @ivy4r.buildlist :reference => 'testpath', :nested => {
20
+ :fileset => {:dir => 'target/p1', :includes => 'buildfile'}
21
+ }
22
+
23
+ you can nest more than on element of the same type using an array:
24
+ <ivy:buildlist reference="testpath">
25
+ <fileset dir="target/sub" includes="**/buildfile" />
26
+ <fileset dir="target/p1" includes="buildfile" />
27
+ </ivy:buildlist>
28
+ is
29
+ @ivy4r.buildlist :reference => 'testpath', :nested => {
30
+ :fileset => [
31
+ {:dir => 'target/sub', :includes => '**/buildfile'},
32
+ {:dir => 'target/p1', :includes => 'buildfile'}
33
+ ]
34
+ }
35
+ =end
4
36
  class Ivy4r
5
- VERSION = '0.2.0'
37
+ VERSION = '0.3.0'
6
38
 
7
39
  # Set the ant home directory to load ant classes from if no custom __antwrap__ is provided
40
+ # and the default provided ant version 1.7.1 should not be used.
41
+ # Must be set before any call to method that uses the ivy is made.
8
42
  attr_accessor :ant_home
9
43
 
10
44
  # Defines the directory to load ivy libs and its dependencies from
@@ -105,9 +139,9 @@ class Ivy4r
105
139
  Ivy::Report.new(ant).execute(*params)
106
140
  end
107
141
 
108
- # Used to get or set an ant properties
142
+ # Used to get or set ant properties.
109
143
  # [set] <tt>property['name'] = value</tt> sets the ant property with name to given value no overwrite
110
- # [get] <tt>property[matcher]/tt> gets property that is equal via case equality operator (+===+)
144
+ # [get] <tt>property[matcher]</tt> gets property that is equal via case equality operator (<tt>===</tt>)
111
145
  def property
112
146
  AntPropertyHelper.new(ant_properties)
113
147
  end
@@ -115,8 +149,8 @@ class Ivy4r
115
149
  # Returns the __antwrap__ instance to use for all internal calls creates a default
116
150
  # instance if no instance has been set before.
117
151
  def ant
118
- @ant ||= ::Antwrap::AntProject.new(:ant_home => ant_home, :name => "ivy-ant",
119
- :basedir => Dir.pwd, :declarative => true)
152
+ @ant ||= ::Antwrap::AntProject.new(:ant_home => ant_home || File.expand_path(File.join(File.dirname(__FILE__), '..', 'jars')),
153
+ :name => "ivy-ant", :basedir => Dir.pwd, :declarative => true)
120
154
  init(@ant) if should_init?
121
155
  @ant
122
156
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ivy4r
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaas Prause
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-18 00:00:00 +02:00
12
+ date: 2009-06-19 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -49,6 +49,9 @@ files:
49
49
  - README.txt
50
50
  - Rakefile
51
51
  - bin/ivy4r
52
+ - jars/lib/ant-1.7.1.jar
53
+ - jars/lib/ant-launcher-1.7.1.jar
54
+ - jars/lib/ant-trax-1.7.1.jar
52
55
  - lib/buildr/ivy_extension.rb
53
56
  - lib/ivy/artifactproperty.rb
54
57
  - lib/ivy/artifactreport.rb