klaas1979-ivy4r 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +3 -0
- data/Rakefile +1 -0
- data/jars/lib/ant-1.7.1.jar +0 -0
- data/jars/lib/ant-launcher-1.7.1.jar +0 -0
- data/jars/lib/ant-trax-1.7.1.jar +0 -0
- data/lib/buildr/ivy_extension.rb +21 -2
- data/lib/ivy4r.rb +39 -5
- metadata +6 -3
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
@@ -8,6 +8,7 @@ require 'ivy4r'
|
|
8
8
|
hoe = Hoe.spec 'ivy4r' do |p|
|
9
9
|
# self.rubyforge_name = 'ivy4rx' # if different than 'ivy4r'
|
10
10
|
p.developer('Klaas Prause', 'klaas.prause@googlemail.com')
|
11
|
+
p.remote_rdoc_dir = '' # Release to root only one project
|
11
12
|
p.extra_deps = [['Antwrap', '>=0.7.0']]
|
12
13
|
File.open(File.join(File.dirname(__FILE__), 'VERSION'), 'w') do |file|
|
13
14
|
file.puts Ivy4r::VERSION
|
Binary file
|
Binary file
|
Binary file
|
data/lib/buildr/ivy_extension.rb
CHANGED
@@ -64,7 +64,7 @@ module Buildr
|
|
64
64
|
@ant
|
65
65
|
end
|
66
66
|
|
67
|
-
# Returns name of
|
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
|
@@ -369,7 +369,26 @@ module Buildr
|
|
369
369
|
end
|
370
370
|
end
|
371
371
|
|
372
|
-
|
372
|
+
=begin rdoc
|
373
|
+
The Ivy Buildr extension adding the new tasks for ivy.
|
374
|
+
|
375
|
+
To use ivy in a +buildfile+ do something like:
|
376
|
+
ENV['BUILDR_EXT_DIR'] ||= '../Ivy'
|
377
|
+
require 'buildr/ivy_extension'
|
378
|
+
define 'ivy_project' do
|
379
|
+
[...]
|
380
|
+
ivy.compile_conf('compile').test_conf('test').package_conf('prod', 'server')
|
381
|
+
[...]
|
382
|
+
end
|
383
|
+
|
384
|
+
- This will add the +compile+ configuration to compile and test tasks
|
385
|
+
- Add the +test+ configuration to test compilation and execution
|
386
|
+
- include the artifacts from +prod+ and +server+ to any generated war or ear
|
387
|
+
- The ENV variable is needed to automatically configure the load path for ivy libs.
|
388
|
+
It assumes that you have the following dir structure <tt>[BUILDR_EXT_DIR]/ivy-home/jars</tt>
|
389
|
+
|
390
|
+
For more configuration options see IvyConfig.
|
391
|
+
=end
|
373
392
|
module IvyExtension
|
374
393
|
include Buildr::Extension
|
375
394
|
|
data/lib/ivy4r.rb
CHANGED
@@ -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.
|
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
|
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]
|
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
|
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: klaas1979-ivy4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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-
|
12
|
+
date: 2009-06-19 00:00:00 -07:00
|
13
13
|
default_executable: ivy4r
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.2.0
|
34
34
|
version:
|
35
35
|
description: Apache Ivy dependency manager wrapper for ruby (see {Apache Ivy}[http://ant.apache.org/ivy/index.html] for more information). Use {Apache Ivy}[http://ant.apache.org/ivy/index.html] via a ruby wrapper without the need to use Apache Ant. The wrapper uses Antwrap[http://antwrap.rubyforge.org/] to interface with Ivy. Includes a Extension for Buildr[http://buildr.apache.org/] to use {Apache Ivy}[http://ant.apache.org/ivy/index.html] for dependency management.
|
36
36
|
email:
|
@@ -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
|