warbler 2.0.5 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fc866f8b7cede59880be0ac7014d368a7db6d756
4
- data.tar.gz: 5f6de19055a066bb60939c8b1aebea840f3a29f5
2
+ SHA256:
3
+ metadata.gz: 654aeb31bfaf47861744ade9017e48bc448eae6925aa63068d2d0078f22df415
4
+ data.tar.gz: 05e1441e228642e09368c8d9700088e4f150eb6fbe917e67f20aac6f6a53d39c
5
5
  SHA512:
6
- metadata.gz: dc98bb747bc17fde50404ccc478012cc7cc6504e21f91c6cd0aafe5cf636888a11749294314e75f24e4b8b5bba8cf64cb10f6cfcd7416509fabba29c2eb8b370
7
- data.tar.gz: f2aea739629165e65f214f0d7430601e1c5763a3ca6fe6d2058a3647e41d7fe97d7dbe0125b153afbd01a384f683390d4fa1adc246c5c56684ac10726fd9da25
6
+ metadata.gz: 3394f5ed88207814bfa6286c75f7d18e2796b541dae0adc35b061bee56b5ae704990ebeb4551b43404f5966b07ee393149b145885fee507eb5bef962a439ba32
7
+ data.tar.gz: 736165aadf9d3a4005a0c9317adc8227ca68f9980b5cb46f10cf3842ec440e70252ab15f1d24906d6b8b6dd1b2fb7fe49c7c4fdc40786a3ef9c3182ef69a74b1
data/Gemfile CHANGED
@@ -2,15 +2,13 @@ source "https://rubygems.org/"
2
2
 
3
3
  gemspec
4
4
 
5
- group :development do
6
- gem "jruby-openssl", :platform => :jruby
7
- gem "rcov", ">= 0.9.8", :platform => :mri_18
8
- gem "childprocess", :platform => :mri
9
- end
5
+ # override default maven-tools used by bundler
6
+ gem 'maven-tools', '1.2.3'
10
7
 
11
- gem 'rubyzip', ENV['RUBYZIP_VERSION'] if ENV['RUBYZIP_VERSION']
12
- gem 'rake', ENV['RAKE_VERSION'], :require => nil if ENV['RAKE_VERSION']
13
8
 
14
9
  group :development, :test do
15
- gem 'rdoc', ['>= 3.10', '< 4.3'], :require => nil
10
+ gem 'rdoc', ['>= 3.10', '< 7'], :require => nil
11
+
12
+ # force jruby-jars to use current JRuby version for testing
13
+ gem 'jruby-jars', '~> ' + JRUBY_VERSION.split('.')[0..1].join('.')
16
14
  end
data/History.txt CHANGED
@@ -1,3 +1,22 @@
1
+ == Unreleased
2
+
3
+ == 2.1.0
4
+
5
+ Requires JRuby >= 9.4 due to needing Ruby 3.0+ compatibility.
6
+
7
+ - #439: Include gem_build_complete_path in jar for RubyGems 2.5+ extension support
8
+ - #440: Don't overwrite user-specified `webserver.properties` file
9
+ - #513, #521: Fix issues with openstruct used for `config.webxml` values on JRuby 9.3+
10
+ - #527: Fix war file path as argument for Jetty runner on Jetty 9.4.32+
11
+ - #538: Put public folders inside public for executable war
12
+ - #552, #553: Use URI.open instead of open
13
+ - #557: Replace File.exists? with File.exist? for Ruby 3.2.0+ compatibility
14
+ - #559, 575: Fixes to update Warbler to modern libs and JRuby, removing old Bundler 1.x hacks
15
+ - #562: Fix problems with spaces in path names under windows
16
+ - #571: Use newer keyword argument rubyzip 3.0 API (drops support for JRuby 9.3)
17
+ - #575: Fix Gem path issues on JRuby 9.4.x
18
+ - #574: Bump default Jetty version for executables to 9.4.58.v20250814
19
+
1
20
  == 2.0.5
2
21
 
3
22
  - #427: Check Java properties when looking up RAILS_ENV
data/LICENSE.txt CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Warbler is provided under the terms of the MIT license.
4
4
 
5
+ Warbler (c) 2013-2018 The JRuby Team
5
6
  Warbler (c) 2010-2013 Engine Yard, Inc.
6
7
  Warbler (c) 2007-2009 Sun Microsystems, Inc.
7
8
 
data/Mavenfile CHANGED
@@ -5,9 +5,23 @@
5
5
  gemspec( :jar => 'warbler_jar.jar',
6
6
  :source => 'ext' )
7
7
 
8
- properties( 'jruby.plugins.version' => '1.1.5',
9
- 'jruby.version' => '9.1.6.0',
10
- 'jetty.version' => '9.2.10.v20150310' )
8
+ plugin_repository( :url => 'https://central.sonatype.com/repository/maven-snapshots/',
9
+ :id => 'central-snapshots' ) do
10
+ releases 'false'
11
+ snapshots 'true'
12
+ end
13
+ repository( :url => 'https://central.sonatype.com/repository/maven-snapshots/',
14
+ :id => 'central-snapshots' ) do
15
+ releases 'false'
16
+ snapshots 'true'
17
+ end
18
+
19
+ properties(
20
+ 'project.build.sourceEncoding' => 'UTF-8',
21
+ 'mavengem.wagon.version' => '2.0.2',
22
+ 'jruby.plugins.version' => '3.0.6',
23
+ 'jetty.version' => '9.4.58.v20250814',
24
+ )
11
25
 
12
26
  # dependencies needed for compilation
13
27
  scope :provided do
@@ -15,16 +29,26 @@ scope :provided do
15
29
  jar 'org.eclipse.jetty:jetty-webapp', '${jetty.version}'
16
30
  end
17
31
 
18
- plugin :compiler, '3.1', :source => '1.5', :target => '1.5'
32
+ plugin :clean, '3.5.0'
33
+ plugin :compiler, '3.14.1', :release => '8'
34
+ plugin :resources, '3.3.1'
35
+ plugin :jar, '3.4.2' do
36
+ execute_goals(:phase => 'none') # Avoid a duplicate execution with that defined by the :gemspec directive
37
+ end
38
+ plugin :install, '3.1.4'
39
+
40
+ gem 'bundler', '${bundler.version}'
41
+ gem 'jruby-jars', '${jruby.version}'
19
42
 
