naether 0.8.1-java → 0.8.2-java

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -16,7 +16,7 @@ https://github.com/mguymon/naether
16
16
  <dependency>
17
17
  <groupId>com.slackworks</groupId>
18
18
  <artifactId>naether</artifactId>
19
- <version>0.8.0</version>
19
+ <version>0.8.2</version>
20
20
  </dependency>
21
21
 
22
22
  === About
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
data/lib/naether.rb CHANGED
@@ -259,6 +259,32 @@ class Naether
259
259
  end
260
260
 
261
261
  end
262
+
263
+ def download_artifacts( notations )
264
+ if( notations.is_a? String )
265
+ notations = [notations]
266
+ end
267
+
268
+ files = nil
269
+ if Naether.platform == 'java'
270
+ files = @resolver.downloadArtifacts( notations )
271
+ else
272
+ list = Rjb::import("java.util.ArrayList").new
273
+ notations.each do |notation|
274
+ list.add( notation )
275
+ end
276
+
277
+ files = @resolver._invoke('downloadArtifacts', 'Ljava.util.List;', list)
278
+ end
279
+
280
+ paths = []
281
+ Naether::Java.convert_to_ruby_array(files).each do |file|
282
+ paths << file.getAbsolutePath();
283
+ end
284
+
285
+ paths
286
+ end
287
+
262
288
 
263
289
  # Deploy artifact to remote repo url
264
290
  def deploy_artifact( notation, file_path, url, opts = {} )
@@ -333,8 +359,8 @@ class Naether
333
359
  @project_instance = Naether::Java.create("com.slackworks.naether.maven.Project")
334
360
  @project_instance.setProjectNotation( notation )
335
361
 
336
- dependencies().each do |notation|
337
- @project_instance.addDependency( notation )
362
+ dependencies().each do |dep|
363
+ @project_instance.addDependency( dep )
338
364
  end
339
365
 
340
366
  @project_instance.toXml()
@@ -164,8 +164,6 @@ class Naether
164
164
  if jar.size > 0
165
165
  jar = jar[0]
166
166
  @naether.install( dep, nil, jar )
167
- else
168
- puts "Could not find jar for #{dep}"
169
167
  end
170
168
 
171
169
  end
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <groupId>com.slackworks</groupId>
6
6
  <artifactId>naether</artifactId>
7
- <version>0.8.1</version>
7
+ <version>0.8.2</version>
8
8
  <packaging>jar</packaging>
9
9
  <name>naether</name>
10
10
  <url>https://github.com/mguymon/naether</url>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: naether
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.1
5
+ version: 0.8.2
6
6
  platform: java
7
7
  authors:
8
8
  - Michael Guymon
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-05-17 00:00:00 Z
13
+ date: 2012-08-25 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -73,7 +73,7 @@ files:
73
73
  - lib/naether.rb
74
74
  - lib/naether/bootstrap.rb
75
75
  - lib/naether/java.rb
76
- - naether-0.8.1.jar
76
+ - naether-0.8.2.jar
77
77
  - pom.xml
78
78
  homepage: http://github.com/mguymon/naether
79
79
  licenses:
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements: []
102
102
 
103
103
  rubyforge_project: naether
104
- rubygems_version: 1.8.15
104
+ rubygems_version: 1.8.24
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Java dependency resolver using Maven's Aether