ruby-maven 3.3.13 → 3.9.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.mvn/extensions.xml +1 -1
- data/Mavenfile +18 -1
- data/README.md +13 -1
- data/bin/rmvn +0 -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 +21 -25
- data/ruby-maven.gemspec +1 -1
- data/spec/ruby_maven_spec.rb +2 -4
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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
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
File without changes
|
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,7 +30,6 @@ 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
|
@@ -58,40 +57,37 @@ module RubyMaven
|
|
58
57
|
xml = File.read( File.join( dir, '.mvn/extensions.xml' ) )
|
59
58
|
xml.sub( /.*<version>/m, '' ).sub(/<\/version>.*/m, '' )
|
60
59
|
rescue Errno::ENOENT => e
|
61
|
-
|
60
|
+
Maven::Ruby::POLYGLOT_VERSION
|
62
61
|
end
|
63
|
-
POLYGLOT_VERSION.replace(polyglot_version) if polyglot_version
|
64
|
-
POLYGLOT_VERSION
|
65
62
|
end
|
66
63
|
|
67
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
|
68
68
|
old_maven_home = ENV['M2_HOME']
|
69
69
|
ENV['M2_HOME'] = Maven.home
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|
77
86
|
end
|
78
|
-
FileUtils.cp( File.join( dir, extensions ), extensions ) rescue nil
|
79
|
-
|
80
|
-
# setup version
|
81
|
-
self.version
|
82
87
|
|
83
88
|
Maven.exec( *args )
|
84
89
|
|
85
90
|
ensure
|
86
91
|
ENV['M2_HOME'] = old_maven_home
|
87
|
-
|
88
|
-
FileUtils.rm_f( extensions )
|
89
|
-
if has_extensions
|
90
|
-
FileUtils.move( extensions + '.orig', extensions )
|
91
|
-
else
|
92
|
-
dir = File.dirname( extensions )
|
93
|
-
# delete empty .mvn directory
|
94
|
-
FileUtils.rm_rf( dir ) if Dir[File.join(dir, '*')].size == 0
|
95
|
-
end
|
96
92
|
end
|
97
93
|
end
|
data/ruby-maven.gemspec
CHANGED
@@ -21,7 +21,7 @@ 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
26
|
s.add_development_dependency 'rake', '~> 12.3'
|
27
27
|
end
|
data/spec/ruby_maven_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe RubyMaven do
|
|
10
10
|
_, err = capture_io do
|
11
11
|
RubyMaven.exec( '--version' )
|
12
12
|
end
|
13
|
-
_(err).must_match /Polyglot Maven Extension 0.
|
13
|
+
_(err).must_match /Polyglot Maven Extension 0.7/
|
14
14
|
xml = File.read('.mvn/extensions.xml')
|
15
15
|
_(xml).must_equal "dummy\n"
|
16
16
|
end
|
@@ -29,9 +29,7 @@ describe RubyMaven do
|
|
29
29
|
RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' )
|
30
30
|
end
|
31
31
|
_(out).must_match /mvn -Dverbose package/
|
32
|
-
_(File.
|
33
|
-
_(File.exists?( '.mvn/extensions.xml' )).must_equal true
|
34
|
-
_(File.exists?( '.mvn/extensions.xml.orig' )).wont_equal true
|
32
|
+
_(File.exist?( gem_name )).must_equal true
|
35
33
|
end
|
36
34
|
|
37
35
|
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
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
|
@@ -23,7 +23,7 @@ dependencies:
|
|
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:
|
@@ -66,6 +66,8 @@ files:
|
|
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
|
@@ -93,9 +95,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
95
|
version: '0'
|
94
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
97
|
requirements:
|
96
|
-
- - "
|
98
|
+
- - ">"
|
97
99
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
100
|
+
version: 1.3.1
|
99
101
|
requirements: []
|
100
102
|
rubygems_version: 3.2.29
|
101
103
|
signing_key:
|