ruby-maven 3.0.4.1.4 → 3.1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. data/bin/m2.conf +11 -7
  2. data/bin/rmvn +2 -2
  3. data/ext/ruby/maven-tools-0.33.0.jar +0 -0
  4. data/ext/ruby/tesla-polyglot-ruby-0.0.1-SNAPSHOT.jar +0 -0
  5. data/lib/tesla-polyglot-cli-0.0.1-SNAPSHOT.jar +0 -0
  6. data/lib/tesla-polyglot-common-0.0.1-SNAPSHOT.jar +0 -0
  7. data/{lib/ruby → ruby}/maven/ruby.rb +0 -0
  8. data/ruby/maven/ruby/maven.rb +199 -0
  9. data/ruby/maven/ruby/tasks.rb +75 -0
  10. data/ruby/maven/ruby/version.rb +6 -0
  11. data/{lib/ruby → ruby}/ruby-maven.rb +0 -0
  12. data/{lib/ruby → ruby}/ruby_maven.rb +0 -0
  13. data/ruby/tesla_maven.rb +56 -0
  14. metadata +42 -104
  15. data/LICENSE.txt +0 -202
  16. data/MIT-LICENSE +0 -20
  17. data/NOTICE.txt +0 -23
  18. data/README.txt +0 -77
  19. data/bin/mvn +0 -172
  20. data/bin/mvn.bat +0 -197
  21. data/bin/mvnDebug +0 -177
  22. data/bin/mvnDebug.bat +0 -200
  23. data/bin/mvnyjp +0 -193
  24. data/boot/plexus-classworlds-2.4.jar +0 -0
  25. data/conf/settings.xml +0 -257
  26. data/lib/aether-api-1.13.1.jar +0 -0
  27. data/lib/aether-connector-wagon-1.13.1.jar +0 -0
  28. data/lib/aether-impl-1.13.1.jar +0 -0
  29. data/lib/aether-spi-1.13.1.jar +0 -0
  30. data/lib/aether-util-1.13.1.jar +0 -0
  31. data/lib/commons-cli-1.2.jar +0 -0
  32. data/lib/ext/README.txt +0 -2
  33. data/lib/maven-aether-provider-3.0.4.jar +0 -0
  34. data/lib/maven-artifact-3.0.4.jar +0 -0
  35. data/lib/maven-compat-3.0.4.jar +0 -0
  36. data/lib/maven-core-3.0.4.jar +0 -0
  37. data/lib/maven-embedder-3.0.4.jar +0 -0
  38. data/lib/maven-model-3.0.4.jar +0 -0
  39. data/lib/maven-model-builder-3.0.4.jar +0 -0
  40. data/lib/maven-plugin-api-3.0.4.jar +0 -0
  41. data/lib/maven-repository-metadata-3.0.4.jar +0 -0
  42. data/lib/maven-settings-3.0.4.jar +0 -0
  43. data/lib/maven-settings-builder-3.0.4.jar +0 -0
  44. data/lib/plexus-cipher-1.7.jar +0 -0
  45. data/lib/plexus-component-annotations-1.5.5.jar +0 -0
  46. data/lib/plexus-interpolation-1.14.jar +0 -0
  47. data/lib/plexus-sec-dispatcher-1.3.jar +0 -0
  48. data/lib/plexus-utils-2.0.6.jar +0 -0
  49. data/lib/ruby/maven/cli.rb~ +0 -227
  50. data/lib/ruby/maven/cucumber_steps.rb~ +0 -134
  51. data/lib/ruby/maven/pom_magic.rb~ +0 -227
  52. data/lib/ruby/maven/ruby/Mavenfile +0 -7
  53. data/lib/ruby/maven/ruby/Mavenfile~ +0 -7
  54. data/lib/ruby/maven/ruby/cli.rb +0 -161
  55. data/lib/ruby/maven/ruby/cli.rb~ +0 -146
  56. data/lib/ruby/maven/ruby/maven.rb +0 -145
  57. data/lib/ruby/maven/ruby/maven.rb~ +0 -132
  58. data/lib/ruby/maven/ruby/pom_magic.rb +0 -132
  59. data/lib/ruby/maven/ruby/pom_magic.rb~ +0 -78
  60. data/lib/ruby/maven/ruby/version.rb +0 -32
  61. data/lib/ruby/maven/ruby/version.rb~ +0 -5
  62. data/lib/ruby/maven/ruby_cli.rb~ +0 -131
  63. data/lib/ruby/maven/ruby_maven.rb~ +0 -227
  64. data/lib/sisu-guava-0.9.9.jar +0 -0
  65. data/lib/sisu-guice-3.1.0-no_aop.jar +0 -0
  66. data/lib/sisu-inject-bean-2.3.0.jar +0 -0
  67. data/lib/sisu-inject-plexus-2.3.0.jar +0 -0
  68. data/lib/wagon-file-2.2.jar +0 -0
  69. data/lib/wagon-http-2.2-shaded.jar +0 -0
  70. data/lib/wagon-provider-api-2.2.jar +0 -0
