Skip to content

Commit cb0bc71

Browse files
authored
Merge pull request #635 from chadlwilson/jruby-10.1-compat
fix: ensure JRuby 10.1 compatibility
2 parents 5303473 + 7f11389 commit cb0bc71

6 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ jobs:
1717
strategy:
1818
matrix:
1919
java-version: [8, 21, 25]
20-
ruby-version: [jruby-9.4, jruby-10.0]
20+
ruby-version: [jruby-9.4, jruby-10.0, jruby-10.1]
2121
task: ['', integration]
2222
exclude:
23-
# JRuby 10 requires Java 21 minimum
24-
- ruby-version: jruby-10.0
23+
- ruby-version: jruby-10.0 # JRuby 10 requires Java 21 minimum
24+
java-version: 8
25+
- ruby-version: jruby-10.1 # JRuby 10 requires Java 21 minimum
2526
java-version: 8
2627

2728
fail-fast: false
@@ -50,7 +51,7 @@ jobs:
5051
run: gem uninstall -a jruby-launcher
5152

5253
- name: Install dependencies
53-
run: bundle install
54+
run: BUNDLE_JOBS=1 bundle install
5455

5556
- name: Run tests
5657
run: bundle exec rake ${{ matrix.task }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.1.1 (UNRELEASED)
22

3+
- #623: fix: ensure compatibility with JRuby 10.1
34
- #583: fix: Create config dir if it's missing for simpler usage
45
- #588: fix: NullPointerException during shutdown with executable war files
56
- #589: fix: Jetty wars don't have console logging enabled by default

Mavenfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#-*- mode: ruby -*-
2+
warn "ruby-maven is running fixed JRuby version #{JRUBY_VERSION}"
23

34
# tell the gem setup for maven where the java sources are
45
# and how to name the jar file (default path for the jar: ./lib )
@@ -53,5 +54,7 @@ plugin :invoker, '3.9.1' do
5354
},
5455
:goals => ['verify'],
5556
:projectsDirectory => 'integration',
57+
:pomIncludes => [ '*/pom.xml' ],
58+
:pomExcludes => Java::JavaLang::System.getProperty('jruby.version').start_with?('10.1') ? ['rails7_test/pom.xml'] : [],
5659
:streamLogs => true )
5760
end

Rakefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ mvn << "-Dbundler.version=#{Bundler::VERSION}"
2929
mvn << '--no-transfer-progress'
3030
mvn << '--color=always'
3131

32-
mvn.inherit_jruby_version
33-
3432
desc 'compile java sources and build jar'
3533
task :jar do
3634
success = mvn.prepare_package

spec/warbler/jbundler_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
require File.expand_path('../../spec_helper', __FILE__)
99

10-
describe Warbler::Jar, "with JBundler" do
10+
should_skip = "JBundler is deprecated and not supported on Ruby 4.0 / JRuby 10.1" if RUBY_VERSION.to_f >= 4.0 || false
11+
describe Warbler::Jar, "with JBundler", skip: should_skip do
1112
use_fresh_rake_application
1213
use_fresh_environment
1314
run_out_of_process_with_drb

warbler.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bundle up all of your application files for deployment to a Java environment.}
3232

3333
gem.add_runtime_dependency 'rake', ['~> 13.0', '>= 13.0.3']
3434
gem.add_runtime_dependency 'rexml', '~> 3.0'
35-
gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.1']
35+
gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.2']
3636
gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.7', '< 1.4']
3737
gem.add_runtime_dependency 'rubyzip', ['>= 2.1.0', '< 4']
3838
gem.add_runtime_dependency 'ostruct', '~> 0.6.2'

0 commit comments

Comments
 (0)