buildr-resolver 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.rdoc +53 -47
- data/VERSION +1 -1
- data/buildr-resolver.gemspec +5 -5
- data/lib/buildr/resolver.rb +2 -2
- data/spec/resolver_spec.rb +5 -4
- metadata +3 -3
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -11,56 +11,62 @@ https://github.com/mguymon/buildr-resolver
|
|
11
11
|
|
12
12
|
gem install buildr-resolver
|
13
13
|
|
14
|
+
=== Examples
|
15
|
+
|
16
|
+
{Wiki}[https://github.com/mguymon/buildr-resolver/wiki]
|
17
|
+
|
14
18
|
=== Usage
|
15
19
|
|
16
|
-
example +buildfile+
|
17
|
-
|
18
|
-
require 'buildr/resolver'
|
19
|
-
Java.load # must be called before Buildr::Resolver.resolve if not using JRuby due to Rjb startup of JVM by Buildr
|
20
|
-
deps = ['org.apache.activemq:activemq-spring:jar:5.4.2']
|
21
|
-
deps = Buildr::Resolver.resolve( deps )
|
22
|
-
define 'example' do
|
23
|
-
project.version = '0.1.0'
|
24
|
-
compile.with deps
|
25
|
-
package :jar
|
26
|
-
end
|
27
|
-
|
28
|
-
The <tt>Buildr::Resolver.resolve(deps)</tt> is what takes the activemq dependency and resolves
|
29
|
-
all the additional dependencies for it. If you added a <tt>puts dep</tt> after <tt>Buildr::Resolver.resolve</tt>, it would output:
|
30
|
-
|
31
|
-
org.apache.activemq:activemq-spring:jar:5.4.2
|
32
|
-
commons-logging:commons-logging-api:jar:1.1
|
33
|
-
org.apache.activemq:activemq-core:jar:5.4.2
|
34
|
-
org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1
|
35
|
-
org.apache.activemq:activeio-core:jar:3.1.2
|
36
|
-
commons-logging:commons-logging:jar:1.1
|
37
|
-
log4j:log4j:jar:1.2.12
|
38
|
-
logkit:logkit:jar:1.0.1
|
39
|
-
avalon-framework:avalon-framework:jar:4.1.3
|
40
|
-
javax.servlet:servlet-api:jar:2.3
|
41
|
-
org.apache.activemq:kahadb:jar:5.4.2
|
42
|
-
org.apache.activemq.protobuf:activemq-protobuf:jar:1.1
|
43
|
-
org.osgi:org.osgi.core:jar:4.1.0
|
44
|
-
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1
|
45
|
-
org.springframework:spring-context:jar:3.0.3.RELEASE
|
46
|
-
org.springframework:spring-aop:jar:3.0.3.RELEASE
|
47
|
-
aopalliance:aopalliance:jar:1.0
|
48
|
-
org.springframework:spring-expression:jar:3.0.3.RELEASE
|
49
|
-
org.springframework:spring-asm:jar:3.0.3.RELEASE
|
50
|
-
commons-net:commons-net:jar:2.0
|
51
|
-
org.jasypt:jasypt:jar:1.6
|
52
|
-
commons-lang:commons-lang:jar:2.1
|
53
|
-
commons-codec:commons-codec:jar:1.1
|
54
|
-
com.ibm.icu:icu4j:jar:4.0.1
|
55
|
-
org.apache.activemq:activemq-pool:jar:5.4.2
|
56
|
-
org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1
|
57
|
-
commons-pool:commons-pool:jar:1.5.4
|
58
|
-
org.springframework:spring-beans:jar:3.0.3.RELEASE
|
59
|
-
org.springframework:spring-core:jar:3.0.3.RELEASE
|
60
|
-
org.springframework:spring-test:jar:3.0.3.RELEASE
|
61
|
-
org.springframework.osgi:spring-osgi-core:jar:1.2.1
|
62
|
-
org.springframework.osgi:spring-osgi-io:jar:1.2.1
|
63
20
|
|
21
|
+
The <tt>Buildr::Resolver.resolve(deps)</tt> is what takes the dependency notation and find all the related dependencies. For exampe, resolving <tt>org.apache.activemq:activemq-spring:jar:5.4.2</tt> would resolve to:
|
22
|
+
|
23
|
+
org.apache.activemq:activemq-spring:jar:5.4.2
|
24
|
+
commons-logging:commons-logging-api:jar:1.1
|
25
|
+
org.apache.activemq:activemq-core:jar:5.4.2
|
26
|
+
org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1
|
27
|
+
org.apache.activemq:activeio-core:jar:3.1.2
|
28
|
+
commons-logging:commons-logging:jar:1.1
|
29
|
+
log4j:log4j:jar:1.2.12
|
30
|
+
logkit:logkit:jar:1.0.1
|
31
|
+
(many more)
|
32
|
+
|
33
|
+
==== {Buildr::Resolver#resolve}[https://github.com/mguymon/buildr-resolver/blob/master/lib/buildr/resolver.rb]
|
34
|
+
The <tt>Buildr::Resolver#resolve</tt> accepts an array of dependencies in the format of:
|
35
|
+
|
36
|
+
* Path to a pom.xml: <tt>'lib/pom.xml'</tt>
|
37
|
+
* A hash for a pom.xml and scopes to use: <tt>'lib/pom.xml' => ['compile','system']</tt>
|
38
|
+
* Dependency notation: <tt>'log4j:log4j:jar:1.2.12'</tt>
|
39
|
+
* A hash for a Dependency notation and scope to use: <tt>'log4j:log4j:jar:1.2.12' => ['compile']</tt>
|
40
|
+
|
41
|
+
Options
|
42
|
+
* :excludes - an array of dependencies to regex exclude
|
43
|
+
* :download - have Buildr::Resolver download artifacts instead of Buildr
|
44
|
+
|
45
|
+
Example:
|
46
|
+
|
47
|
+
Buildr::Resolver.resolve( [ {'lib/pom.xml' => ["test"] }, 'ch.qos.logback:logback-classic:jar:0.9.24', {'junit:junit:jar:4.8.2' => 'test'} ], :download => true )
|
48
|
+
|
49
|
+
==== Resolve Dependencies
|
50
|
+
|
51
|
+
require 'buildr/resolver'
|
52
|
+
Java.load # must be called before Buildr::Resolver.resolve if not using JRuby due to Rjb startup of JVM by Buildr
|
53
|
+
deps = ['org.apache.activemq:activemq-spring:jar:5.4.2']
|
54
|
+
deps = Buildr::Resolver.resolve( deps )
|
55
|
+
define 'example' do
|
56
|
+
project.version = '0.1.0'
|
57
|
+
compile.with deps
|
58
|
+
package :jar
|
59
|
+
end
|
60
|
+
|
61
|
+
==== Resolve Dependencies from a POM
|
62
|
+
require 'buildr/resolver'
|
63
|
+
Java.load # must be called before Buildr::Resolver.resolve if not using JRuby due to Rjb startup of JVM by Buildr
|
64
|
+
task :compile => :resolve_deps
|
65
|
+
task :resolve_deps do |t|
|
66
|
+
DEP_EXCLUDES = ['commons-logging', 'log4j', 'logkit']
|
67
|
+
resolved_deps = Buildr::Resolver.resolve( {_('pom.xml') => ['compile']}, :download => true, :excludes => DEP_EXCLUDES )
|
68
|
+
compile.with( resolved_deps )
|
69
|
+
end
|
64
70
|
|
65
71
|
== License
|
66
72
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.7
|
data/buildr-resolver.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{buildr-resolver}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Guymon"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-12-08}
|
13
13
|
s.description = %q{Java dependency resolver for Buildr using Maven's Aether}
|
14
14
|
s.email = %q{michael.guymon@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,18 +46,18 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.specification_version = 3
|
47
47
|
|
48
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
-
s.add_runtime_dependency(%q<naether>, ["~> 0.
|
49
|
+
s.add_runtime_dependency(%q<naether>, ["~> 0.5.2"])
|
50
50
|
s.add_runtime_dependency(%q<buildr>, ["~> 1.4.6"])
|
51
51
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
52
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
53
53
|
else
|
54
|
-
s.add_dependency(%q<naether>, ["~> 0.
|
54
|
+
s.add_dependency(%q<naether>, ["~> 0.5.2"])
|
55
55
|
s.add_dependency(%q<buildr>, ["~> 1.4.6"])
|
56
56
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
57
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
58
58
|
end
|
59
59
|
else
|
60
|
-
s.add_dependency(%q<naether>, ["~> 0.
|
60
|
+
s.add_dependency(%q<naether>, ["~> 0.5.2"])
|
61
61
|
s.add_dependency(%q<buildr>, ["~> 1.4.6"])
|
62
62
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
63
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
data/lib/buildr/resolver.rb
CHANGED
@@ -88,8 +88,8 @@ module Buildr
|
|
88
88
|
naether.deploy_artifact( notation, file_path, url, opts )
|
89
89
|
end
|
90
90
|
|
91
|
-
def
|
92
|
-
naether.
|
91
|
+
def install( notation, pom_path, jar_path )
|
92
|
+
naether.install( notation, pom_path, jar_path )
|
93
93
|
end
|
94
94
|
|
95
95
|
end
|
data/spec/resolver_spec.rb
CHANGED
@@ -73,14 +73,15 @@ describe Buildr::Resolver do
|
|
73
73
|
end
|
74
74
|
|
75
75
|
it "should install a pom" do
|
76
|
-
if File.exists?( "#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/11.11/buildr-resolver-11.11.jar" )
|
77
|
-
File.delete("#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/11.11/buildr-resolver-11.11.jar")
|
76
|
+
if File.exists?( "#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/buildr-resolver/11.11/buildr-resolver-11.11.jar" )
|
77
|
+
File.delete("#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/buildr-resolver/11.11/buildr-resolver-11.11.jar")
|
78
78
|
end
|
79
79
|
|
80
80
|
Buildr::Resolver.resolve( ['ch.qos.logback:logback-classic:jar:0.9.24'] )
|
81
81
|
Buildr::Resolver.write_pom( "buildr-resolver:buildr-resolver:jar:45.45", "tmp/pom.xml" )
|
82
|
-
Buildr::Resolver.
|
83
|
-
File.exists?( "#{Buildr::Resolver.naether.local_repo_path}/buildr-resolver/11.11/buildr-resolver-11.11.jar" )
|
82
|
+
Buildr::Resolver.install( "buildr-resolver:buildr-resolver:jar:11.11", "tmp/pom.xml", Naether::Bootstrap.naether_jar )
|
83
|
+
File.exists?( "#{Buildr::Resolver.naether.local_repo_path}/buildr-resolver/buildr-resolver/11.11/buildr-resolver-11.11.jar" ).should be_true
|
84
|
+
File.exists?( "#{Buildr::Resolver.naether.local_repo_path}/buildr-resolver/buildr-resolver/11.11/buildr-resolver-11.11.pom" ).should be_true
|
84
85
|
end
|
85
86
|
end
|
86
87
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: buildr-resolver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Michael Guymon
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-12-08 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: 0.5.2
|
24
24
|
requirement: *id001
|
25
25
|
prerelease: false
|
26
26
|
type: :runtime
|