ruby-maven 3.3.12 → 3.9.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.mvn/extensions.xml +2 -3
- data/Mavenfile +18 -1
- data/README.md +13 -1
- data/bin/rmvn +2 -0
- data/lib/extensions/polyglot-common-0.7.1.jar +0 -0
- data/lib/extensions/polyglot-ruby-0.7.1.jar +0 -0
- data/lib/maven/ruby/version.rb +2 -1
- data/lib/ruby_maven.rb +29 -27
- data/ruby-maven.gemspec +4 -4
- data/spec/maven_ruby_maven_spec.rb +16 -8
- data/spec/ruby_maven_spec.rb +9 -12
- data/spec/setup.rb +2 -23
- metadata +22 -22
- data/spec/maven_ruby_maven_spec.rb~ +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 29154bba20759798d7b6a27da61ed17b2ad0118832134578061f4e9cf087854d
|
4
|
+
data.tar.gz: 8e6bf3f976a9adb958760d98f827ea5765a0e96b79463ee095fcffe863d11e05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3c94673e8166f355fdf547e8a580788cdb3ebf089c73493fa5d8ae5d2026191ee548c74a3958876c6e067aa0c0a367689b45f4cd29b7d0e5811b0f2d7cae642
|
7
|
+
data.tar.gz: 50557d2de2712a58916b40d48462ffd81e9b19ce21d8c5cffebc995cb8d5eee0f85b736d63a3207b67518444ab1722d72b66248938cd0713bfa9cff6f52300f8
|
data/.mvn/extensions.xml
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!-- from ruby-maven gem -->
|
3
2
|
<extensions>
|
4
3
|
<extension>
|
5
4
|
<groupId>org.torquebox.mojo</groupId>
|
6
5
|
<artifactId>mavengem-wagon</artifactId>
|
7
|
-
<version>0.
|
6
|
+
<version>1.0.3</version>
|
8
7
|
</extension>
|
9
8
|
<extension>
|
10
9
|
<groupId>io.takari.polyglot</groupId>
|
11
10
|
<artifactId>polyglot-ruby</artifactId>
|
12
|
-
<version>0.1
|
11
|
+
<version>0.7.1</version>
|
13
12
|
</extension>
|
14
13
|
</extensions>
|
data/Mavenfile
CHANGED
@@ -1,8 +1,25 @@
|
|
1
1
|
# -*- mode:ruby -*-
|
2
2
|
|
3
3
|
gemspec
|
4
|
+
properties 'push.skip': true, 'jruby.version': '9.3.1.0'
|
4
5
|
|
5
|
-
|
6
|
+
load File.join( basedir,'lib/maven/ruby/version.rb')
|
7
|
+
|
8
|
+
jar "io.takari.polyglot:polyglot-ruby:#{Maven::Ruby::POLYGLOT_VERSION}", scope: :provided
|
9
|
+
|
10
|
+
execute 'cleanup extensions', 'initialize' do |ctx|
|
11
|
+
FileUtils.rm_rf "#{ctx.project.build.directory}/../lib/extensions"
|
12
|
+
end
|
13
|
+
|
14
|
+
plugin :dependency do
|
15
|
+
|
16
|
+
execute_goal(:"copy-dependencies",
|
17
|
+
phase: 'prepare-package',
|
18
|
+
includeScope: :provided,
|
19
|
+
includeGroupIds: 'io.takari.polyglot',
|
20
|
+
outputDirectory: '${project.build.directory}/../lib/extensions')
|
21
|
+
|
22
|
+
end
|
6
23
|
|
7
24
|
profile :id => :release do
|
8
25
|
properties 'maven.test.skip' => true, 'invoker.skip' => true
|
data/README.md
CHANGED
@@ -56,7 +56,19 @@ other is closer to maven in its naming.
|
|
56
56
|
|
57
57
|
it is licensed under (EPL-1.0)[https://www.eclipse.org/legal/epl-v10.html]
|
58
58
|
|
59
|
-
##
|
59
|
+
## building ##
|
60
|
+
|
61
|
+
Prepare and pack the gem under ./pkg
|
62
|
+
```
|
63
|
+
./mvnw install
|
64
|
+
```
|
65
|
+
|
66
|
+
Push the gem to rubygems.org
|
67
|
+
```
|
68
|
+
./mvnw deploy -Prelease
|
69
|
+
```
|
70
|
+
|
71
|
+
## contributing ##
|
60
72
|
|
61
73
|
1. Fork it
|
62
74
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
data/bin/rmvn
CHANGED
Binary file
|
Binary file
|
data/lib/maven/ruby/version.rb
CHANGED
data/lib/ruby_maven.rb
CHANGED
@@ -20,9 +20,9 @@
|
|
20
20
|
#
|
21
21
|
require 'maven'
|
22
22
|
require 'maven/ruby/maven'
|
23
|
+
require 'maven/ruby/version'
|
23
24
|
|
24
25
|
module RubyMaven
|
25
|
-
POLYGLOT_VERSION = "0.1.15"
|
26
26
|
|
27
27
|
def self.exec( *args )
|
28
28
|
if File.exist?('settings.xml') and not args.member?('-s') and not args.member?('--settings')
|
@@ -30,13 +30,18 @@ module RubyMaven
|
|
30
30
|
args << 'settings.xml'
|
31
31
|
end
|
32
32
|
if args.member?('-version') or args.member?('--version') or args.member?('-v')
|
33
|
-
warn "Polyglot Maven Extension #{version}"
|
34
33
|
launch( '--version' )
|
35
34
|
elsif defined? Bundler
|
36
35
|
# it can be switching from ruby to jruby with invoking maven
|
37
36
|
# just keep it clean
|
38
|
-
Bundler.
|
39
|
-
|
37
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
38
|
+
Bundler.with_unbundled_env do
|
39
|
+
launch( *args )
|
40
|
+
end
|
41
|
+
else
|
42
|
+
Bundler.with_clean_env do
|
43
|
+
launch( *args )
|
44
|
+
end
|
40
45
|
end
|
41
46
|
else
|
42
47
|
launch( *args )
|
@@ -52,40 +57,37 @@ module RubyMaven
|
|
52
57
|
xml = File.read( File.join( dir, '.mvn/extensions.xml' ) )
|
53
58
|
xml.sub( /.*<version>/m, '' ).sub(/<\/version>.*/m, '' )
|
54
59
|
rescue Errno::ENOENT => e
|
55
|
-
|
60
|
+
Maven::Ruby::POLYGLOT_VERSION
|
56
61
|
end
|
57
|
-
POLYGLOT_VERSION.replace(polyglot_version) if polyglot_version
|
58
|
-
POLYGLOT_VERSION
|
59
62
|
end
|
60
63
|
|
61
64
|
def self.launch( *args )
|
65
|
+
if args.member?('--version') or args.member?('--show-version')
|
66
|
+
warn "Polyglot Maven Extension #{Maven::Ruby::POLYGLOT_VERSION} via ruby-maven #{Maven::Ruby::VERSION}"
|
67
|
+
end
|
62
68
|
old_maven_home = ENV['M2_HOME']
|
63
69
|
ENV['M2_HOME'] = Maven.home
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
70
|
+
ext_dir = File.join(Maven.lib, 'ext')
|
71
|
+
FileUtils.mkdir_p(ext_dir)
|
72
|
+
local_dir = File.join(__dir__, 'polyglot_jars')
|
73
|
+
Dir.new(local_dir).select do |file|
|
74
|
+
file =~ /.*\.jar$/
|
75
|
+
end.each do |jar|
|
76
|
+
source = File.join(local_dir, jar)
|
77
|
+
if jar =~ /polyglot-.*-#{Maven::Ruby::POLYGLOT_VERSION}.jar/
|
78
|
+
# ruby maven defines the polyglot version and this jar sets up its classpath
|
79
|
+
# i.e. on upgrade or downgrade the right version will be picked
|
80
|
+
FileUtils.cp(source, File.join(ext_dir, jar.sub(/-[0-9.]*(-SNAPSHOT)?.jar$/, '.jar')))
|
81
|
+
elsif not File.exists?(File.join(ext_dir, jar)) and not jar =~ /jruby-(core|stdlib).*/
|
82
|
+
# jar files are immutable as they carry the version
|
83
|
+
warn jar
|
84
|
+
FileUtils.cp(source, File.join(ext_dir, jar.sub(/-9.4.5.0/, '')))
|
85
|
+
end
|
71
86
|
end
|
72
|
-
FileUtils.cp( File.join( dir, extensions ), extensions ) rescue nil
|
73
|
-
|
74
|
-
# setup version
|
75
|
-
self.version
|
76
87
|
|
77
88
|
Maven.exec( *args )
|
78
89
|
|
79
90
|
ensure
|
80
91
|
ENV['M2_HOME'] = old_maven_home
|
81
|
-
|
82
|
-
FileUtils.rm_f( extensions )
|
83
|
-
if has_extensions
|
84
|
-
FileUtils.move( extensions + '.orig', extensions )
|
85
|
-
else
|
86
|
-
dir = File.dirname( extensions )
|
87
|
-
# delete empty .mvn directory
|
88
|
-
FileUtils.rm_rf( dir ) if Dir[File.join(dir, '*')].size == 0
|
89
|
-
end
|
90
92
|
end
|
91
93
|
end
|
data/ruby-maven.gemspec
CHANGED
@@ -11,9 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.summary = %q{maven support for ruby projects}
|
12
12
|
s.email = ["m.kristian@web.de"]
|
13
13
|
|
14
|
-
s.homepage = %q{https://github.com/
|
14
|
+
s.homepage = %q{https://github.com/jruby/ruby-maven}
|
15
15
|
|
16
|
-
s.license = 'EPL'
|
16
|
+
s.license = 'EPL-2.0'
|
17
17
|
|
18
18
|
s.executable = 'rmvn'
|
19
19
|
|
@@ -21,9 +21,9 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.rdoc_options = ["--main", "README.md"]
|
23
23
|
|
24
|
-
s.add_dependency 'ruby-maven-libs', "~> 3.
|
24
|
+
s.add_dependency 'ruby-maven-libs', "~> 3.9.9"
|
25
25
|
s.add_development_dependency 'minitest', '~> 5.3'
|
26
|
-
s.add_development_dependency 'rake', '~>
|
26
|
+
s.add_development_dependency 'rake', '~> 12.3'
|
27
27
|
end
|
28
28
|
|
29
29
|
# vim: syntax=Ruby
|
@@ -5,19 +5,23 @@ describe Maven::Ruby::Maven do
|
|
5
5
|
|
6
6
|
subject { Maven::Ruby::Maven.new }
|
7
7
|
|
8
|
+
let(:pkg) { File.expand_path("../pkg", __dir__) }
|
9
|
+
|
8
10
|
it 'shows mvn commandline with verbose flag' do
|
9
|
-
|
11
|
+
out, _ = capture_subprocess_io do
|
10
12
|
subject.exec( '-Dverbose', 'validate' )
|
11
13
|
end
|
12
14
|
subject.verbose = false
|
13
|
-
|
15
|
+
_(out).must_match /mvn -Dverbose validate/
|
14
16
|
end
|
15
17
|
|
16
18
|
it 'takes declared jruby version' do
|
17
19
|
begin
|
18
20
|
subject.inherit_jruby_version '9.0.4.0'
|
19
|
-
|
20
|
-
|
21
|
+
out, _ = capture_subprocess_io do
|
22
|
+
subject.exec( '-X', 'initialize')
|
23
|
+
end
|
24
|
+
_(out).must_match /resolve jruby for version 9.0.4.0/
|
21
25
|
ensure
|
22
26
|
subject['jruby.version'] = nil
|
23
27
|
end
|
@@ -26,14 +30,18 @@ describe Maven::Ruby::Maven do
|
|
26
30
|
if defined? JRUBY_VERSION
|
27
31
|
it 'inherits jruby version' do
|
28
32
|
subject.inherit_jruby_version
|
29
|
-
|
30
|
-
|
33
|
+
out, _ = capture_subprocess_io do
|
34
|
+
subject.exec( '-X', 'initialize')
|
35
|
+
end
|
36
|
+
_(out).must_match /resolve jruby for version #{JRUBY_VERSION}/
|
31
37
|
end
|
32
38
|
else
|
33
39
|
it 'takes default jruby version with inherit jruby version' do
|
34
40
|
subject.inherit_jruby_version
|
35
|
-
|
36
|
-
|
41
|
+
out, _ = capture_subprocess_io do
|
42
|
+
subject.exec( '-X', 'initialize')
|
43
|
+
end
|
44
|
+
_(out).must_match /resolve jruby for version 9.3.1.0/
|
37
45
|
end
|
38
46
|
end
|
39
47
|
end
|
data/spec/ruby_maven_spec.rb
CHANGED
@@ -7,32 +7,29 @@ describe RubyMaven do
|
|
7
7
|
|
8
8
|
it 'displays the version info' do
|
9
9
|
Dir.chdir 'spec' do
|
10
|
-
|
10
|
+
_, err = capture_io do
|
11
11
|
RubyMaven.exec( '--version' )
|
12
12
|
end
|
13
|
-
|
13
|
+
_(err).must_match /Polyglot Maven Extension 0.7/
|
14
14
|
xml = File.read('.mvn/extensions.xml')
|
15
|
-
xml.must_equal "dummy\n"
|
15
|
+
_(xml).must_equal "dummy\n"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
let :
|
19
|
+
let :gem_name do
|
20
20
|
v = Maven::Ruby::VERSION
|
21
21
|
v += '-SNAPSHOT' if v =~ /[a-zA-Z]/
|
22
22
|
"pkg/ruby-maven-#{v}.gem"
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'pack the gem' do
|
26
|
-
FileUtils.rm_f
|
27
|
-
|
26
|
+
FileUtils.rm_f gem_name
|
27
|
+
out, _ = capture_subprocess_io do
|
28
28
|
# need newer jruby version
|
29
|
-
RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=
|
29
|
+
RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' )
|
30
30
|
end
|
31
|
-
|
32
|
-
|
33
|
-
File.exists?( gem ).must_equal true
|
34
|
-
File.exists?( '.mvn/extensions.xml' ).must_equal true
|
35
|
-
File.exists?( '.mvn/extensions.xml.orig' ).wont_equal true
|
31
|
+
_(out).must_match /mvn -Dverbose package/
|
32
|
+
_(File.exist?( gem_name )).must_equal true
|
36
33
|
end
|
37
34
|
|
38
35
|
end
|
data/spec/setup.rb
CHANGED
@@ -1,26 +1,5 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path( '../../lib', __FILE__ )
|
2
|
-
begin
|
3
|
-
require 'minitest'
|
4
|
-
rescue LoadError
|
5
|
-
end
|
6
|
-
require 'minitest/autorun'
|
7
|
-
|
8
2
|
|
9
|
-
|
3
|
+
ENV["MT_NO_PLUGINS"] = "true"
|
10
4
|
|
11
|
-
|
12
|
-
out = $stdout
|
13
|
-
err = $stderr
|
14
|
-
@result = StringIO.new
|
15
|
-
$stdout = @result
|
16
|
-
$stderr = @result
|
17
|
-
yield
|
18
|
-
ensure
|
19
|
-
$stdout = out
|
20
|
-
$stderr = err
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.result
|
24
|
-
@result.string
|
25
|
-
end
|
26
|
-
end
|
5
|
+
require 'minitest/autorun'
|
metadata
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-maven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Meier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - ~>
|
16
|
+
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 3.
|
18
|
+
version: 3.9.9
|
19
19
|
name: ruby-maven-libs
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.9.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- - ~>
|
30
|
+
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5.3'
|
33
33
|
name: minitest
|
@@ -35,23 +35,23 @@ dependencies:
|
|
35
35
|
type: :development
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '5.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - ~>
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '12.3'
|
47
47
|
name: rake
|
48
48
|
prerelease: false
|
49
49
|
type: :development
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '12.3'
|
55
55
|
description: maven support for ruby DSL pom files. MRI needs java/javac installed.
|
56
56
|
email:
|
57
57
|
- m.kristian@web.de
|
@@ -60,12 +60,14 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- .mvn/extensions.xml
|
63
|
+
- ".mvn/extensions.xml"
|
64
64
|
- Gemfile
|
65
65
|
- Mavenfile
|
66
66
|
- README.md
|
67
67
|
- Rakefile
|
68
68
|
- bin/rmvn
|
69
|
+
- lib/extensions/polyglot-common-0.7.1.jar
|
70
|
+
- lib/extensions/polyglot-ruby-0.7.1.jar
|
69
71
|
- lib/maven/ruby.rb
|
70
72
|
- lib/maven/ruby/maven.rb
|
71
73
|
- lib/maven/ruby/tasks.rb
|
@@ -74,32 +76,30 @@ files:
|
|
74
76
|
- lib/ruby_maven.rb
|
75
77
|
- ruby-maven.gemspec
|
76
78
|
- spec/maven_ruby_maven_spec.rb
|
77
|
-
- spec/maven_ruby_maven_spec.rb~
|
78
79
|
- spec/ruby_maven_spec.rb
|
79
80
|
- spec/setup.rb
|
80
|
-
homepage: https://github.com/
|
81
|
+
homepage: https://github.com/jruby/ruby-maven
|
81
82
|
licenses:
|
82
|
-
- EPL
|
83
|
+
- EPL-2.0
|
83
84
|
metadata: {}
|
84
85
|
post_install_message:
|
85
86
|
rdoc_options:
|
86
|
-
- --main
|
87
|
+
- "--main"
|
87
88
|
- README.md
|
88
89
|
require_paths:
|
89
90
|
- lib
|
90
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
92
|
requirements:
|
92
|
-
- -
|
93
|
+
- - ">="
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
97
|
requirements:
|
97
|
-
- -
|
98
|
+
- - ">"
|
98
99
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
100
|
+
version: 1.3.1
|
100
101
|
requirements: []
|
101
|
-
|
102
|
-
rubygems_version: 2.4.8
|
102
|
+
rubygems_version: 3.2.29
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: maven support for ruby projects
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require_relative 'setup'
|
2
|
-
require 'ruby_maven'
|
3
|
-
require 'stringio'
|
4
|
-
require 'maven/ruby/version'
|
5
|
-
|
6
|
-
module CatchStdout
|
7
|
-
|
8
|
-
def self.exec
|
9
|
-
out = $stdout
|
10
|
-
err = $stderr
|
11
|
-
@result = StringIO.new
|
12
|
-
$stdout = @result
|
13
|
-
$stderr = @result
|
14
|
-
yield
|
15
|
-
ensure
|
16
|
-
$stdout = out
|
17
|
-
$stderr = err
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.result
|
21
|
-
@result.string
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe RubyMaven do
|
26
|
-
|
27
|
-
it 'displays the version info' do
|
28
|
-
Dir.chdir 'spec' do
|
29
|
-
CatchStdout.exec do
|
30
|
-
RubyMaven.exec( '--version' )
|
31
|
-
end
|
32
|
-
CatchStdout.result.must_match /Polyglot Maven Extension 0.1.15/
|
33
|
-
xml = File.read('.mvn/extensions.xml')
|
34
|
-
xml.must_equal "dummy\n"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
let :gem do
|
39
|
-
v = Maven::Ruby::VERSION
|
40
|
-
v += '-SNAPSHOT' if v =~ /[a-zA-Z]/
|
41
|
-
"pkg/ruby-maven-#{v}.gem"
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'pack the gem' do
|
45
|
-
FileUtils.rm_f gem
|
46
|
-
CatchStdout.exec do
|
47
|
-
RubyMaven.exec( '-Dverbose', 'package' )
|
48
|
-
end
|
49
|
-
CatchStdout.result.must_match /mvn -Dverbose package/
|
50
|
-
File.exists?( gem ).must_equal true
|
51
|
-
File.exists?( '.mvn/extensions.xml' ).must_equal true
|
52
|
-
File.exists?( '.mvn/extensions.xml.orig' ).wont_equal true
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|