naether 0.5.1-java → 0.5.2-java
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/naether.rb +6 -19
- data/lib/naether/bootstrap.rb +1 -1
- data/lib/naether/java.rb +9 -14
- data/naether-0.5.2.jar +0 -0
- data/pom.xml +23 -22
- metadata +3 -3
- data/naether-0.5.1.jar +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/lib/naether.rb
CHANGED
@@ -12,7 +12,7 @@ class Naether
|
|
12
12
|
|
13
13
|
# Naether jar path will default to packaged in the gem
|
14
14
|
JAR_LIB = "#{File.dirname(__FILE__)}/.."
|
15
|
-
JAR_PATH = "#{JAR_LIB}/naether-0.5.
|
15
|
+
JAR_PATH = "#{JAR_LIB}/naether-0.5.2.jar" #XXX: hardcoded, should be based on VERSION file
|
16
16
|
|
17
17
|
class << self
|
18
18
|
|
@@ -208,26 +208,13 @@ class Naether
|
|
208
208
|
@resolver.deployArtifact(@instance)
|
209
209
|
end
|
210
210
|
|
211
|
-
# Install artifact to local repo
|
212
|
-
def
|
213
|
-
|
214
|
-
@instance = com.slackworks.naether.deploy.DeployArtifact.new
|
215
|
-
else
|
216
|
-
deployArtifactClass = Rjb::import('com.slackworks.naether.deploy.DeployArtifact')
|
217
|
-
@instance = deployArtifactClass.new
|
218
|
-
end
|
219
|
-
|
220
|
-
@instance.setNotation( notation )
|
221
|
-
@instance.setFilePath( file_path )
|
222
|
-
if opts[:pom_path]
|
223
|
-
@instance.setPomPath( opts[:pom_path] )
|
224
|
-
end
|
225
|
-
|
226
|
-
@resolver.installArtifact(@instance)
|
211
|
+
# Install artifact or pom to local repo, must specify pom_path and/or jar_path
|
212
|
+
def install( notation, pom_path =nil, jar_path = nil )
|
213
|
+
@resolver.install(notation, pom_path, jar_path)
|
227
214
|
end
|
228
215
|
|
229
216
|
def load_pom( file_path )
|
230
|
-
@project_instance = Naether::Java.
|
217
|
+
@project_instance = Naether::Java.create("com.slackworks.naether.maven.Project", file_path )
|
231
218
|
end
|
232
219
|
|
233
220
|
def pom_dependencies( file_path=nil, scopes = nil)
|
@@ -264,7 +251,7 @@ class Naether
|
|
264
251
|
#
|
265
252
|
# loads all resolved dependencies into pom
|
266
253
|
def write_pom( notation, file_path )
|
267
|
-
@project_instance = Naether::Java.
|
254
|
+
@project_instance = Naether::Java.create("com.slackworks.naether.maven.Project")
|
268
255
|
@project_instance.setProjectNotation( notation )
|
269
256
|
|
270
257
|
dependencies().each do |notation|
|
data/lib/naether/bootstrap.rb
CHANGED
data/lib/naether/java.rb
CHANGED
@@ -45,19 +45,14 @@ class Naether
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
def self.
|
49
|
-
projectClass = nil
|
48
|
+
def self.create( java_class, *args )
|
50
49
|
if Naether.platform == 'java'
|
51
|
-
|
50
|
+
java_class = eval(java_class)
|
52
51
|
else
|
53
|
-
|
52
|
+
java_class = Rjb::import(java_class)
|
54
53
|
end
|
55
54
|
|
56
|
-
|
57
|
-
projectClass.new( path )
|
58
|
-
else
|
59
|
-
projectClass.new
|
60
|
-
end
|
55
|
+
java_class.new( *args )
|
61
56
|
end
|
62
57
|
|
63
58
|
def self.convert_to_ruby_array( java_array, to_string = false )
|
@@ -126,7 +121,7 @@ class Naether
|
|
126
121
|
end
|
127
122
|
|
128
123
|
def load_jars(jars)
|
129
|
-
|
124
|
+
loadable_jars = []
|
130
125
|
unless jars.is_a?( Array )
|
131
126
|
jars = [jars]
|
132
127
|
end
|
@@ -134,16 +129,16 @@ class Naether
|
|
134
129
|
jars.each do |jar|
|
135
130
|
expanded_jar = File.expand_path(jar)
|
136
131
|
if !@loaded_jars.include? expanded_jar
|
137
|
-
|
132
|
+
loadable_jars << expanded_jar
|
138
133
|
@loaded_jars << expanded_jar
|
139
134
|
end
|
140
135
|
end
|
141
136
|
|
142
|
-
unless
|
143
|
-
Rjb::add_jar(
|
137
|
+
unless loadable_jars.empty?
|
138
|
+
Rjb::add_jar( loadable_jars )
|
144
139
|
end
|
145
140
|
|
146
|
-
|
141
|
+
loadable_jars
|
147
142
|
end
|
148
143
|
end
|
149
144
|
end
|
data/naether-0.5.2.jar
ADDED
Binary file
|
data/pom.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<groupId>com.slackworks</groupId>
|
6
6
|
<artifactId>naether</artifactId>
|
7
|
-
<version>0.5.
|
7
|
+
<version>0.5.2</version>
|
8
8
|
<packaging>jar</packaging>
|
9
9
|
<name>naether</name>
|
10
10
|
<url>https://github.com/mguymon/naether</url>
|
@@ -125,27 +125,28 @@
|
|
125
125
|
</dependencies>
|
126
126
|
|
127
127
|
<build>
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
128
|
+
|
129
|
+
<plugins>
|
130
|
+
<plugin>
|
131
|
+
<groupId>org.apache.maven.plugins</groupId>
|
132
|
+
<artifactId>maven-dependency-plugin</artifactId>
|
133
|
+
<executions>
|
134
|
+
<execution>
|
135
|
+
<id>copy-dependencies</id>
|
136
|
+
<phase>package</phase>
|
137
|
+
<goals>
|
138
|
+
<goal>copy-dependencies</goal>
|
139
|
+
</goals>
|
140
|
+
<configuration>
|
141
|
+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
142
|
+
<overWriteReleases>false</overWriteReleases>
|
143
|
+
<overWriteSnapshots>false</overWriteSnapshots>
|
144
|
+
<overWriteIfNewer>true</overWriteIfNewer>
|
145
|
+
</configuration>
|
146
|
+
</execution>
|
147
|
+
</executions>
|
148
|
+
</plugin>
|
149
|
+
</plugins>
|
149
150
|
</build>
|
150
151
|
|
151
152
|
<reporting>
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: naether
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.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: 2011-
|
13
|
+
date: 2011-12-08 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -74,7 +74,7 @@ files:
|
|
74
74
|
- lib/naether.rb
|
75
75
|
- lib/naether/bootstrap.rb
|
76
76
|
- lib/naether/java.rb
|
77
|
-
- naether-0.5.
|
77
|
+
- naether-0.5.2.jar
|
78
78
|
- pom.xml
|
79
79
|
has_rdoc: true
|
80
80
|
homepage: http://github.com/mguymon/naether
|
data/naether-0.5.1.jar
DELETED
Binary file
|