naether 0.3.3-java → 0.3.4-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/naether.rb +24 -5
  3. data/naether-0.3.1.jar +0 -0
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
data/lib/naether.rb CHANGED
@@ -89,7 +89,7 @@ class Naether
89
89
  @resolver.addDependency( notation, scope )
90
90
  end
91
91
 
92
- # Add a dependency
92
+ # Add a dependency Java object
93
93
  def add_dependency( dependency )
94
94
  #@resolver.addDependency( dependency )
95
95
  if Naether.platform == 'java'
@@ -140,11 +140,12 @@ class Naether
140
140
  dependenciesNotation
141
141
  end
142
142
 
143
+ # Deploy artifact to remote repo url
143
144
  def deploy_artifact( notation, file_path, url, opts = {} )
144
145
  if Naether.platform == 'java'
145
- @instance = com.slackworks.naether.DeployArtifact.new
146
+ @instance = com.slackworks.naether.deploy.DeployArtifact.new
146
147
  else
147
- deployArtifactClass = Rjb::import('com.slackworks.naether.DeployArtifact')
148
+ deployArtifactClass = Rjb::import('com.slackworks.naether.deploy.DeployArtifact')
148
149
  @instance = deployArtifactClass.new
149
150
  end
150
151
 
@@ -162,15 +163,33 @@ class Naether
162
163
  @resolver.deployArtifact(@instance)
163
164
  end
164
165
 
166
+ # Install artifact to local repo
167
+ def install_artifact( notation, file_path, opts = {} )
168
+ if Naether.platform == 'java'
169
+ @instance = com.slackworks.naether.deploy.DeployArtifact.new
170
+ else
171
+ deployArtifactClass = Rjb::import('com.slackworks.naether.deploy.DeployArtifact')
172
+ @instance = deployArtifactClass.new
173
+ end
174
+
175
+ @instance.setNotation( notation )
176
+ @instance.setFilePath( file_path )
177
+ if opts[:pom_path]
178
+ @instance.setPomPath( opts[:pom_path] )
179
+ end
180
+
181
+ @resolver.installArtifact(@instance)
182
+ end
183
+
165
184
  # filePath to write the pom
166
185
  # notation of the pom, groupId:artifactId:type:version
167
186
  #
168
187
  # loads all resolved dependencies into pom
169
188
  def write_pom( notation, file_path )
170
189
  if Naether.platform == 'java'
171
- @project_instance = com.slackworks.naether.MavenProject.new
190
+ @project_instance = com.slackworks.naether.maven.Project.new
172
191
  else
173
- projectClass = Rjb::import('com.slackworks.naether.MavenProject')
192
+ projectClass = Rjb::import('com.slackworks.naether.maven.Project')
174
193
  @project_instance = projectClass.new
175
194
  end
176
195
 
data/naether-0.3.1.jar CHANGED
Binary file
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: naether
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.3
5
+ version: 0.3.4
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-03-14 00:00:00 -04:00
13
+ date: 2011-03-30 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -18,9 +18,9 @@ dependencies:
18
18
  version_requirements: &id001 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
- - - ~>
21
+ - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.1
23
+ version: 2.1.0
24
24
  requirement: *id001
25
25
  prerelease: false
26
26
  type: :development