rjack-jetty 6.1.22.1-java

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.
data/History.rdoc ADDED
@@ -0,0 +1,42 @@
1
+ === 6.1.22.1 (2010-3-6)
2
+ * Set gem platform to java
3
+ * Upgraded to tarpit ~> 1.2.0
4
+
5
+ === 6.1.22.0 (2009-12-19)
6
+ * Update to Jetty 6.1.22
7
+ * Upgrade to tarpit-1.1.0 (gemcutter)
8
+
9
+ === 6.1.21.0 (2009-10-11)
10
+ * Update to Jetty 6.1.21
11
+
12
+ === 6.1.20.1 (2009-10-10)
13
+ * Rename gem rjack-jetty and as module RJack::Jetty
14
+ * Update to Jetty 6.1.20
15
+ * Use rjack-tarpit for build.
16
+ * Update development dependency to rjack-logback >= 0.9.17.1
17
+
18
+ === 6.1.19.1 (2009-7-22)
19
+ * Update to Jetty 6.1.19
20
+
21
+ === 6.1.18.1 (2009-5-29)
22
+ * Update to Jetty 6.1.18
23
+
24
+ === 6.1.17.1 (2009-5-2)
25
+ * Update to Jetty 6.1.17
26
+ * Use rdoc 2.4.3 and hoe 1.12.2 for build.
27
+
28
+ === 6.1.16.1 (2009-4-4)
29
+ * Update to Jetty 6.1.16, which now uses externalized
30
+ org.mortbay.jetty:servlet-api (2.5-20081211) dependency.
31
+ * Add logback as development dependency.
32
+
33
+ === 6.1.14.1 (2008-12-6)
34
+ * Update to Jetty 6.1.14
35
+ * JettyBase -rename-> Jetty
36
+
37
+ === 6.1.12.1 (2008-11-7)
38
+ * Update to Jetty 6.1.12
39
+ * Fixed packaging of test.war
40
+
41
+ === 6.1.11.1 (2008-11-2)
42
+ * Initial release based on Jetty Web Server 6.1.11
data/Manifest.static ADDED
@@ -0,0 +1,18 @@
1
+ Manifest.static
2
+ Manifest.txt
3
+ README.rdoc
4
+ History.rdoc
5
+ Rakefile
6
+ pom.xml
7
+ assembly.xml
8
+ lib/rjack-jetty/base.rb
9
+ lib/rjack-jetty.rb
10
+ lib/rjack-jetty/rewrite.rb
11
+ lib/rjack-jetty/test-servlets.rb
12
+ bin/rjack-jetty-service
13
+ src/main/java/rjack/testservlets/PerfTestServlet.java
14
+ src/main/java/rjack/testservlets/SnoopServlet.java
15
+ test/test_jetty.rb
16
+ test/test.txt
17
+ webapps/test/WEB-INF/web.xml
18
+ webapps/test/index.html
data/Manifest.txt ADDED
@@ -0,0 +1,24 @@
1
+ Manifest.static
2
+ Manifest.txt
3
+ README.rdoc
4
+ History.rdoc
5
+ Rakefile
6
+ pom.xml
7
+ assembly.xml
8
+ lib/rjack-jetty/base.rb
9
+ lib/rjack-jetty.rb
10
+ lib/rjack-jetty/rewrite.rb
11
+ lib/rjack-jetty/test-servlets.rb
12
+ bin/rjack-jetty-service
13
+ src/main/java/rjack/testservlets/PerfTestServlet.java
14
+ src/main/java/rjack/testservlets/SnoopServlet.java
15
+ test/test_jetty.rb
16
+ test/test.txt
17
+ webapps/test/WEB-INF/web.xml
18
+ webapps/test/index.html
19
+ webapps/test.war
20
+ lib/rjack-jetty/jetty-6.1.22.jar
21
+ lib/rjack-jetty/jetty-rewrite-handler-6.1.22.jar
22
+ lib/rjack-jetty/jetty-util-6.1.22.jar
23
+ lib/rjack-jetty/rjack-jetty-1.0.jar
24
+ lib/rjack-jetty/servlet-api-2.5-20081211.jar
data/README.rdoc ADDED
@@ -0,0 +1,117 @@
1
+ = rjack-jetty
2
+
3
+ * http://rjack.rubyforge.org
4
+ * http://rubyforge.org/projects/rjack
5
+
6
+ == Description
7
+
8
+ A gem packaging of the {Jetty Web Server}[http://www.mortbay.org/jetty/]
9
+ for JRuby:
10
+
11
+ * Provides jetty, jetty-util, servlet-api, and jetty-rewrite-handler
12
+ jars.
13
+ * A Jetty::ServerFactory for simple programmatic server setup in ruby.
14
+ * A set of Jetty::TestServlets containing a SnoopServlet and
15
+ PerfTestServlet (implemented in Java).
16
+ * A jetty-service bin script for easy testing from the command line.
17
+
18
+ Note that JSP support is provided separately in the companion
19
+ jetty-jsp[http://rjack.rubyforge.org/jetty-jsp/] gem.
20
+
21
+ == Synopsis
22
+
23
+ % jetty-service -v
24
+ Usage: jetty-service [options]
25
+ -p, --port N Port to listen on (default: auto)
26
+ -t, --threads N Maximum pool threads (default: 20)
27
+ -w, --webapp PATH Load PATH as root context webapp
28
+ (default: gem test.war)
29
+ -j, --jsp Enable JSP support by loading jetty-jsp gem
30
+ -d, --debug Enable debug logging
31
+ -v, --version Show version and exit
32
+
33
+ or
34
+
35
+ require 'rjack-jetty'
36
+ require 'rjack-jetty/test-servlets'
37
+
38
+ factory = Jetty::ServerFactory.new
39
+ factory.port = 8080
40
+
41
+ factory.set_context_servlets( '/', '/*' => Jetty::TestServlets::SnoopServlet.new )
42
+ server = factory.create
43
+ server.start
44
+ server.join
45
+
46
+ == Requirements
47
+
48
+ No hard requirements, however:
49
+
50
+ * To load webapps with JSPs, the
51
+ rjack-jetty-jsp[http://rjack.rubyforge.org/jetty-jsp/] gem
52
+ must be loaded.
53
+ * Jetty will log to SLF4J[http://rjack.rubyforge.org/slf4j] if
54
+ loaded. The jetty-service script will attempt to load
55
+ rjack-logback[http://rjack.rubyforge.org/logback], and thus
56
+ rjack-slf4j, if available.
57
+
58
+ == License
59
+
60
+ === rjack-jetty gem
61
+
62
+ Copyright (c) 2008-2009 David Kellum
63
+
64
+ Licensed under the Apache License, Version 2.0 (the "License"); you
65
+ may not use this file except in compliance with the License. You
66
+ may obtain a copy of the License at:
67
+
68
+ http://www.apache.org/licenses/LICENSE-2.0
69
+
70
+ Unless required by applicable law or agreed to in writing, software
71
+ distributed under the License is distributed on an "AS IS" BASIS,
72
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
73
+ implied. See the License for the specific language governing
74
+ permissions and limitations under the License.
75
+
76
+ === Jetty Web Container (Java)
77
+
78
+ Copyright (c) 1995-2006 Mort Bay Consulting Pty Ltd
79
+
80
+ Licensed under the Apache License, Version 2.0 (the "License");
81
+ you may not use this file except in compliance with the License.
82
+ You may obtain a copy of the License at
83
+
84
+ http://www.apache.org/licenses/LICENSE-2.0
85
+
86
+ Unless required by applicable law or agreed to in writing, software
87
+ distributed under the License is distributed on an "AS IS" BASIS,
88
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
+ See the License for the specific language governing permissions and
90
+ limitations under the License.
91
+
92
+ The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
93
+ unless otherwise noted. It is licensed under the apache 2.0
94
+ license.
95
+
96
+ The javax.servlet package used by Jetty is copyright
97
+ Sun Microsystems, Inc and Apache Software Foundation. It is
98
+ distributed under the Common Development and Distribution License.
99
+ You can obtain a copy of the license at
100
+ https://glassfish.dev.java.net/public/CDDLv1.0.html.
101
+
102
+ The UnixCrypt.java code ~Implements the one way cryptography used by
103
+ Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
104
+ modified April 2001 by Iris Van den Broeke, Daniel Deville.
105
+ Permission to use, copy, modify and distribute UnixCrypt
106
+ for non-commercial or commercial purposes and without fee is
107
+ granted provided that the copyright notice appears in all copies.
108
+
109
+ The default JSP implementation is provided by the Glassfish JSP engine
110
+ from project Glassfish http://glassfish.dev.java.net. Copyright 2005
111
+ Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.
112
+
113
+ Some portions of the code are Copyright:
114
+ 2006 Tim Vernum
115
+ 1999 Jason Gilbert.
116
+
117
+ The jboss integration module contains some LGPL code.
data/Rakefile ADDED
@@ -0,0 +1,72 @@
1
+ # -*- ruby -*-
2
+ #--
3
+ # Copyright (C) 2008-2009 David Kellum
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
6
+ # may not use this file except in compliance with the License. You
7
+ # may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14
+ # implied. See the License for the specific language governing
15
+ # permissions and limitations under the License.
16
+ #++
17
+
18
+ $LOAD_PATH << './lib'
19
+ require 'rjack-jetty/base'
20
+
21
+ require 'rubygems'
22
+ gem 'rjack-tarpit', '~> 1.2.0'
23
+ require 'rjack-tarpit'
24
+
25
+ include RJack
26
+
27
+ t = TarPit.new( 'rjack-jetty', Jetty::VERSION, :java_platform )
28
+
29
+ t.specify do |h|
30
+ h.developer( "David Kellum", "dek-oss@gravitext.com" )
31
+ h.extra_dev_deps << [ 'rjack-logback', '>= 0.9.17' ]
32
+ h.rubyforge_name = 'rjack'
33
+ h.remote_rdoc_dir = 'jetty'
34
+ end
35
+
36
+ t.jars =
37
+ begin
38
+ mods = %w{ jetty jetty-util jetty-rewrite-handler }
39
+ l = mods.map { |n| "#{n}-#{ Jetty::JETTY_VERSION }.jar" }
40
+ l << "servlet-api-#{ Jetty::SERVLET_API_VERSION }-#{ Jetty::SERVLET_API_DATE }.jar"
41
+ l << 'rjack-jetty-1.0.jar'
42
+ l
43
+ end
44
+
45
+ file 'Manifest.txt' => [ "lib/#{t.name}/base.rb" ]
46
+
47
+ file 'webapps/test.war' => [ 'webapps/test/index.html',
48
+ 'webapps/test/WEB-INF/web.xml' ] do
49
+ sh( 'jar cvf webapps/test.war ' +
50
+ '-C webapps/test index.html -C webapps/test WEB-INF/web.xml' )
51
+ end
52
+
53
+ t.generated_files = 'webapps/test.war'
54
+
55
+ t.assembly_version = 1.0
56
+
57
+ task :check_pom_deps do
58
+ t.test_line_match( 'pom.xml',
59
+ %r[<version>#{ Jetty::JETTY_VERSION }</version>] )
60
+ end
61
+ task :check_history_version do
62
+ t.test_line_match( 'History.rdoc', /^==/, / #{t.version} / )
63
+ end
64
+ task :check_history_date do
65
+ t.test_line_match( 'History.rdoc', /^==/, /\([0-9\-]+\)$/ )
66
+ end
67
+
68
+ task :gem => [ :check_pom_deps, :check_history_version ]
69
+ task :tag => [ :check_pom_deps, :check_history_version, :check_history_date ]
70
+ task :push => [ :check_history_date ]
71
+
72
+ t.define_tasks
data/assembly.xml ADDED
@@ -0,0 +1,19 @@
1
+ <assembly>
2
+ <id>bin</id>
3
+ <formats>
4
+ <format>dir</format>
5
+ </formats>
6
+ <includeBaseDirectory>false</includeBaseDirectory>
7
+ <dependencySets>
8
+ <dependencySet>
9
+ <includes>
10
+ <include>org.mortbay.jetty:jetty</include>
11
+ <include>org.mortbay.jetty:jetty-util</include>
12
+ <include>org.mortbay.jetty:jetty-rewrite-handler</include>
13
+ <include>org.mortbay.jetty:servlet-api</include>
14
+ <include>rjack:rjack-jetty</include>
15
+ </includes>
16
+ </dependencySet>
17
+ </dependencySets>
18
+
19
+ </assembly>
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #--
4
+ # Copyright (C) 2008 David Kellum
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
7
+ # may not use this file except in compliance with the License. You
8
+ # may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
+ # implied. See the License for the specific language governing
16
+ # permissions and limitations under the License.
17
+ #++
18
+
19
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
20
+
21
+ require 'rubygems'
22
+
23
+ begin
24
+ gem 'rjack-logback'
25
+ require 'rjack-logback'
26
+ Logback.config_console( :level => Logback::INFO )
27
+ log = SLF4J[ 'jetty-service' ]
28
+ rescue Gem::LoadError => e
29
+ class Log
30
+ def method_missing( method, *args )
31
+ $stderr.puts( "#{method.id2name.upcase}: #{args.join(' ')}" )
32
+ end
33
+ end
34
+ log = Log.new
35
+ log.info( "#{e.to_s.strip}: SLF4J/Logback not loaded, using STDERR." )
36
+ end
37
+
38
+ require 'rjack-jetty'
39
+ require 'rjack-jetty/test-servlets'
40
+ require 'optparse'
41
+
42
+ include RJack
43
+
44
+ factory = Jetty::ServerFactory.new
45
+
46
+ factory.webapp_contexts[ '/' ] = Jetty::TestServlets::WEBAPP_TEST_EXPANDED
47
+
48
+ OptionParser.new do |opts|
49
+ opts.on( "-p", "--port N", Integer,
50
+ "Port to listen on (default: auto)" ) do |v|
51
+ factory.port = v
52
+ end
53
+ opts.on( "-t", "--threads N", Integer,
54
+ "Maximum pool threads (default: #{factory.max_threads})" ) do |v|
55
+ factory.max_threads = v
56
+ end
57
+ opts.on( "-w", "--webapp PATH",
58
+ "Load PATH as root context webapp. (default: gem test.war)" ) do |v|
59
+ factory.webapp_contexts[ '/' ] = v
60
+ end
61
+ opts.on( "-j", "--jsp", "Enable JSP support by loading jetty-jsp gem") do
62
+ gem( 'jetty-jsp', "~> #{Jetty::JETTY_VERSION}" )
63
+ require 'jetty-jsp'
64
+ end
65
+ opts.on_tail( "-d", "--debug", "Enable debug logging") do
66
+ Logback.root.level = Logback::DEBUG if defined?( Logback )
67
+ end
68
+ opts.on_tail( "-v", "--version", "Show version and exit" ) do
69
+ puts "jetty gem (#{$0}) version: #{Jetty::VERSION}"
70
+ exit
71
+ end
72
+ end.parse!
73
+
74
+ server = factory.create
75
+
76
+ server.start
77
+ log.info( "Listening on port: #{server.connectors[0].local_port}" )
78
+ server.join
79
+ log.info( "Server exited." )
@@ -0,0 +1,26 @@
1
+ #--
2
+ # Copyright (C) 2008-2009 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ module RJack
18
+ module Jetty
19
+ JETTY_VERSION = '6.1.22'
20
+ VERSION = JETTY_VERSION + '.1'
21
+ SERVLET_API_VERSION = '2.5'
22
+ SERVLET_API_DATE = '20081211'
23
+
24
+ JETTY_DIR = File.dirname( __FILE__ ) # :nodoc:
25
+ end
26
+ end
Binary file
@@ -0,0 +1,2 @@
1
+ # Loads jetty-rewrite-handler jar.
2
+ Jetty.require_jar( 'jetty-rewrite-handler' )
Binary file
@@ -0,0 +1,36 @@
1
+ #--
2
+ # Copyright (C) 2008 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'rjack-jetty'
18
+
19
+ module RJack
20
+ module Jetty
21
+
22
+ # Loads testservlets jar.
23
+ module TestServlets
24
+ require File.join( Jetty::JETTY_DIR, "rjack-jetty-1.0.jar" )
25
+ import 'rjack.testservlets.SnoopServlet'
26
+ import 'rjack.testservlets.PerfTestServlet'
27
+
28
+ # Webapps directory containing "test/" expanded webapp and "test.war"
29
+ WEBAPPS_DIR = File.join( Jetty::JETTY_DIR, '..', '..', 'webapps' )
30
+
31
+ WEBAPP_TEST_EXPANDED = File.join( WEBAPPS_DIR, 'test' )
32
+ WEBAPP_TEST_WAR = File.join( WEBAPPS_DIR, 'test.war' )
33
+ end
34
+
35
+ end
36
+ end