@@ -1,132 +0,0 @@
1
- require 'fileutils'
2
- require 'java' if defined? JRUBY_VERSION
3
-
4
- module Maven
5
-
6
- class RubyMaven
7
-
8
- def self.new(*args)
9
- warn "deprecated: use Maven::Ruby::Cli or Maven::Ruby::Maven instead"
10
- ::Maven::Ruby::Cli.new(*args)
11
- end
12
- end
13
-
14
- module Ruby
15
- class Maven
16
-
17
- private
18
-
19
- def launch_jruby(args)
20
- java.lang.System.setProperty("classworlds.conf",
21
- File.join(self.class.maven_home, 'bin', "m2.conf"))
22
-
23
- java.lang.System.setProperty("maven.home", self.class.maven_home)
24
- # java.lang.System.setProperty("user.dir", Dir.pwd)
25
- p "Asd"
26
- p Dir.pwd
27
- p java.lang.System.getProperty("user.dir")
28
- cw = self.class.class_world
29
- Dir.chdir(Dir.pwd) do
30
- org.apache.maven.cli.MavenCli.doMain( args, cw ) == 0
31
- end
32
- end
33
-
34
- def self.class_world
35
- @class_world ||= class_world!
36
- end
37
-
38
- def self.class_world!
39
- (classpath_array + classpath_array('lib')).each do |path|
40
- require path
41
- end
42
- org.codehaus.plexus.classworlds.ClassWorld.new("plexus.core", java.lang.Thread.currentThread().getContextClassLoader())
43
- end
44
-
45
- def self.classpath_array(dir = 'boot')
46
- Dir.glob(File.join(maven_home, dir, "*jar"))
47
- end
48
-
49
- def launch_java(*args)
50
- system "java -cp #{self.class.classpath_array.join(':')} -Dmaven.home=#{File.expand_path(self.class.maven_home)} -Dclassworlds.conf=#{File.expand_path(File.join(self.class.maven_home, 'bin', 'm2.conf'))} org.codehaus.plexus.classworlds.launcher.Launcher #{args.join ' '}"
51
- end
52
-
53
- def options_string
54
- options_array.join ' '
55
- end
56
-
57
- def options_array
58
- options.collect do |k,v|
59
- if k =~ /^-D/
60
- v = "=#{v}" unless v.nil?
61
- "#{k}#{v}"
62
- else
63
- if v.nil?
64
- "#{k}"
65
- else
66
- ["#{k}", "#{v}"]
67
- end
68
- end
69
- end.flatten
70
- end
71
-
72
- public
73
-
74
- def self.class_world
75
- @class_world ||= class_world!
76
- end
77
-
78
- def self.maven_home
79
- @maven_home = File.expand_path(File.join(File.dirname(__FILE__),
80
- '..',
81
- '..',
82
- '..',
83
- '..'))
84
- end
85
-
86
- def options
87
- @options ||= {}
88
- end
89
-
90
- def verbose= v
91
- @verbose = v
92
- end
93
-
94
- def property(key, value = nil)
95
- options["-D#{key}"] = value
96
- end
97
-
98
- def verbose
99
- if @verbose.nil?
100
- @verbose = options.delete('-Dverbose').to_s == 'true'
101
- else
102
- @verbose
103
- end
104
- end
105
-
106
- def exec(*args)
107
- a = args.dup + options_array
108
- a.flatten!
109
- if verbose
110
- puts "PWD: #{File.expand_path('.')}"
111
- puts "mvn #{a.join(' ')}"
112
- end
113
- if defined? JRUBY_VERSION
114
- puts "using jruby #{JRUBY_VERSION}" if verbose
115
- launch_jruby(a)
116
- else
117
- puts "using java" if verbose
118
- launch_java(a)
119
- end
120
- end
121
-
122
- def exec_in(launchdirectory, *args)
123
- succeeded = nil
124
- Dir.chdir(launchdirectory) do
125
- succeeded = exec(args)
126
- end
127
- succeeded
128
- end
129
- end
130
- end
131
-
132
- end
@@ -1,132 +0,0 @@
1
- #
2
- # Copyright (C) 2013 Christian Meier
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
- # this software and associated documentation files (the "Software"), to deal in
6
- # the Software without restriction, including without limitation the rights to
7
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
- # the Software, and to permit persons to whom the Software is furnished to do so,
9
- # subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
- #
21
- require 'fileutils'
22
- require 'maven/tools/rails_project'
23
- require 'maven/ruby/version'
24
-
25
- module Maven
26
- module Ruby
27
- class PomMagic
28
-
29
- def initialize( default_pom = '.pom.xml' )
30
- @default_pom = default_pom
31
- end
32
-
33
- def dump_pom( dir = '.', force = false, file = 'pom.xml' )
34
- if force || !File.exists?( file )
35
- generate_pom( dir, '--pom', file )
36
- end
37
- end
38
-
39
- def generate_pom( dir = '.', *args )
40
- dir = File.expand_path( dir )
41
- Dir.chdir(dir) do
42
- skip_some_files = false
43
- if index = (args.index("-f") || args.index("--file"))
44
- filename = args[index + 1]
45
- if filename =~ /.gemspec$/
46
- skip_some_files = true
47
- proj = ::Maven::Tools::GemProject.new
48
- proj.load_gemspec(filename)
49
- elsif filename =~ /Gemfile/
50
- skip_some_files = true
51
- proj = ::Maven::Tools::GemProject.new
52
- proj.load_gemfile(filename)
53
- end
54
- else
55
- proj =
56
- if File.exists? File.join( 'config', 'application.rb' )
57
- ::Maven::Tools::RailsProject.new
58
- else
59
- ::Maven::Tools::GemProject.new
60
- end
61
- end
62
- if proj
63
-
64
- ensure_mavenfile( dir )
65
-
66
- load_standard_files( dir, proj, skip_some_files )
67
-
68
- pom_xml( dir, proj, args )
69
-
70
- end
71
- end
72
- end
73
-
74
- protected
75
-
76
- def load_standard_files( dir, proj, skip_some_files = false )
77
- gemspec = first_gemspec( dir ) unless skip_some_files
78
- proj.load_gemspec( gemspec ) if gemspec
79
- proj.load_gemfile( file( 'Gemfile', dir ) ) unless skip_some_files
80
- proj.load_jarfile( file( 'Jarfile', dir ) )
81
- proj.load_mavenfile( file( 'Mavenfile', dir ) )
82
- proj.add_defaults
83
- end
84
-
85
- def ensure_mavenfile( dir, source = File.dirname( __FILE__ ), filter_map = {} )
86
- mavenfile = File.join( dir, 'Mavenfile' )
87
- unless File.exists?( mavenfile )
88
- content = File.read( File.join( source, 'Mavenfile' ) )
89
- File.open( mavenfile, 'w' ) do |f|
90
- filter_map.each do |k,v|
91
- content.gsub!( /#{k}/, v )
92
- end
93
- f.puts content
94
- end
95
- warn "created Mavenfile with some locked down versions."
96
- end
97
- end
98
-
99
- def file( name, dir = '.' )
100
- File.expand_path( File.join( dir, name ) )
101
- end
102
-
103
- def pom_xml( dir, proj, args )
104
- dir ||= '.'
105
- #index = args.index( '-f' ) || args.index( '--file' )
106
- index = args.index( '--pom' )
107
- name = args[ index + 1 ] if index
108
- pom = File.join( dir, name || @default_pom )
109
- File.open(pom, 'w') do |f|
110
- f.puts proj.to_xml
111
- end
112
- f_index = args.index( '-f' ) || args.index( '--file' )
113
- if f_index
114
- args[ f_index + 1 ] = pom
115
- elsif index
116
- args[ index ] = '-f'
117
- else
118
- args += ['-f', pom]
119
- end
120
- args
121
- end
122
-
123
- def first_gemspec( dir = '.' )
124
- gemspecs = Dir[ File.join( dir, "*.gemspec" ) ]
125
- if gemspecs.size > 0
126
- File.expand_path( gemspecs[ 0 ] )
127
- end
128
- end
129
-
130
- end
131
- end
132
- end
@@ -1,78 +0,0 @@
1
- require 'fileutils'
2
- require 'maven/tools/rails_project'
3
-
4
- module Maven
5
- module Ruby
6
- class PomMagic
7
-
8
- def initialize(pom = '.pom.xml')
9
- @pom = pom
10
- end
11
-
12
- def new_rails_project
13
- ::Maven::Tools::RailsProject.new
14
- end
15
-
16
- def pom_xml(dir = '.')
17
- File.join(dir, @pom)
18
- end
19
-
20
- def generate_pom(dir = '.', *args)
21
- pom = nil
22
- FileUtils.cd(dir) do
23
- if index = (args.index("-f") || args.index("--file"))
24
- filename = args[index + 1]
25
- if filename =~ /.gemspec$/
26
- proj = ::Maven::Tools::GemProject.new
27
- proj.load_gemspec(filename)
28
- elsif filename =~ /Gemfile/
29
- proj = ::Maven::Tools::GemProject.new
30
- proj.load_gemfile(filename)
31
- end
32
- else
33
- gemfiles = Dir[File.join('.', "*Gemfile")]
34
- gemfiles.delete_if {|g| g =~ /.pom/}
35
- if gemfiles.size > 0
36
- proj =
37
- if File.exists? File.join( 'config', 'application.rb' )
38
- new_rails_project
39
- else
40
- ::Maven::Tools::GemProject.new
41
- end
42
- filename = gemfiles[0]
43
- proj.load_gemfile(filename)
44
- else
45
- p File.join(dir, "*.gemspec")
46
- gemspecs = Dir[File.join('.', "*.gemspec")]
47
- gemspecs.delete_if {|g| g =~ /.pom/}
48
- if gemspecs.size > 0
49
- proj = ::Maven::Tools::GemProject.new
50
- filename = File.basename(gemspecs[0])
51
- p filename
52
- p File.expand_path '.'
53
- p dir
54
- proj.load_gemspec(filename)
55
- end
56
- end
57
- end
58
- if proj
59
- proj.load_jarfile(File.join(File.dirname(filename), 'Jarfile'))
60
- proj.load_gemfile(File.join(File.dirname(filename), 'Mavenfile'))
61
- proj.add_defaults
62
- pom = pom_xml(dir)
63
- File.open(pom, 'w') do |f|
64
- f.puts proj.to_xml
65
- end
66
- end
67
- end
68
- pom
69
- end
70
-
71
- def dump_pom(dir = '.', force = false, file = 'pom.xml')
72
- if force || !File.exists?(file)
73
- FileUtils.cp(generate_pom(dir), file)
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,32 +0,0 @@
1
- #
2
- # Copyright (C) 2013 Christian Meier
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
- # this software and associated documentation files (the "Software"), to deal in
6
- # the Software without restriction, including without limitation the rights to
7
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
- # the Software, and to permit persons to whom the Software is furnished to do so,
9
- # subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
- #
21
- module Maven
22
- module Ruby
23
-
24
- VERSION = '3.0.4.1.4'
25
-
26
- # allow to overwrite the default from maven-tools
27
- # since jruby-maven-plugins depend on maven-tools and
28
- # default version in maven-tools is often behind
29
- JRUBY_MAVEN_PLUGINS_VERSION = '0.29.4'
30
-
31
- end
32
- end
@@ -1,5 +0,0 @@
1
- module Maven
2
- module Ruby
3
- VERSION = '3.0.4.1'
4
- end
5
- end
@@ -1,131 +0,0 @@
1
- require 'fileutils'
2
- require 'maven/tools/rails_project'
3
- require 'java' if defined? JRUBY_VERSION
4
-
5
- module Maven
6
- class RubyCli
7
-
8
- private
9
-
10
- # make the command line for the goals of the jruby-maven-plugins nicer
11
- PLUGINS = {
12
- :rake => [:rake],
13
- :jruby => [:jruby, :compile],
14
- :gem => [:package, :install, :push, :exec, :pom, :initialize, :irb],
15
- :rails3 => [:new, :generate, :rake, :server, :console, :dbconsole, :pom, :initialize],
16
- :cucumber => [:test],
17
- :rspec => [:test],
18
- :runit => [:test],
19
- :mini => [:test,:spec],
20
- :bundler => [:install, :update]
21
- }
22
- ALIASES = {
23
- :ruby => :jruby,
24
- :spec => :rspec,
25
- :rails => :rails3,
26
- :bundle => :bundler
27
- }
28
-
29
- def prepare(args)
30
- if args.size > 0
31
- name = args[0].to_sym
32
- name = ALIASES[name] || name
33
- if PLUGINS.member?(name)
34
- start = 1
35
- if args.size > 1
36
- if PLUGINS[name].member? args[1].to_sym
37
- goal = args[1].to_sym
38
- start = 2
39
- else
40
- goal = PLUGINS[name][0]
41
- end
42
- else
43
- goal = PLUGINS[name][0]
44
- end
45
- # determine the version and delete from args if given
46
- version = args.detect do |a|
47
- a =~ /^-Dplugin.version=/
48
- end
49
- version ||= options['-Dplugin.version']
50
-
51
- if version
52
- args.delete(version)
53
- version = ":" + version.sub(/^-Dplugin.version=/, '')
54
- end
55
- aa = if index = args.index("--")
56
- args[(index + 1)..-1]
57
- else
58
- []
59
- end
60
- ruby_args = (args[start, (index || 1000) - start] || []).join(' ')
61
-
62
- aa << "de.saumya.mojo:#{name}-maven-plugin#{version}:#{goal}"
63
- aa << "-Dargs=\"#{ruby_args}\"" if ruby_args.size > 0
64
- args.replace(aa)
65
- else
66
- args.delete("--")
67
- end
68
- end
69
- args
70
- end
71
-
72
- def log(args)
73
- log = File.join('log', 'rmvn.log')
74
- if File.exists? File.dirname(log)
75
- File.open(log, 'a') do |f|
76
- f.puts "#{$0.sub(/.*\//, '')} #{args.join ' '}"
77
- end
78
- end
79
- end
80
-
81
- def maybe_print_help(args)
82
- if args.size == 0 || args[0] == "--help"
83
- puts "usage: rmvn [<plugin-name> [<args>] [-- <maven-options>]] | [<maven-goal>|<maven-phase> <maven-options>] | --help"
84
- PLUGINS.each do |name, goals|
85
- puts
86
- print "plugin #{name}"
87
- print " - alias: #{ALIASES.invert[name]}" if ALIASES.invert[name]
88
- puts
89
- if goals.size > 1
90
- print "\tgoals : #{goals.join(',')}"
91
- puts
92
- end
93
- print "\tdefault goal: #{goals[0]}"
94
- puts
95
- end
96
- puts
97
- ["--help"]
98
- else
99
- args
100
- end
101
- end
102
-
103
- def command_line(args)
104
- args = prepare(args)
105
- args = maybe_print_help(args)
106
- args
107
- end
108
-
109
- def setup(*args)
110
- log(args)
111
- command_line(args.dup.flatten)
112
- end
113
-
114
- public
115
-
116
- attr_accessors :verbose
117
-
118
- def exec(*args)
119
- mvn = RubyMaven.new
120
- mvn.verbose = verbose
121
- mvn.exec(setup(args))
122
- end
123
-
124
- def exec_in(launchdirectory, *args)
125
- mvn = RubyMaven.new
126
- mvn.verbose = verbose
127
- mvn.exec(launchdirectory, setup(args))
128
- end
129
-
130
- end
131
- end