Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved gwt and jetty-run to new gems

  • Loading branch information...
commit 04b606ff96ae02e4b28a35686b178a901d08383e 1 parent 1750722
@mkristian authored
View
8 src/main/gemspec/maven.gemspec
@@ -5,15 +5,11 @@ Gem::Specification.new do |s|
s.version = "#{File.basename(File.expand_path('..')).sub(/-SNAPSHOT/, '').sub(/[a-zA-Z-]+-/, '').gsub(/-/, '.')}"
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["mkristian"]
- s.description = %q{maven support for rubygems based on maven 3.0. it allows to use xyz.gemspec file as pom file or the usual pom.xml files. with a rails3 application with a Gemfile (suitable for jruby) you can run jetty as development server. this gem is a stripped polyglot-maven which includes only the jruby part. the executable runs only with jruby.}
+ s.description = %q{maven support for rubygems based on maven 3.0. it allows to use xyz.gemspec file as pom file or the usual pom.xml files. with a rails3 application with a Gemfile (suitable for jruby). you need java installed or jruby but it will run with MRI (without installed jruby) since the maven will take care of the jruby to use.}
s.email = ["m.kristian@web.de"]
s.extra_rdoc_files = ["NOTICE.txt", "LICENSE.txt", "README.txt"]
- FileUtils.cp("bin/jetty-run", "bin/tomcat-run")
-
s.files = Dir.glob("*.txt") +
- Dir.glob("bin/gwt") +
- Dir.glob("bin/*-run") +
Dir.glob("bin/mvn*") +
Dir.glob("bin/rmvn") +
Dir.glob("bin/m2.conf") +
@@ -28,7 +24,7 @@ Gem::Specification.new do |s|
ext.delete(ext.detect{ |f| f =~ /jruby-complete/ })
s.files += ext
s.bindir = "bin"
- s.executables = ['rmvn', 'gwt', 'jetty-run']#, 'tomcat-run']
+ s.executables = ['rmvn']
s.homepage = %q{http://github.com/mkristian/ruby-maven}
s.rdoc_options = ["--main", "README.md"]
s.require_paths = ['lib/ruby']
View
59 src/main/resources/bin/gwt
@@ -1,59 +0,0 @@
-#!/usr/bin/env ruby
-require 'ruby_maven'
-require 'thor'
-
-class GWTCommand < Thor
- no_tasks do
- def mvn
- @mvn ||= Maven::RubyMaven.new
- end
-
- def exec(*args)
- ARGV.clear # clean up in case another script gets executed
- print "maven commandline: "
- mvn.exec(args)
- end
- end
-
- desc "new APP_PATH GWT_PACKAGE_NAME [rails-options] [-- maven-options]", "create a new rails application with GWT UI given the path of the application and its package for the new GWT module"
- method_option :session, :type => :boolean, :default => false, :desc => 'adds session support'
- method_option :menu, :type => :boolean, :default => false, :desc => 'adds menu support'
- def new(app_path, gwt_package, *args)
- args = ARGV.dup
- args.delete('new')
- args.delete(app_path)
- args.delete(gwt_package)
- args.delete_if {|a| a =~ /^--session|^--menu/ }
- if i = args.index("--")
- maven_args = args[i..-1]
- args = i == 0 ? [] : args[0..(i-1)]
- end
- margs = ["rails3:new", "-Dargs=\"#{[app_path, args].flatten!.join ' '}\"", "-Dgwt.package=#{gwt_package}", "-Dgwt.session=#{options['session'] || false}", "-Dgwt.menu=#{options['menu'] || false}", maven_args || []].flatten!
- exec(margs)
- end
-
- def help(*args)
- super
- exec ["rails3:new", "-Dargs=--help"] if File.exists?('Gemfile')
- end
-
- desc "run [maven_options]", "starts the GWT development shell"
- def server(*args)
- args = ARGV.dup
- args.delete('server')
-
- exec ["gwt:run", args].flatten!
- end
-
- desc "compile [maven_options]", "compiles the gwt java code to javascript"
- def compile(*args)
- args = ARGV.dup
- args.delete('compile')
-
- exec ["compile", "gwt:compile", args].flatten!
- end
-end
-if ARGV[0] == 'run'
- ARGV[0] = 'server'
-end
-GWTCommand.start
View
26 src/main/resources/bin/jetty-run
@@ -1,26 +0,0 @@
-#!/usr/bin/env ruby
-if ARGV.size > 4 || ARGV[0] == "--help" || ARGV[0] == "-h" || ARGV[0] == "-?"
- puts "usage: #{File.basename($0)} [-e <environment>] [--war [<path/to/warfile>]]"
- puts "\tdefault environment: development"
- exit 1
-end
-
-args = [__FILE__.gsub(/-/, ':').gsub(/.*[\/\\]/, '')]
-if ARGV.size == 2 && ARGV[0] == "-e"
- args << "-Drails.env=#{ARGV[1]}"
- args << "-Prun"
-elsif ARGV.size == 1 && ARGV[0] == "--war"
- args = ["jetty:run-war", "-Pwar"]
-elsif ARGV.size == 2 && ARGV[0] == "--war"
- args = ["jetty:deploy-war", "-DwebApp=#{ARGV[1]}", "-Pwar"]
-elsif ARGV.size == 3 && ARGV[0] == "-e" && ARGV[2] == "--war"
- args = ["jetty:run-war", "-Pwar", "-Drails.env=#{ARGV[1]}"]
-elsif ARGV.size == 3 && ARGV[1] == "-e" && ARGV[0] == "--war"
- args = ["jetty:run-war", "-Pwar", "-Drails.env=#{ARGV[2]}"]
-elsif ARGV.size == 4 && ARGV[0] == "-e" && ARGV[2] == "--war"
- args = ["jetty:deploy-war", "-Pwar", "-DwebApp=#{ARGV[3]}", "-Drails.env=#{ARGV[1]}"]
-elsif ARGV.size == 4 && ARGV[2] == "-e" && ARGV[0] == "--war"
- args = ["jetty:deploy-war", "-Pwar", "-DwebApp=#{ARGV[1]}", "-Drails.env=#{ARGV[3]}"]
-end
-ARGV.replace(args)
-load File.join(File.dirname(__FILE__), "rmvn")
Please sign in to comment.
Something went wrong with that request. Please try again.