naether 0.11.1 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +48 -16
- data/README.md +4 -2
- data/VERSION +1 -1
- data/core-0.12.0.jar +0 -0
- data/jar_dependencies.yml +2 -1
- data/lib/naether/java/ruby.rb +9 -1
- data/lib/naether/maven.rb +24 -9
- data/pom.xml +37 -3
- metadata +4 -4
- data/core-0.11.1.jar +0 -0
data/Gemfile.lock
CHANGED
@@ -1,28 +1,60 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
addressable (2.3.5)
|
5
|
+
builder (3.2.2)
|
6
|
+
diff-lcs (1.2.4)
|
7
|
+
faraday (0.8.8)
|
8
|
+
multipart-post (~> 1.2.0)
|
9
|
+
git (1.2.6)
|
10
|
+
github_api (0.10.1)
|
11
|
+
addressable
|
12
|
+
faraday (~> 0.8.1)
|
13
|
+
hashie (>= 1.2)
|
14
|
+
multi_json (~> 1.4)
|
15
|
+
nokogiri (~> 1.5.2)
|
16
|
+
oauth2
|
17
|
+
hashie (2.0.5)
|
18
|
+
highline (1.6.19)
|
19
|
+
httpauth (0.2.0)
|
20
|
+
jeweler (1.8.7)
|
21
|
+
builder
|
7
22
|
bundler (~> 1.0)
|
8
23
|
git (>= 1.2.5)
|
24
|
+
github_api (= 0.10.1)
|
25
|
+
highline (>= 1.6.15)
|
26
|
+
nokogiri (= 1.5.10)
|
9
27
|
rake
|
10
28
|
rdoc
|
11
|
-
json (1.
|
12
|
-
|
13
|
-
|
14
|
-
|
29
|
+
json (1.8.0)
|
30
|
+
jwt (0.1.8)
|
31
|
+
multi_json (>= 1.5)
|
32
|
+
kramdown (1.2.0)
|
33
|
+
multi_json (1.8.0)
|
34
|
+
multi_xml (0.5.5)
|
35
|
+
multipart-post (1.2.0)
|
36
|
+
nokogiri (1.5.10)
|
37
|
+
oauth2 (0.9.2)
|
38
|
+
faraday (~> 0.8)
|
39
|
+
httpauth (~> 0.2)
|
40
|
+
jwt (~> 0.1.4)
|
41
|
+
multi_json (~> 1.0)
|
42
|
+
multi_xml (~> 0.5)
|
43
|
+
rack (~> 1.2)
|
44
|
+
rack (1.5.2)
|
45
|
+
rake (10.1.0)
|
46
|
+
rdoc (4.0.1)
|
15
47
|
json (~> 1.4)
|
16
48
|
rjb (1.4.8)
|
17
|
-
rspec (2.
|
18
|
-
rspec-core (~> 2.
|
19
|
-
rspec-expectations (~> 2.
|
20
|
-
rspec-mocks (~> 2.
|
21
|
-
rspec-core (2.
|
22
|
-
rspec-expectations (2.
|
23
|
-
diff-lcs (
|
24
|
-
rspec-mocks (2.
|
25
|
-
yard (0.8.2
|
49
|
+
rspec (2.14.1)
|
50
|
+
rspec-core (~> 2.14.0)
|
51
|
+
rspec-expectations (~> 2.14.0)
|
52
|
+
rspec-mocks (~> 2.14.0)
|
53
|
+
rspec-core (2.14.5)
|
54
|
+
rspec-expectations (2.14.3)
|
55
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
56
|
+
rspec-mocks (2.14.3)
|
57
|
+
yard (0.8.7.2)
|
26
58
|
|
27
59
|
PLATFORMS
|
28
60
|
ruby
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Naether
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/mguymon/naether.png?branch=master)](https://travis-ci.org/mguymon/naether)
|
4
|
+
|
3
5
|
Naether is a Java Dependency Resolver using Maven's [Aether](https://github.com/sonatype/sonatype-aether)
|
4
6
|
that can be used by Ruby or Java.
|
5
7
|
|
@@ -11,7 +13,7 @@ that can be used by Ruby or Java.
|
|
11
13
|
|
12
14
|
### Ruby
|
13
15
|
|
14
|
-
JRuby
|
16
|
+
JRuby is natively supported. Vanilla Ruby uses [Rjb](http://rjb.rubyforge.org) to proxy over JNI.
|
15
17
|
|
16
18
|
gem install naether
|
17
19
|
|
@@ -22,7 +24,7 @@ The jar dependencies for Naether will automatically be downloaded when the gem i
|
|
22
24
|
<dependency>
|
23
25
|
<groupId>com.tobedevoured.naether</groupId>
|
24
26
|
<artifactId>naether</artifactId>
|
25
|
-
<version>0.
|
27
|
+
<version>0.12.0</version>
|
26
28
|
</dependency>
|
27
29
|
|
28
30
|
May have to add the Sonatype Repo if the sync to Maven Central is slow.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.0
|
data/core-0.12.0.jar
ADDED
Binary file
|
data/jar_dependencies.yml
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
- com.jcraft:jsch:jar:0.1.44-1
|
6
6
|
- com.ning:async-http-client:jar:1.6.5
|
7
7
|
- commons-io:commons-io:jar:2.0.1
|
8
|
+
- org.apache.maven.shared:maven-invoker:jar:2.1.1
|
8
9
|
- org.apache.maven:maven-aether-provider:jar:3.0.3
|
9
10
|
- org.apache.maven:maven-model:jar:3.0.3
|
10
11
|
- org.apache.maven:maven-model-builder:jar:3.0.3
|
@@ -19,7 +20,7 @@
|
|
19
20
|
- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
|
20
21
|
- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-6
|
21
22
|
- org.codehaus.plexus:plexus-interpolation:jar:1.14
|
22
|
-
- org.codehaus.plexus:plexus-utils:jar:
|
23
|
+
- org.codehaus.plexus:plexus-utils:jar:3.0.8
|
23
24
|
- org.jsoup:jsoup:jar:1.6.1
|
24
25
|
- org.slf4j:slf4j-api:jar:1.6.6
|
25
26
|
- org.slf4j:jcl-over-slf4j:jar:1.6.6
|
data/lib/naether/java/ruby.rb
CHANGED
@@ -23,7 +23,15 @@ module Naether
|
|
23
23
|
|
24
24
|
# Call Rjb::load with an empty classpath, incase Rjb::load has already been called
|
25
25
|
java_opts = (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split
|
26
|
-
|
26
|
+
|
27
|
+
begin
|
28
|
+
Rjb::load("", java_opts)
|
29
|
+
rescue StandardError => e
|
30
|
+
if e.message == "can't create Java VM"
|
31
|
+
puts "RJB was unable to find JVM, try setting JAVA_HOME env"
|
32
|
+
end
|
33
|
+
raise e
|
34
|
+
end
|
27
35
|
|
28
36
|
@loaded_paths = []
|
29
37
|
load_paths( naether_jar )
|
data/lib/naether/maven.rb
CHANGED
@@ -82,17 +82,14 @@ module Naether
|
|
82
82
|
deps = @project.getDependenciesNotation( scopes )
|
83
83
|
end
|
84
84
|
|
85
|
+
elsif scopes
|
86
|
+
list = Naether::Java.convert_to_java_list( scopes )
|
87
|
+
|
88
|
+
deps = @project._invoke('getDependenciesNotation', 'Ljava.util.List;', list)
|
85
89
|
else
|
86
|
-
|
87
|
-
if scopes
|
88
|
-
list = Naether::Java.convert_to_java_list( scopes )
|
89
|
-
|
90
|
-
deps = @project._invoke('getDependenciesNotation', 'Ljava.util.List;', list)
|
91
|
-
else
|
92
|
-
deps = @project.getDependenciesNotation()
|
93
|
-
end
|
94
|
-
|
90
|
+
deps = @project.getDependenciesNotation()
|
95
91
|
end
|
92
|
+
|
96
93
|
|
97
94
|
Naether::Java.convert_to_ruby_array( deps, true )
|
98
95
|
end
|
@@ -148,5 +145,23 @@ module Naether
|
|
148
145
|
def write_pom( file_path )
|
149
146
|
@project.writePom( file_path )
|
150
147
|
end
|
148
|
+
|
149
|
+
def invoke( *opts )
|
150
|
+
#defaults
|
151
|
+
config = {
|
152
|
+
:maven_home => ENV['maven.home'] || '/usr/share/maven',
|
153
|
+
:local_repo => File.expand_path('~/.m2/repository')
|
154
|
+
}
|
155
|
+
|
156
|
+
if opts.last.is_a? Hash
|
157
|
+
config = defaults.merge( opts.pop )
|
158
|
+
end
|
159
|
+
goals = opts
|
160
|
+
|
161
|
+
pom = @project.getPomFile().getAbsolutePath()
|
162
|
+
|
163
|
+
invoker = Naether::Java.create("com.tobedevoured.naether.maven.Invoker", config[:local_repo], config[:maven_home] )
|
164
|
+
invoker.execute( pom, Naether::Java.convert_to_java_list(goals) )
|
165
|
+
end
|
151
166
|
end
|
152
167
|
end
|
data/pom.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<modelVersion>4.0.0</modelVersion>
|
4
4
|
<groupId>com.tobedevoured.naether</groupId>
|
5
5
|
<artifactId>core</artifactId>
|
6
|
-
<version>0.
|
6
|
+
<version>0.12.0</version>
|
7
7
|
<name>Naether</name>
|
8
8
|
<packaging>jar</packaging>
|
9
9
|
<url>https://github.com/mguymon/naether</url>
|
@@ -70,6 +70,13 @@
|
|
70
70
|
<version>${org.slf4j.version}</version>
|
71
71
|
</dependency>
|
72
72
|
|
73
|
+
<!-- Maven Invoker -->
|
74
|
+
<dependency>
|
75
|
+
<groupId>org.apache.maven.shared</groupId>
|
76
|
+
<artifactId>maven-invoker</artifactId>
|
77
|
+
<version>2.1.1</version>
|
78
|
+
</dependency>
|
79
|
+
|
73
80
|
<!-- Aeth -->
|
74
81
|
<dependency>
|
75
82
|
<groupId>org.sonatype.aether</groupId>
|
@@ -137,8 +144,14 @@
|
|
137
144
|
<!-- Testing -->
|
138
145
|
<dependency>
|
139
146
|
<groupId>junit</groupId>
|
140
|
-
<artifactId>junit</artifactId>
|
141
|
-
<version>4.
|
147
|
+
<artifactId>junit-dep</artifactId>
|
148
|
+
<version>4.11</version>
|
149
|
+
<scope>test</scope>
|
150
|
+
</dependency>
|
151
|
+
<dependency>
|
152
|
+
<groupId>org.hamcrest</groupId>
|
153
|
+
<artifactId>hamcrest-all</artifactId>
|
154
|
+
<version>1.3</version>
|
142
155
|
<scope>test</scope>
|
143
156
|
</dependency>
|
144
157
|
|
@@ -204,6 +217,27 @@
|
|
204
217
|
</execution>
|
205
218
|
</executions>
|
206
219
|
</plugin>
|
220
|
+
<plugin>
|
221
|
+
<groupId>org.apache.maven.plugins</groupId>
|
222
|
+
<artifactId>maven-dependency-plugin</artifactId>
|
223
|
+
<executions>
|
224
|
+
<execution>
|
225
|
+
<id>copy-dependencies</id>
|
226
|
+
<phase>package</phase>
|
227
|
+
<goals>
|
228
|
+
<goal>copy-dependencies</goal>
|
229
|
+
</goals>
|
230
|
+
<configuration>
|
231
|
+
<outputDirectory>target/dependencies</outputDirectory>
|
232
|
+
<overWriteReleases>false</overWriteReleases>
|
233
|
+
<overWriteSnapshots>false</overWriteSnapshots>
|
234
|
+
<overWriteIfNewer>true</overWriteIfNewer>
|
235
|
+
<stripVersion>true</stripVersion>
|
236
|
+
</configuration>
|
237
|
+
</execution>
|
238
|
+
</executions>
|
239
|
+
</plugin>
|
240
|
+
|
207
241
|
</plugins>
|
208
242
|
</build>
|
209
243
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naether
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rjb
|
@@ -186,7 +186,7 @@ files:
|
|
186
186
|
- README.md
|
187
187
|
- Rakefile
|
188
188
|
- VERSION
|
189
|
-
- core-0.
|
189
|
+
- core-0.12.0.jar
|
190
190
|
- jar_dependencies.yml
|
191
191
|
- lib/naether.rb
|
192
192
|
- lib/naether/bootstrap.rb
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
segments:
|
215
215
|
- 0
|
216
|
-
hash:
|
216
|
+
hash: 3696932954984177963
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
none: false
|
219
219
|
requirements:
|
data/core-0.11.1.jar
DELETED
Binary file
|