20
- plugin :invoker, '1.8' do
43
+ plugin :invoker, '3.9.1' do
21
44
  execute_goals( :install, :run,
22
45
  :id => 'integration-test',
23
46
  :properties => { 'warbler.version' => '${project.version}',
24
47
  'jruby.version' => '${jruby.version}',
25
48
  'jetty.version' => '${jetty.version}',
26
- 'bundler.version' => '1.12.5',
27
- 'jruby.plugins.version' => '${jruby.plugins.version}' },
49
+ 'bundler.version' => '${bundler.version}',
50
+ 'jruby.plugins.version' => '${jruby.plugins.version}',
51
+ 'style.color' => 'always' },
28
52
 
29
53
  :goals => ['verify'],
30
54
  :projectsDirectory => 'integration',
data/README.rdoc CHANGED
@@ -1,4 +1,5 @@
1
- = Warbler {<img src="https://badge.fury.io/rb/warbler.svg" alt="Gem Version" />}[http://badge.fury.io/rb/warbler] {<img src="https://travis-ci.org/jruby/warbler.png" />}[https://travis-ci.org/jruby/warbler]
1
+ = Warbler
2
+ {rdoc-image:https://badge.fury.io/rb/warbler.svg}[http://badge.fury.io/rb/warbler] {rdoc-image:https://github.com/jruby/warbler/actions/workflows/ci.yml/badge.svg}[https://github.com/jruby/warbler/actions/workflows/ci.yml]
2
3
 
3
4
  Warbler is a gem to make a Java jar or war file out of any Ruby, Rails or Rack
4
5
  application. Warbler provides a minimal, flexible, Ruby-like way to bundle up
@@ -7,7 +8,7 @@ all of your application files for deployment to a Java environment.
7
8
  Warbler provides a sane set of out-of-the box defaults that should allow most
8
9
  Ruby applications to assemble and Just Work.
9
10
 
10
- Version 2.x of Warbler supports versions of JRuby from 9.0.0.0 and up.
11
+ Version 2.x of Warbler supports versions of JRuby from 9.2.0.0 and up.
11
12
 
12
13
  Version 1.4.x of Warbler supports versions of JRuby up to 1.7.x. The {1.x-dev branch}[https://github.com/jruby/warbler/tree/1.x-dev] is the working code for this.
13
14
 
@@ -93,7 +94,7 @@ feature and creates a basic war with the sources included, make sure you run :
93
94
  or, if it's important that the war always be compiled, use the option above to
94
95
  put the feature in your <tt>config/warble.rb</tt>.
95
96
 
96
- == War or Jar?
97
+ == .war or .jar?
97
98
 
98
99
  War-based projects are for Rails, Merb, or Rack-based web applications.
99
100
  They usually contain a +config/environment.rb+ file, a +config/init.rb+ file,
@@ -108,7 +109,7 @@ in the <tt>lib</tt> directory. Warbler packages the application so that
108
109
 
109
110
  == Jar Files
110
111
 
111
- === Gem Specification (gemspec) Files
112
+ === Gem Specification Files
112
113
 
113
114
  If your project has a <tt>.gemspec</tt> file in the top directory, it will be
114
115
  used to configure the project's dependencies, launcher script, require paths,
@@ -155,7 +156,7 @@ The following items are set up for you:
155
156
  * Multi-thread-safe execution (as introduced in Rails 2.2) is detected and
156
157
  runtime pooling is disabled.
157
158
 
158
- === Other Rack-based applications
159
+ === Other Rack Applications
159
160
 
160
161
  If you have a +config.ru+ file in the top directory or one of the immediate
161
162
  subdirectories of your application, it will be included and used as the rackup
@@ -166,7 +167,7 @@ to manage your gems. <tt>ENV['RACK_ENV']</tt> will be set to +production+.
166
167
  See {the examples in the jruby-rack project}[http://github.com/jruby/jruby-rack/tree/master/examples/]
167
168
  of how to configure Warbler to package Camping and Sinatra apps.
168
169
 
169
- === Configuration auto-detect notes
170
+ === Configuration Notes
170
171
 
171
172
  * Warbler will load the +environment+ Rake task in a Rails application to try
172
173
  to detect some configuration. If you don't have database access in the
@@ -178,7 +179,7 @@ of how to configure Warbler to package Camping and Sinatra apps.
178
179
  <tt>Gem.loaded_specs</tt> is available, but the application needs to be
179
180
  loaded first before its contents are reliable.
180
181
 
181
- == Custom configuration
182
+ == Custom Configuration
182
183
 
183
184
  If the default settings are not appropriate for your application, you can
184
185
  customize Warbler's behavior. To customize files, libraries, and gems included
@@ -190,7 +191,7 @@ doing this. With the gem, simply run
190
191
  Finally, edit the +config/warble.rb+ to your taste. The generated file is
191
192
  fully-documented with the available options and default values.
192
193
 
193
- === War layout
194
+ === Archive Layout
194
195
 
195
196
  The default configuration puts application files (+app+, +config+, +lib+,
196
197
  +log+, +vendor+, +tmp+) under the .war file's +WEB-INF+ directory, and files in
@@ -198,7 +199,7 @@ The default configuration puts application files (+app+, +config+, +lib+,
198
199
  automatically be placed in +WEB-INF/lib+ for placement on the web app's
199
200
  class-path.
200
201
 
201
- === Web.xml
202
+ === web.xml
202
203
 
203
204
  Java web applications are configured mainly through this file, and Warbler
204
205
  creates a suitable default file for you for use. However, if you need to
@@ -219,7 +220,7 @@ customize it in any way, you have two options.
219
220
 
220
221
  For more information on configuration, see Warbler::Config.
221
222
 
222
- == Rakefile integration
223
+ == Rakefile Integration
223
224
 
224
225
  If you'd like to control Warbler from your own project's +Rakefile+,
225
226
  simply add the following code somewhere in the +Rakefile+ :
@@ -247,11 +248,10 @@ https://github.com/jruby/warbler/issues.
247
248
 
248
249
  You can get the Warbler source using Git, in any of the following ways:
249
250
 
250
- git clone git://git.caldersphere.net/warbler.git
251
251
  git clone git://github.com/jruby/warbler.git
252
252
 
253
253
  You can also download a tarball of Warbler source at
254
- https://github.com/jruby/warbler/tarball/master.
254
+ https://github.com/jruby/warbler/archive/master.zip.
255
255
 
256
256
  == Development
257
257
 
@@ -266,18 +266,15 @@ There are a few integration tests in the `integration` directory that build WAR
266
266
  with Warbler, and run some basic smoke tests against them. You can run these like so:
267
267
 
268
268
  cd integration
269
- export MAVEN_OPTS="-XX:MaxPermSize=128m"
270
269
  mvn verify
271
270
 
272
- The increased PermGen space is for the Rails4 test. And You'll need to have Maven 3.1.1 installed, of course:
273
- http://maven.apache.org/ Be aware the homebrew installs 3.0.5, which doesn't work (and I don't really know why).
274
-
271
+ You'll need to have Maven >= 3.1.1 installed, of course: http://maven.apache.org/
275
272
 
276
273
  == License
277
274
 
278
275
  Warbler is provided under the terms of the MIT license.
279
276
 
280
- Warbler (c) 2013-2015 The JRuby project
277
+ Warbler (c) 2013-2018 The JRuby Team
281
278
 
282
279
  Warbler (c) 2010-2012 Engine Yard, Inc.
283
280
 
data/Rakefile CHANGED
@@ -6,63 +6,55 @@
6
6
  # See the file LICENSE.txt for details.
7
7
  #++
8
8
 
9
- begin
10
- require 'bundler'
11
- rescue LoadError
12
- warn "\nPlease `gem install bundler' and run `bundle install' to ensure you have all dependencies.\n\n"
13
- else
14
- require 'bundler/gem_helper'
15
- Bundler::GemHelper.install_tasks :dir => File.dirname(__FILE__)
16
- end
9
+ require 'bundler/gem_helper'
10
+ Bundler::GemHelper.install_tasks :dir => File.dirname(__FILE__)
17
11
 
18
12
  require 'rake/clean'
19
- CLEAN << "pkg" << "doc" << Dir['integration/**/target']
20
-
21
- unless Rake::Application.method_defined? :last_comment
22
- Rake::Application.module_eval do
23
- alias_method :last_comment, :last_description
24
- end
25
- end # Rake 11 compatibility (due rspec/core/rake_task < 3.0)
13
+ CLEAN << "pkg" << "doc" << Dir['integration/**/target'] << "lib/warbler_jar.jar"
26
14
 
27
15
  require 'rspec/core/rake_task'
28
16
  RSpec::Core::RakeTask.new(:spec) do |t|
29
17
  t.rspec_opts = ['--color', "--format documentation"]
30
18
  end
31
19
 
20
+ task :spec => :jar
21
+
32
22
  task :default => :spec
33
23
 
34
24
  # use Mavenfile to define :jar task
35
25
  require 'maven/ruby/maven'
36
26
  mvn = Maven::Ruby::Maven.new
37
- if defined?(JRUBY_VERISON) && ! (JRUBY_VERSION =~ /^9.0/)
38
- mvn.inherit_jruby_version
39
- end
27
+ mvn << "-Djruby.version=#{JRUBY_VERSION}"
28
+ mvn << "-Dbundler.version=#{Bundler::VERSION}"
29
+ mvn << '--no-transfer-progress'
30
+ mvn << '--color=always'
31
+
32
+ mvn.inherit_jruby_version
40
33
 
41
34
  desc 'compile java sources and build jar'
42
35
  task :jar do
43
- mvn.prepare_package
36
+ success = mvn.prepare_package
37
+ exit(1) unless success
44
38
  end
45
39
 
46
40
  desc 'run some integration test'
47
- task :integration do
48
- mvn.verify
41
+ task :integration => :jar do
42
+ success = mvn.verify
43
+ exit(1) unless success
49
44
  end
50
45
 
51
46
  desc 'generate the pom.xml from the Mavenfile'
52
47
  task :pom do
53
- mvn.validate('-Dpolyglot.dump.pom=pom.xml')
48
+ success = mvn.validate('-Dpolyglot.dump.pom=pom.xml')
49
+ exit(1) unless success
54
50
  end
55
51
 
56
52
  # Make sure jar gets compiled before the gem is built
57
53
  task :build => :jar
58
54
 
59
- load_gemspec = lambda do
60
- Gem::Specification.load(File.expand_path('warbler.gemspec', File.dirname(__FILE__)))
61
- end
62
-
63
55
  require 'rdoc/task'
64
56
  RDoc::Task.new(:docs) do |rd|
65
- gemspec = load_gemspec.call
57
+ gemspec = Gem::Specification.load(File.expand_path('warbler.gemspec', File.dirname(__FILE__)))
66
58
  rd.rdoc_dir = "doc"
67
59
  rd.rdoc_files.include("README.rdoc", "History.txt", "LICENSE.txt")
68
60
  rd.rdoc_files += gemspec.require_paths
@@ -70,13 +62,4 @@ RDoc::Task.new(:docs) do |rd|
70
62
  rd.options += gemspec.rdoc_options
71
63
  end
72
64
 
73
- task :release_docs => :docs do
74
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml"))) rescue nil
75
- if config
76
- gemspec = load_gemspec.call
77
- dir = "/var/www/gforge-projects/#{gemspec.rubyforge_project}/#{gemspec.name}"
78
- dest = "#{config["username"]}@rubyforge.org:#{dir}"
79
- sh %{rsync -rl --delete doc/ #{dest}}
80
- end
81
- end
82
- task :release => :release_docs
65
+ task :release => :docs
data/ext/JarMain.java CHANGED
@@ -40,13 +40,20 @@ public class JarMain implements Runnable {
40
40
  JarMain(String[] args) {
41
41
  this.args = args;
42
42
  URL mainClass = getClass().getResource(MAIN);
43
+ URI uri;
44
+ File file;
45
+ String pathWithoutMain;
46
+
43
47
  try {
44
48
  this.path = mainClass.toURI().getSchemeSpecificPart();
49
+ pathWithoutMain = mainClass.toURI().getRawSchemeSpecificPart().replace("!" + MAIN, "");
50
+ uri = new URI(pathWithoutMain);
45
51
  }
46
52
  catch (URISyntaxException e) {
47
53
  throw new RuntimeException(e);
48
54
  }
49
- archive = this.path.replace("!" + MAIN, "").replace("file:", "");
55
+
56
+ archive = new File(uri.getPath()).getAbsolutePath();
50
57
 
51
58
  Runtime.getRuntime().addShutdownHook(new Thread(this));
52
59
  }
data/ext/WarMain.java CHANGED
@@ -67,6 +67,8 @@ public class WarMain extends JarMain {
67
67
  static final String WEBSERVER_PROPERTIES = "/WEB-INF/webserver.properties";
68
68
  static final String WEBSERVER_JAR = "/WEB-INF/webserver.jar";
69
69
  static final String WEBSERVER_CONFIG = "/WEB-INF/webserver.xml";
70
+ static final String WEB_INF = "WEB-INF";
71
+ static final String META_INF = "META-INF";
70
72
 
71
73
  /**
72
74
  * jruby arguments, consider the following command :
@@ -208,17 +210,20 @@ public class WarMain extends JarMain {
208
210
  @Override
209
211
  protected String getExtractEntryPath(final JarEntry entry) {
210
212
  final String name = entry.getName();
211
- final String start = "WEB-INF";
212
- if ( name.startsWith(start) ) {
213
+ final String res;
214
+ if ( name.startsWith(WEB_INF) ) {
213
215
  // WEB-INF/app/controllers/application_controller.rb ->
214
216
  // app/controllers/application_controller.rb
215
- return name.substring(start.length());
216
- }
217
- if ( name.indexOf('/') == -1 ) {
217
+ res = name.substring(WEB_INF.length());
218
+ } else if (name.startsWith(META_INF)) {
219
+ // Keep them where they are.
220
+ res = name;
221
+ } else {
218
222
  // 404.html -> public/404.html
219
- return "/public/" + name;
223
+ // javascripts -> public/javascripts
224
+ res = "/public/" + name;
220
225
  }
221
- return '/' + name;
226
+ return res;
222
227
  }
223
228
 
224
229
  @Override
data/lib/warbler/gems.rb CHANGED
@@ -52,8 +52,6 @@ module Warbler
52
52
  # Add a single gem to WEB-INF/gems
53
53
  def find_single_gem_files(gem_dependencies, gem_pattern, version = nil)
54
54
  gem_spec_class = Gem::Specification
55
- gem_spec_class = Gem::BasicSpecification if Gem.const_defined?(:BasicSpecification)
56
- # Gem::Specification < Gem::BasicSpecification (since RGs 2.1)
57
55
  case gem_pattern
58
56
  when gem_spec_class
59
57
  return BundlerHelper.to_spec(gem_pattern)
data/lib/warbler/jar.rb CHANGED
@@ -88,7 +88,7 @@ module Warbler
88
88
  private :jrubyc_options
89
89
 
90
90
  def java_version(config)
91
- config.bytecode_version ? "-Djava.specification.version=#{config.bytecode_version}" : ''
91
+ config.bytecode_version ? "-Djruby.bytecode.version=#{config.bytecode_version}" : ''
92
92
  end
93
93
 
94
94
  def replace_compiled_ruby_files(config, compiled_ruby_files)
@@ -234,6 +234,11 @@ module Warbler
234
234
  next if config.gem_excludes && config.gem_excludes.any? {|rx| f =~ rx }
235
235
  @files[apply_pathmaps(config, File.join(spec.full_name, f), :gems)] = src
236
236
  end
237
+ if File.exist?(spec.gem_build_complete_path)
238
+ base_dir = Pathname.new(spec.base_dir)
239
+ gem_build_complete_path = Pathname.new(spec.gem_build_complete_path)
240
+ @files[File.join(config.relative_gem_path, gem_build_complete_path.relative_path_from(base_dir))] = spec.gem_build_complete_path
241
+ end
237
242
  end
238
243
 
239
244
  # Add all application directories and files to the archive.
@@ -280,7 +285,7 @@ module Warbler
280
285
 
281
286
  def expand_erb(file, config)
282
287
  require 'erb'
283
- erb = ERB.new(File.read(file), nil, '-')
288
+ erb = ERB.new(File.read(file), trim_mode: '-')
284
289
  StringIO.new(erb.result(erb_binding(config)))
285
290
  end
286
291
 
data/lib/warbler/task.rb CHANGED
@@ -42,7 +42,7 @@ module Warbler
42
42
 
43
43
  def initialize(name = nil, config = nil)
44
44
  @config = config
45
- if @config.nil? && File.exists?(Config::FILE)
45
+ if @config.nil? && File.exist?(Config::FILE)
46
46
  @config = eval(File.read(Config::FILE), binding, Config::FILE, 0)
47
47
  end
48
48
  @config ||= Config.new
@@ -148,7 +148,7 @@ module Warbler
148
148
 
149
149
  def define_config_task
150
150
  task "config" do
151
- if File.exists?(Warbler::Config::FILE) && ENV["FORCE"].nil?
151
+ if File.exist?(Warbler::Config::FILE) && ENV["FORCE"].nil?
152
152
  puts "There's another bird sitting on my favorite branch"
153
153
  puts "(file '#{Warbler::Config::FILE}' already exists. Pass argument FORCE=1 to override)"
154
154
  elsif !File.directory?("config")
@@ -2,18 +2,3 @@ ENV['BUNDLE_WITHOUT'] = '<%= config.bundle_without.join(':') %>'
2
2
  <% if config.bundler[:frozen] -%>
3
3
  ENV['BUNDLE_FROZEN'] = '1'
4
4
  <% end -%>
5
-
6
- module Bundler
7
- module Patch
8
- def clean_load_path
9
- # nothing to be done for embedded JRuby
10
- end
11
- end
12
- module SharedHelpers
13
- def included(bundler)
14
- bundler.send :include, Patch
15
- end
16
- end
17
- end
18
-
19
- require 'bundler/shared_helpers'
@@ -9,3 +9,5 @@ ENV['GEM_PATH'] = nil # RGs sets Gem.paths.path = Gem.default_path + [ GEM_HOME
9
9
  <% if config.bundler && config.bundler[:gemfile_path] -%>
10
10
  ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join('..', '..', '<%= config.bundler[:gemfile_path] %>'), __FILE__)
11
11
  <% end -%>
12
+ <%# Ensure any cached paths are cleared; otherwise behaviour can be indeterminate if the paths have already been read %>
13
+ # Gem.clear_paths
@@ -1,5 +1,5 @@
1
- <% if (params = config.webxml.context_params) && params['rack.env'] -%>
2
- ENV['RACK_ENV'] ||= '<%= params['rack.env'] %>'
1
+ <% if ((params = config.webxml.context_params) && params['rack.env']) || ENV_JAVA['RACK_ENV'] -%>
2
+ ENV['RACK_ENV'] ||= ENV_JAVA['RACK_ENV'] || '<%= params['rack.env'] %>'
3
3
  <% end -%>
4
4
 
5
5
  $LOAD_PATH.unshift $servlet_context.getRealPath('/WEB-INF') if $servlet_context
@@ -1,10 +1,5 @@
1
1
  if $servlet_context.nil?
2
2
  ENV['GEM_HOME'] <%= config.override_gem_home ? '=' : '||=' %> File.expand_path(File.join('..', '..', '<%= config.gem_path %>'), __FILE__)
3
- <% if config.override_gem_home -%>
4
- <% # GEM_HOME/GEM_PATH are set as .war gets extracted (on java -jar ...)
5
- # ... thus setting `ENV['GEM_PATH'] = nil` would cause a boot failure
6
- -%>
7
- <% end -%>
8
3
  <% if config.bundler && config.bundler[:gemfile_path] -%>
9
4
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path(File.join('..', '..', '<%= config.bundler[:gemfile_path] %>'), __FILE__)
10
5
  <% end -%>
@@ -17,3 +12,5 @@ else
17
12
  ENV['BUNDLE_GEMFILE'] ||= $servlet_context.getRealPath('/<%= config.bundler[:gemfile_path] %>')
18
13
  <% end -%>
19
14
  end
15
+ <%# Ensure any cached paths are cleared; otherwise behaviour can be indeterminate if the paths have already been read %>
16
+ Gem.clear_paths
@@ -38,22 +38,6 @@ module Warbler
38
38
 
39
39
  bundler_specs.each do |spec|
40
40
  spec = to_spec(spec)
41
- # Bundler HAX -- fixup bad #loaded_from attribute in fake
42
- # bundler gemspec from bundler/source.rb
43
- if spec.name == 'bundler'
44
- full_gem_path = Pathname.new(spec.full_gem_path)
45
- while ! full_gem_path.join('bundler.gemspec').exist?
46
- full_gem_path = full_gem_path.dirname
47
- # if at top of the path, meaning we cannot find bundler.gemspec, abort.
48
- if full_gem_path.to_s =~ /^[\.\/]$/
49
- warn("Unable to detect bundler spec under '#{spec.full_gem_path}'' and its sub-dirs")
50
- exit
51
- end
52
- end
53
-
54
- spec.loaded_from = full_gem_path.join('bundler.gemspec').to_s
55
- spec.full_gem_path = full_gem_path.to_s
56
- end
57
41
 
58
42
  case spec.source
59
43
  when ::Bundler::Source::Git
@@ -143,7 +127,8 @@ module Warbler
143
127
  bundle_without = config.bundle_without.map { |s| s.to_sym }
144
128
  definition = ::Bundler.definition
145
129
  all = definition.specs.to_a
146
- requested = definition.specs_for(definition.groups - bundle_without).to_a
130
+ requested_groups = definition.groups - bundle_without
131
+ requested = requested_groups.empty? ? [] : definition.specs_for(requested_groups).to_a
147
132
  excluded_git_specs = (all - requested).select { |spec| ::Bundler::Source::Git === spec.source }
148
133
  excluded_git_specs.each { |spec| spec.groups << :warbler_excluded }
149
134
  requested + excluded_git_specs
@@ -56,9 +56,9 @@ module Warbler
56
56
  if ! @spec.executables.empty?
57
57
  exe_script = @spec.executables.first
58
58
  exe_path = File.join(@spec.bindir, exe_script) # bin/script
59
- if File.exists?(exe_path)
59
+ if File.exist?(exe_path)
60
60
  exe_path
61
- elsif File.exists?("bin/#{exe_script}") # compatibility
61
+ elsif File.exist?("bin/#{exe_script}") # compatibility
62
62
  "bin/#{exe_script}" # ... should probably remove this
63
63
  else
64
64
  raise "no `#{exe_script}` executable script found"
@@ -32,7 +32,7 @@ module Warbler
32
32
  def add_jbundler_jars
33
33
  require 'jbundler/config'
34
34
  classpath = ::JBundler::Config.new.classpath_file
35
- if File.exists?( classpath )
35
+ if File.exist?( classpath )
36
36
  require File.expand_path( classpath )
37
37
  else
38
38
  raise 'jbundler support needs jruby to create a local config: jruby -S jbundle install'
@@ -176,41 +176,14 @@ module Warbler
176
176
 
177
177
  def initialize(key = 'webxml')
178
178
  @key = key
179
- @table = Hash.new { |h, k| h[k] = WebxmlOpenStruct.new(k) }
179
+ @table = Hash.new { |h, k|
180
+ new_ostruct_member!(k)
181
+ h[k] = WebxmlOpenStruct.new(k)
182
+ }
180
183
 
181
184
  @servlet_filter_async = nil # true/false
182
185
  end
183
186
 
184
- def [](key)
185
- new_ostruct_member(key)
186
- send(key)
187
- end
188
-
189
- def []=(key, value)
190
- new_ostruct_member(key)
191
- send("#{key}=", value)
192
- end
193
-
194
- def method_missing(mid, *args)
195
- len = args.length
196
- if mname = mid[/.*(?==\z)/m]
197
- if len != 1
198
- raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1)
199
- end
200
- modifiable[new_ostruct_member(mname)] = args[0]
201
- elsif len == 0
202
- @table[mid]
203
- else
204
- err = NoMethodError.new "undefined method `#{mid}' for #{self}", mid, args
205
- err.set_backtrace caller(1)
206
- raise err
207
- end
208
- end
209
-
210
- def respond_to_missing?(mid, include_private = false)
211
- @table.key?(mid.to_s.chomp('=').to_sym) || super
212
- end
213
-
214
187
  def servlet_filter; @servlet_filter ||= 'org.jruby.rack.RackFilter' end
215
188
  attr_writer :servlet_filter
216
189
 
@@ -259,6 +232,28 @@ module Warbler
259
232
  def to_s
260
233
  "No value for '#@key' found"
261
234
  end
235
+
236
+ private
237
+
238
+ def method_missing(mid, *args)
239
+ len = args.length
240
+ if mname = mid[/.*(?==\z)/m]
241
+ if len != 1
242
+ raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1)
243
+ end
244
+ self[mname] = args[0]
245
+ elsif len == 0
246
+ @table[mid]
247
+ else
248
+ err = NoMethodError.new "undefined method `#{mid}' for #{self}", mid, args
249
+ err.set_backtrace caller(1)
250
+ raise err
251
+ end
252
+ end
253
+
254
+ def respond_to_missing?(mid, include_private = false)
255
+ @table.key?(mid.to_s.chomp('=').to_sym) || super
256
+ end
262
257
  end
263
258
  end
264
259
  end
@@ -6,5 +6,5 @@
6
6
  #++
7
7
 
8
8
  module Warbler
9
- VERSION = "2.0.5"
9
+ VERSION = "2.1.0"
10
10
  end
@@ -20,7 +20,7 @@ module Warbler
20
20
  FileUtils.mkdir_p File.dirname(cached_path) #:nocov:
21
21
  require 'open-uri' #:nocov:
22
22
  begin
23
- open(download_url) do |stream| #:nocov:
23
+ URI.open(download_url) do |stream| #:nocov:
24
24
  File.open(cached_path, "wb") do |f| #:nocov:
25
25
  while buf = stream.read(4096) #:nocov:
26
26
  f << buf #:nocov:
@@ -88,9 +88,9 @@ module Warbler
88
88
 
89
89
  class JettyServer < WebServer
90
90
  def initialize
91
- @artifact = Artifact.new(ENV["MAVEN_REPO"] || "http://repo2.maven.org/maven2",
91
+ @artifact = Artifact.new(ENV["MAVEN_REPO"] || "https://repo1.maven.org/maven2",
92
92
  "org.eclipse.jetty", "jetty-runner",
93
- ENV["WEBSERVER_VERSION"] || "9.2.9.v20150224")
93
+ ENV["WEBSERVER_VERSION"] || "9.4.58.v20250814")
94
94
  end
95
95
 
96
96
  def add(jar)
@@ -103,7 +103,7 @@ module Warbler
103
103
  </Configure>
104
104
  CONFIG
105
105
 
106
- jar.files["WEB-INF/webserver.properties"] = StringIO.new(<<-PROPS)
106
+ jar.files["WEB-INF/webserver.properties"] ||= StringIO.new(<<-PROPS)
107
107
  mainclass = org.eclipse.jetty.runner.Runner
108
108
  args = args0,args1,args2,args3,args4,args5,args6
109
109
  props = jetty.home
@@ -3,7 +3,7 @@ require 'zip'
3
3
  module Warbler
4
4
  class ZipSupport
5
5
  def self.create(filename, &blk)
6
- Zip::File.open(filename, Zip::File::CREATE, &blk)
6
+ ::Zip::File.open(filename, create: true, &blk)
7
7
  end
8
8
 
9
9
  def self.open(filename, &blk)
data/lib/warbler_jar.jar CHANGED
Binary file
data/warble.rb CHANGED
@@ -108,7 +108,13 @@ Warbler::Config.new do |config|
108
108
  # GEM_HOME if it is set.
109
109
  # config.override_gem_home = true
110
110
 
111
- # Allows for specifing custom executables
111
+ # Specify executable
112
+ # Default: First item from alphabetized Gemspec executables array
113
+ # Takes either of two forms:
114
+ # o String: Relative path to the executable from your project root
115
+ # o Two-element Array:
116
+ # [0] Name of the gem that contains the executable
117
+ # [1] Relative path to the executable from the gem root
112
118
  # config.executable = ["rake", "bin/rake"]
113
119
 
114
120
  # Sets default (prefixed) parameters for the executables
data/warbler.gemspec CHANGED
@@ -16,20 +16,26 @@ Rails, or Rack application. Warbler provides a minimal, flexible, Ruby-like way
16
16
  bundle up all of your application files for deployment to a Java environment.}
17
17
 
18
18
  gem.files = `git ls-files`.split("\n").
19
- reject { |file| file =~ /^\./ }. # .gitignore, .travis.yml
19
+ reject { |file| file =~ /^\./ }. # .gitignore, .github
20
20
  reject { |file| file =~ /^spec|test\// }. # spec/**/*.spec
21
21
  reject { |file| file =~ /^integration\// }. # (un-used) *.rake files
22
22
  reject { |file| file =~ /^rakelib\// } # (un-used) *.rake files
23
+ gem.files << "lib/warbler_jar.jar"
24
+
23
25
  gem.test_files = [] # tests and specs add 700k to the gem, so don't include them
24
26
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
27
  gem.require_paths = ["lib"]
26
28
 
27
29
  gem.rdoc_options = ["--main", "README.rdoc", "-H", "-f", "darkfish"]
28
30
 
29
- gem.add_runtime_dependency 'rake', ['>= 10.1.0']
30
- gem.add_runtime_dependency 'jruby-jars', ['>= 9.0.0.0']
31
- gem.add_runtime_dependency 'jruby-rack', ['>= 1.1.1', '< 1.3']
32
- gem.add_runtime_dependency 'rubyzip', ['~> 1.0', '< 1.4']
33
- gem.add_development_dependency 'jbundler', '~> 0.9'
34
- gem.add_development_dependency 'rspec', '~> 2.10'
31
+ gem.required_ruby_version = ">= 3.1"
32
+
33
+ gem.add_runtime_dependency 'rake', ['~> 13.0', '>= 13.0.3']
34
+ gem.add_runtime_dependency 'rexml', '~> 3.0'
35
+ gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.1']
36
+ gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.3', '< 1.3']
37
+ gem.add_runtime_dependency 'rubyzip', '>= 3.0.0'
38
+ gem.add_runtime_dependency 'ostruct', '~> 0.6.2'
39
+ gem.add_development_dependency 'jbundler', '0.9.5'
40
+ gem.add_development_dependency 'rspec', '~> 3.0'
35
41
  end
metadata CHANGED
@@ -1,111 +1,144 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2018-05-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
13
+ name: rake
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '13.0'
16
19
  - - ">="
17
20
  - !ruby/object:Gem::Version
18
- version: 10.1.0
19
- name: rake
20
- prerelease: false
21
+ version: 13.0.3
21
22
  type: :runtime
23
+ prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
23
25
  requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '13.0'
24
29
  - - ">="
25
30
  - !ruby/object:Gem::Version
26
- version: 10.1.0
31
+ version: 13.0.3
27
32
  - !ruby/object:Gem::Dependency
33
+ name: rexml
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
- - - ">="
36
+ - - "~>"
31
37
  - !ruby/object:Gem::Version
32
- version: 9.0.0.0
33
- name: jruby-jars
34
- prerelease: false
38
+ version: '3.0'
35
39
  type: :runtime
40
+ prerelease: false
36
41
  version_requirements: !ruby/object:Gem::Requirement
37
42
  requirements:
38
- - - ">="
43
+ - - "~>"
39
44
  - !ruby/object:Gem::Version
40
- version: 9.0.0.0
45
+ version: '3.0'
41
46
  - !ruby/object:Gem::Dependency
47
+ name: jruby-jars
42
48
  requirement: !ruby/object:Gem::Requirement
43
49
  requirements:
44
50
  - - ">="
45
51
  - !ruby/object:Gem::Version
46
- version: 1.1.1
52
+ version: '9.4'
47
53
  - - "<"
48
54
  - !ruby/object:Gem::Version
49
- version: '1.3'
50
- name: jruby-rack
51
- prerelease: false
55
+ version: '10.1'
52
56
  type: :runtime
57
+ prerelease: false
53
58
  version_requirements: !ruby/object:Gem::Requirement
54
59
  requirements:
55
60
  - - ">="
56
61
  - !ruby/object:Gem::Version
57
- version: 1.1.1
62
+ version: '9.4'
58
63
  - - "<"
59
64
  - !ruby/object:Gem::Version
60
- version: '1.3'
65
+ version: '10.1'
61
66
  - !ruby/object:Gem::Dependency
67
+ name: jruby-rack
62
68
  requirement: !ruby/object:Gem::Requirement
63
69
  requirements:
64
- - - "~>"
70
+ - - ">="
65
71
  - !ruby/object:Gem::Version
66
- version: '1.0'
72
+ version: 1.2.3
67
73
  - - "<"
68
74
  - !ruby/object:Gem::Version
69
- version: '1.4'
70
- name: rubyzip
71
- prerelease: false
75
+ version: '1.3'
72
76
  type: :runtime
77
+ prerelease: false
73
78
  version_requirements: !ruby/object:Gem::Requirement
74
79
  requirements:
75
- - - "~>"
80
+ - - ">="
76
81
  - !ruby/object:Gem::Version
77
- version: '1.0'
82
+ version: 1.2.3
78
83
  - - "<"
79
84
  - !ruby/object:Gem::Version
80
- version: '1.4'
85
+ version: '1.3'
81
86
  - !ruby/object:Gem::Dependency
87
+ name: rubyzip
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 3.0.0
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 3.0.0
100
+ - !ruby/object:Gem::Dependency
101
+ name: ostruct
82
102
  requirement: !ruby/object:Gem::Requirement
83
103
  requirements:
84
104
  - - "~>"
85
105
  - !ruby/object:Gem::Version
86
- version: '0.9'
87
- name: jbundler
106
+ version: 0.6.2
107
+ type: :runtime
88
108
  prerelease: false
89
- type: :development
90
109
  version_requirements: !ruby/object:Gem::Requirement
91
110
  requirements:
92
111
  - - "~>"
93
112
  - !ruby/object:Gem::Version
94
- version: '0.9'
113
+ version: 0.6.2
95
114
  - !ruby/object:Gem::Dependency
115
+ name: jbundler
96
116
  requirement: !ruby/object:Gem::Requirement
97
117
  requirements:
98
- - - "~>"
118
+ - - '='
99
119
  - !ruby/object:Gem::Version
100
- version: '2.10'
101
- name: rspec
120
+ version: 0.9.5
121
+ type: :development
102
122
  prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - '='
126
+ - !ruby/object:Gem::Version
127
+ version: 0.9.5
128
+ - !ruby/object:Gem::Dependency
129
+ name: rspec
130
+ requirement: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '3.0'
103
135
  type: :development
136
+ prerelease: false
104
137
  version_requirements: !ruby/object:Gem::Requirement
105
138
  requirements:
106
139
  - - "~>"
107
140
  - !ruby/object:Gem::Version
108
- version: '2.10'
141
+ version: '3.0'
109
142
  description: |-
110
143
  Warbler is a gem to make a Java jar or war file out of any Ruby,
111
144
  Rails, or Rack application. Warbler provides a minimal, flexible, Ruby-like way to
@@ -160,7 +193,6 @@ files:
160
193
  - lib/warbler/web_server.rb
161
194
  - lib/warbler/zip_support.rb
162
195
  - lib/warbler_jar.jar
163
- - pom.xml
164
196
  - warble.rb
165
197
  - warbler.gemspec
166
198
  - web.xml.erb
@@ -168,7 +200,6 @@ homepage: https://github.com/jruby/warbler
168
200
  licenses:
169
201
  - MIT
170
202
  metadata: {}
171
- post_install_message:
172
203
  rdoc_options:
173
204
  - "--main"
174
205
  - README.rdoc
@@ -181,16 +212,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
212
  requirements:
182
213
  - - ">="
183
214
  - !ruby/object:Gem::Version
184
- version: '0'
215
+ version: '3.1'
185
216
  required_rubygems_version: !ruby/object:Gem::Requirement
186
217
  requirements:
187
218
  - - ">="
188
219
  - !ruby/object:Gem::Version
189
220
  version: '0'
190
221
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.6.14.1
193
- signing_key:
222
+ rubygems_version: 3.6.9
194
223
  specification_version: 4
195
224
  summary: Warbler chirpily constructs .war files of your Rails applications.
196
225
  test_files: []
data/pom.xml DELETED
@@ -1,190 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
-
4
-
5
- DO NOT MODIFIY - GENERATED CODE
6
-
7
-
8
- -->
9
- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
10
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
11
- <modelVersion>4.0.0</modelVersion>
12
- <groupId>rubygems</groupId>
13
- <artifactId>warbler</artifactId>
14
- <version>2.0.0.dev-SNAPSHOT</version>
15
- <packaging>gem</packaging>
16
- <name>Warbler chirpily constructs .war files of your Rails applications.</name>
17
- <description>Warbler is a gem to make a Java jar or war file out of any Ruby,
18
- Rails, or Rack application. Warbler provides a minimal, flexible, Ruby-like way to
19
- bundle up all of your application files for deployment to a Java environment.</description>
20
- <url>https://github.com/jruby/warbler</url>
21
- <licenses>
22
- <license>
23
- <name>MIT</name>
24
- <url>http://opensource.org/licenses/MIT</url>
25
- <comments>MIT license</comments>
26
- </license>
27
- </licenses>
28
- <developers>
29
- <developer>
30
- <name>Nick Sieger</name>
31
- <email>nick@nicksieger.com</email>
32
- </developer>
33
- </developers>
34
- <scm>
35
- <connection>https://github.com/jruby/warbler.git</connection>
36
- <url>https://github.com/jruby/warbler</url>
37
- </scm>
38
- <properties>
39
- <jruby.plugins.version>1.1.3</jruby.plugins.version>
40
- </properties>
41
- <dependencies>
42
- <dependency>
43
- <groupId>rubygems</groupId>
44
- <artifactId>rake</artifactId>
45
- <version>[10.1.0,)</version>
46
- <type>gem</type>
47
- </dependency>
48
- <dependency>
49
- <groupId>rubygems</groupId>
50
- <artifactId>jruby-jars</artifactId>
51
- <version>[9.0.0.0,)</version>
52
- <type>gem</type>
53
- </dependency>
54
- <dependency>
55
- <groupId>rubygems</groupId>
56
- <artifactId>jruby-rack</artifactId>
57
- <version>[1.1.1,1.3)</version>
58
- <type>gem</type>
59
- </dependency>
60
- <dependency>
61
- <groupId>rubygems</groupId>
62
- <artifactId>rubyzip</artifactId>
63
- <version>[1.0,1.2)</version>
64
- <type>gem</type>
65
- </dependency>
66
- <dependency>
67
- <groupId>rubygems</groupId>
68
- <artifactId>jbundler</artifactId>
69
- <version>[0.5.5,0.5.99999]</version>
70
- <type>gem</type>
71
- <scope>test</scope>
72
- </dependency>
73
- <dependency>
74
- <groupId>rubygems</groupId>
75
- <artifactId>ruby-maven</artifactId>
76
- <version>[3.1.1.0,3.1.1.99999]</version>
77
- <type>gem</type>
78
- <scope>test</scope>
79
- </dependency>
80
- <dependency>
81
- <groupId>rubygems</groupId>
82
- <artifactId>rspec</artifactId>
83
- <version>[2.10,2.99999]</version>
84
- <type>gem</type>
85
- <scope>test</scope>
86
- </dependency>
87
- <dependency>
88
- <groupId>rubygems</groupId>
89
- <artifactId>rdoc</artifactId>
90
- <version>[2.4.2,)</version>
91
- <type>gem</type>
92
- <scope>test</scope>
93
- </dependency>
94
- <dependency>
95
- <groupId>org.jruby</groupId>
96
- <artifactId>jruby</artifactId>
97
- <version>1.7.8</version>
98
- <scope>provided</scope>
99
- </dependency>
100
- <dependency>
101
- <groupId>org.eclipse.jetty</groupId>
102
- <artifactId>jetty-webapp</artifactId>
103
- <version>9.2.10.v20150310</version>
104
- <scope>provided</scope>
105
- </dependency>
106
- </dependencies>
107
- <repositories>
108
- <repository>
109
- <id>rubygems-releases</id>
110
- <url>http://rubygems-proxy.torquebox.org/releases</url>
111
- </repository>
112
- </repositories>
113
- <build>
114
- <sourceDirectory>ext</sourceDirectory>
115
- <extensions>
116
- <extension>
117
- <groupId>de.saumya.mojo</groupId>
118
- <artifactId>gem-with-jar-extension</artifactId>
119
- <version>${jruby.plugins.version}</version>
120
- </extension>
121
- </extensions>
122
- <directory>${basedir}/pkg</directory>
123
- <plugins>
124
- <plugin>
125
- <artifactId>maven-jar-plugin</artifactId>
126
- <version>2.4</version>
127
- <executions>
128
- <execution>
129
- <phase>prepare-package</phase>
130
- <goals>
131
- <goal>jar</goal>
132
- </goals>
133
- </execution>
134
- </executions>
135
- <configuration>
136
- <outputDirectory>lib</outputDirectory>
137
- <finalName>warbler_jar</finalName>
138
- </configuration>
139
- </plugin>
140
- <plugin>
141
- <artifactId>maven-clean-plugin</artifactId>
142
- <version>2.4</version>
143
- <configuration>
144
- <filesets>
145
- <fileset>
146
- <directory>lib</directory>
147
- <includes>
148
- <include>warbler_jar.jar</include>
149
- <include>*/**/*.jar</include>
150
- </includes>
151
- </fileset>
152
- </filesets>
153
- </configuration>
154
- </plugin>
155
- <plugin>
156
- <groupId>de.saumya.mojo</groupId>
157
- <artifactId>gem-maven-plugin</artifactId>
158
- <version>${jruby.plugins.version}</version>
159
- <configuration>
160
- <gemspec>warbler.gemspec</gemspec>
161
- </configuration>
162
- </plugin>
163
- <plugin>
164
- <artifactId>maven-compiler-plugin</artifactId>
165
- <version>3.1</version>
166
- <configuration>
167
- <source>1.5</source>
168
- <target>1.5</target>
169
- </configuration>
170
- </plugin>
171
- <plugin>
172
- <artifactId>maven-invoker-plugin</artifactId>
173
- <version>1.8</version>
174
- <executions>
175
- <execution>
176
- <id>integration-test</id>
177
- <goals>
178
- <goal>install</goal>
179
- <goal>run</goal>
180
- </goals>
181
- <configuration>
182
- <projectsDirectory>integration</projectsDirectory>
183
- <streamLogs>true</streamLogs>
184
- </configuration>
185
- </execution>
186
- </executions>
187
- </plugin>
188
- </plugins>
189
- </build>
190
- </project>