Permalink
Browse files

* use the right Mavenfle to create fresh one

* added copyright headers
  • Loading branch information...
1 parent 00969e0 commit a8219c68c2eb17e892f1a82ea40ece6e5708ca66 @mkristian committed Mar 4, 2013
View
@@ -13,9 +13,6 @@ plugin(:cucumber) do |m|
m.execute_goal(:test)
end
-# hack until test profile deps are normal deps with scope 'test'
-#profile(:test).activation.by_default
-
# just lock the versions
properties['jruby.plugins.version'] = '0.29.4'
properties['jruby.version'] = '1.7.3'
View
@@ -1,4 +1,9 @@
-# jetty run [![Build Status](https://secure.travis-ci.org/mkristian/jetty-run.png)](http://travis-ci.org/mkristian/jetty-run) #
+# jetty run
+
+* [![Build Status](https://secure.travis-ci.org/mkristian/jetty-run.png)](http://travis-ci.org/mkristian/jetty-run)
+* [![Dependency Status](https://gemnasium.com/mkristian/jetty-run.png)](https://gemnasium.com/mkristian/jetty-run)
+* [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/mkristian/jetty-run)
+
## install ##
@@ -10,26 +15,38 @@ first uninstall older ruby-maven (< 3.0.4.0.29.0) if present, they will otherwis
## usage ##
$ cd my_rails_app
- $ jruby -S bundle install
+ $ jruby -S bundle install #optional
+ $ jetty-run
+
+or for a rack application (assuming existiing config.ru)
+
+ $ cd my_rack_app
+ $ jruby -S bundle install #optional
$ jetty-run
-for `bundle install` you need to use JRuby since Gemfile.lock needs to be for the java platform. `jetty-run` works with both MRS and JRUBY - MRI starts up slightly faster.
+regarding `bundle install`: it must work wth JRuby since JRuby is the runtime environment. but `bundle install` since jetty-run will resolve a valid gemset itself and creates a Gemfile.lock (with the help of bundler). in short; all gems must be for the java platform or you need to provide jruby alternative gems.
+
+`jetty-run` works with both MRI and JRuby - MRI starts up slightly faster BUT **uses JRuby** when running the applicaton.
-jetty-run will use Gemfile/Gemfile.lock and Jarfile/Jarfile.lock to setup an environment to start rails in development mode with jetty. it uses ruby-maven to achieve this, i.e. all missing jar dependencies (jetty and all) will be downloaded on the first run (that can take time since it first needs to download all the jetty related jars).
+jetty-run will use Gemfile/Gemfile.lock and Jarfile/Jarfile.lock to setup an environment to start rails in development mode with jetty. it uses ruby-maven to achieve this, i.e. all missing jar dependencies (jetty itself and all its dependences) will be downloaded on the first run (that can take time since it first needs to download all the jars).
-jetty will start with port 8080 (none ssl) and 8443 (ssl). the ssl certificate is ./src/test/resources/server.keystore with password '123456' - it will be copied there on the first run.
+jetty will start with port 8080 (none ssl) and 8443 (ssl). the ssl certificate is ./target/server.keystore with password '123456'.
-to customize jetty you can use the _Mavenfile_ which allows to reconfigure jetty-maven-plugin:
+to customize jetty you can use the _Mavenfile_ which allows to reconfigure jetty-maven-plugin, i.e. the version of jetty
properties['jetty.version'] = '7.5.1.v20110908'
-TODO more advanced example and current config
+or you pass it in via the command line
+
+ $ jetty-run -- -Djetty.version=7.5.1.v20110908
+
+**--** is used a separator after which you can use any maven open available. like `-- -X` gives you a complete maven debug output, etc.
## running any given war-file ##
jetty-run war /path/to/war-file
-with this you warble your warfile and use jetty-run to start it with jetty.
+with this you can `warble` your warfile and use `jetty-run` to start it with jetty.
## more ##
@@ -40,8 +57,19 @@ see
# note #
orginally the code was part the jruby-maven-plugins and slowly the functionality moved to the ruby side of things. so things are on the move and there is room for improvements . . .
+
+contributing
+------------
+
+1. fork it
+2. create your feature branch (`git checkout -b my-new-feature`)
+3. commit your changes (`git commit -am 'Added some feature'`)
+4. push to the branch (`git push origin my-new-feature`)
+5. create new Pull Request
-# meta-fu #
+meta-fu
+-------
-bug-reports and pull request are most welcome.
+bug-reports and pull request are most welcome. otherwise
+enjoy :)
View
@@ -24,4 +24,24 @@ task :clean do
FileUtils.rm_rf('target')
end
+task :headers do
+ require 'rubygems'
+ require 'copyright_header'
+
+ s = Gem::Specification.load( Dir["*gemspec"].first )
+
+ args = {
+ :license => s.license,
+ :copyright_software => s.name,
+ :copyright_software_description => s.description,
+ :copyright_holders => s.authors,
+ :copyright_years => [Time.now.year],
+ :add_path => 'lib',
+ :output_dir => './'
+ }
+
+ command_line = CopyrightHeader::CommandLine.new( args )
+ command_line.execute
+end
+
# vim: syntax=Ruby
View
@@ -5,13 +5,15 @@ Gem::Specification.new do |s|
s.version = Maven::Jetty::VERSION.dup
s.summary = 'run rails with jetty'
- s.description = 'installs and run jetty from within a rails directory with ssl and none ssl port'
+ s.description = 'installs and run jetty from within a rack/rails directory with ssl and none ssl port'
s.homepage = 'http://github.com/mkristian/jetty-run'
- s.authors = ['Kristian Meier']
+ s.authors = ['Christian Meier']
s.email = ['m.kristian@web.de']
+ s.license = 'MIT'
+
s.bindir = "bin"
s.executables = ['jetty-run']
@@ -20,8 +22,9 @@ Gem::Specification.new do |s|
s.files += Dir['spec/**/*']
s.files += Dir['MIT-LICENSE'] + Dir['*.md']
s.test_files += Dir['spec/**/*_spec.rb']
- s.add_development_dependency 'rake', '0.9.2.2'
- s.add_development_dependency 'minitest', '~> 2.10.0'
- s.add_development_dependency 'cucumber', '~> 1.1.9'
+ s.add_development_dependency 'rake', '~> 10.0'
+ s.add_development_dependency 'minitest', '~> 4.6'
+ s.add_development_dependency 'cucumber', '~> 1.2'
+ s.add_development_dependency 'copyright-headers', '~> 1.0'
s.add_runtime_dependency 'ruby-maven', '~> 3.0.4.1.4'
end
View
@@ -1 +1,21 @@
+#
+# Copyright (C) 2013 Christian Meier
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
require 'jetty_run'
View
@@ -1 +1,21 @@
+#
+# Copyright (C) 2013 Christian Meier
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
require 'maven/jetty/version'
@@ -8,8 +8,8 @@ else
end
# lock down versions
-properties['jruby.version'] = '1.7.2'
-properties['jruby.plugins.version'] = '0.29.3'
+properties['jruby.version'] = '1.7.3'
+properties['jruby.plugins.version'] = '0.29.4'
properties['jetty.version'] = '8.1.9.v20130131'
# vim: syntax=Ruby
View
@@ -1,3 +1,23 @@
+#
+# Copyright (C) 2013 Christian Meier
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
require 'maven/ruby/cli'
require 'maven/jetty/pom_magic'
@@ -11,4 +31,4 @@ def magic_pom( dir = '.', *args )
end
end
-end
+end
@@ -1,3 +1,23 @@
+#
+# Copyright (C) 2013 Christian Meier
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
require 'maven/tools/gem_project'
module Maven
@@ -104,4 +124,4 @@ def add_defaults
end
end
end
-end
+end
@@ -1,3 +1,23 @@
+<!--
+ Copyright (C) 2013 Christian Meier
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
<web-app>
<context-param>
<!-- must match the place where the gems are located -->
@@ -1,3 +1,23 @@
+<!--
+ Copyright (C) 2013 Christian Meier
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
<web-app>
<context-param>
<!-- must match the place where the gems are located -->
@@ -1,3 +1,23 @@
+<!--
+ Copyright (C) 2013 Christian Meier
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
<web-app>
<context-param>
<!-- must match the place where the gems are located -->
@@ -1,3 +1,23 @@
+#
+# Copyright (C) 2013 Christian Meier
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
require 'maven/ruby/pom_magic'
require 'maven/jetty/jetty_project'
require 'fileutils'
@@ -10,7 +30,7 @@ def generate_pom( dir = '.', *args )
proj = JettyProject.new( dir )
ensure_web_xml( dir, proj )
- ensure_mavenfile( dir )
+ ensure_mavenfile( dir, File.dirname( __FILE__ ) )
ensure_keystore( dir )
ensure_overlays( dir )
@@ -66,4 +86,4 @@ def ensure_keystore( dir )
end
end
-end
+end
@@ -1,3 +1,23 @@
+<!--
+ Copyright (C) 2013 Christian Meier
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
Oops, something went wrong.

0 comments on commit a8219c6

Please sign in to comment.