Author: tomekr
Date: Wed Mar 18 21:35:42 2015
New Revision: 1667624
URL: http://svn.apache.org/r1667624
Log:
sling-s3: display Maven progress; fixed testing local deps
Modified:
sling/trunk/contrib/sling-s3/scripts/download_dependencies.rb
Modified: sling/trunk/contrib/sling-s3/scripts/download_dependencies.rb
URL:
http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/scripts/download_dependencies.rb?rev=1667624&r1=1667623&r2=1667624&view=diff
==============================================================================
--- sling/trunk/contrib/sling-s3/scripts/download_dependencies.rb (original)
+++ sling/trunk/contrib/sling-s3/scripts/download_dependencies.rb Wed Mar 18
21:35:42 2015
@@ -4,16 +4,23 @@ DEP_PLUGIN = 'org.apache.maven.plugins:m
SNAPSHOT_REPO = 'https://repository.apache.org/content/repositories/snapshots'
LOCAL_REPO = '~/.m2/repository'
+def run cmd
+ output = ""
+ IO.popen(cmd).each do |line|
+ puts line.chomp
+ output += line
+ end
+ output
+end
+
def download groupId, artifactId, version
puts "#{groupId}:#{artifactId}:#{version}"
- local = "#{LOCAL_REPO}/#{groupId.gsub('.', '/')}/#{artifactId}/#{version}"
+ local = "#{LOCAL_REPO}/#{groupId.gsub('.',
'/')}/#{artifactId}/#{version}/#{artifactId}-#{version}.jar"
if File.exists?(File.expand_path(local))
puts "(/) Already installed"
return
end
- result = `mvn #{DEP_PLUGIN}\
- -DremoteRepositories=#{SNAPSHOT_REPO}\
- -Dartifact=#{groupId}:#{artifactId}:#{version}`
+ result = run "mvn #{DEP_PLUGIN} -DremoteRepositories=#{SNAPSHOT_REPO}
-Dartifact=#{groupId}:#{artifactId}:#{version} -Dtransitive=false"
if result.include? 'BUILD SUCCESS'
puts "(/) Downloaded"
else