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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53d3a1840b8fef43b4e76b82926297649974c1bae2f490d2a63fcef44f844a38
4
- data.tar.gz: 16b5a979c554429d4bbaa76073bd67603ad5bae23ca0bd7ae527c2faa4ba7990
3
+ metadata.gz: 29154bba20759798d7b6a27da61ed17b2ad0118832134578061f4e9cf087854d
4
+ data.tar.gz: 8e6bf3f976a9adb958760d98f827ea5765a0e96b79463ee095fcffe863d11e05
5
5
  SHA512:
6
- metadata.gz: 25e8c568c422c76e94396c87293c5111466e26f9a6d323dee6d0af2bb5cb661e86ce54110a64a3f17f17d3455f579d1fa52b934aa853866bd16b73907c665915
7
- data.tar.gz: 30b95e0e2b5720e312d1a33e61f7d2aab6ee5e14fa7d5ce039f9d41c3b3ce5eeba7e9bb741826826223571cde285c3a6397547dbbfe9d92cf218aff8d0825b11
6
+ metadata.gz: c3c94673e8166f355fdf547e8a580788cdb3ebf089c73493fa5d8ae5d2026191ee548c74a3958876c6e067aa0c0a367689b45f4cd29b7d0e5811b0f2d7cae642
7
+ data.tar.gz: 50557d2de2712a58916b40d48462ffd81e9b19ce21d8c5cffebc995cb8d5eee0f85b736d63a3207b67518444ab1722d72b66248938cd0713bfa9cff6f52300f8
data/.mvn/extensions.xml CHANGED
@@ -8,6 +8,6 @@
8
8
  <extension>
9
9
  <groupId>io.takari.polyglot</groupId>
10
10
  <artifactId>polyglot-ruby</artifactId>
11
- <version>0.4.8</version>
11
+ <version>0.7.1</version>
12
12
  </extension>
13
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
- properties 'push.skip': true, 'jruby.version': '9.3.3.0'
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
- ## contributing #
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
@@ -1,5 +1,6 @@
1
1
  module Maven
2
2
  module Ruby
3
- VERSION = '3.3.13'.freeze
3
+ VERSION = '3.9.0.pre1'.freeze
4
+ POLYGLOT_VERSION = "0.7.1".freeze
4
5
  end
5
6
  end
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
- nil
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
- extensions = File.join( '.mvn/extensions.xml' )
72
- if has_extensions = File.exists?( extensions )
73
- # tests need copy instead of move
74
- FileUtils.cp( extensions, extensions + ".orig" )
75
- else
76
- FileUtils.mkdir_p( '.mvn' )
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.3.9"
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
@@ -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.4.8/
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.exists?( gem_name )).must_equal true
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.3.13
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: 2022-01-24 00:00:00.000000000 Z
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.3.9
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.3.9
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: '0'
100
+ version: 1.3.1
99
101
  requirements: []
100
102
  rubygems_version: 3.2.29
101
103
  signing_key: