gwt-run 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +47 -0
  3. data/bin/gwt +98 -0
  4. data/bin/gwt~ +97 -0
  5. data/bin/jetty-run~ +84 -0
  6. data/lib/gwt-run.rb +21 -0
  7. data/lib/gwt-run.rb~ +1 -0
  8. data/lib/gwt_run.rb +21 -0
  9. data/lib/gwt_run.rb~ +1 -0
  10. data/lib/jetty-run.rb~ +1 -0
  11. data/lib/jetty_run.rb~ +1 -0
  12. data/lib/maven/gwt/Mavenfile +68 -0
  13. data/lib/maven/gwt/Mavenfile~ +62 -0
  14. data/lib/maven/gwt/cli.rb +34 -0
  15. data/lib/maven/gwt/cli.rb~ +14 -0
  16. data/lib/maven/gwt/generator.rb +86 -0
  17. data/lib/maven/gwt/generator.rb~ +62 -0
  18. data/lib/maven/gwt/jetty_project.rb~ +69 -0
  19. data/lib/maven/gwt/layout.rb +51 -0
  20. data/lib/maven/gwt/layout.rb~ +27 -0
  21. data/lib/maven/gwt/pom_magic.rb +74 -0
  22. data/lib/maven/gwt/pom_magic.rb~ +54 -0
  23. data/lib/maven/gwt/rack-web.xml +86 -0
  24. data/lib/maven/gwt/rack-web.xml~ +48 -0
  25. data/lib/maven/gwt/rack_gwt.rb~ +7 -0
  26. data/lib/maven/gwt/rack_project.rb~ +105 -0
  27. data/lib/maven/gwt/rails-web.xml +68 -0
  28. data/lib/maven/gwt/rails-web.xml~ +48 -0
  29. data/lib/maven/gwt/rails_project.rb~ +13 -0
  30. data/lib/maven/gwt/ruby_maven.rb~ +24 -0
  31. data/lib/maven/gwt/templates/Application.java +68 -0
  32. data/lib/maven/gwt/templates/Application.java~ +46 -0
  33. data/lib/maven/gwt/templates/Application.ui.xml +30 -0
  34. data/lib/maven/gwt/templates/Application.ui.xml~ +9 -0
  35. data/lib/maven/gwt/templates/EntryPoint.java +80 -0
  36. data/lib/maven/gwt/templates/EntryPoint.java~ +55 -0
  37. data/lib/maven/gwt/templates/Module.gwt.xml +44 -0
  38. data/lib/maven/gwt/templates/Module.gwt.xml~ +24 -0
  39. data/lib/maven/gwt/templates/ModuleDevelopment.gwt.xml +31 -0
  40. data/lib/maven/gwt/templates/ModuleDevelopment.gwt.xml~ +7 -0
  41. data/lib/maven/gwt/templates/gwt.css +95 -0
  42. data/lib/maven/gwt/templates/index.html +49 -0
  43. data/lib/maven/gwt/templates/index.html~ +29 -0
  44. data/lib/maven/gwt/version.rb +25 -0
  45. data/lib/maven/gwt/version.rb~ +5 -0
  46. data/lib/maven/gwt/web.xml~ +37 -0
  47. data/lib/rack/gwt/rack_gwt.rb~ +7 -0
  48. data/lib/rack/gwt/static.rb +58 -0
  49. data/lib/rack/gwt/static.rb~ +28 -0
  50. metadata +188 -0
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Kristian Meier
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ # jetty run [![Build Status](https://secure.travis-ci.org/mkristian/jetty-run.png)](http://travis-ci.org/mkristian/jetty-run) #
2
+
3
+ ## install ##
4
+
5
+ first uninstall older ruby-maven (< 3.0.4.0.29.0) if present, they will otherwise conflict with gwt command
6
+
7
+ $ gem uninstall ruby-maven
8
+ $ gem install gwt-run
9
+
10
+ ## usage with rails ##
11
+
12
+ $ cd my_rails_app
13
+ $ jruby -S bundle install
14
+ $ jetty-run
15
+
16
+ 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.
17
+
18
+ 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).
19
+
20
+ 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.
21
+
22
+ to customize jetty you can use the _Mavenfile_ which allows to reconfigure jetty-maven-plugin:
23
+
24
+ properties['jetty.version'] = '7.5.1.v20110908'
25
+
26
+ TODO more advanced example and current config
27
+
28
+ ## running any given war-file ##
29
+
30
+ jetty-run war /path/to/war-file
31
+
32
+ with this you warble your warfile and use jetty-run to start it with jetty.
33
+
34
+ ## more ##
35
+
36
+ see
37
+
38
+ jetty-run help
39
+
40
+ # note #
41
+
42
+ 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 . . .
43
+
44
+ # meta-fu #
45
+
46
+ bug-reports and pull request are most welcome.
47
+
data/bin/gwt ADDED
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env ruby
2
+ require 'maven/gwt/cli'
3
+ require 'maven/gwt/generator'
4
+ require 'thor'
5
+
6
+ class GwtCommand < Thor
7
+ no_tasks do
8
+ def mvn
9
+ @mvn ||= Maven::Gwt::Cli.new
10
+ end
11
+
12
+ def exec( *args )
13
+ ARGV.clear # clean up in case another script gets executed
14
+ mvn.exec( args )
15
+ end
16
+
17
+ def maven_args
18
+ args = ARGV.dup
19
+ if i = args.index("--")
20
+ maven_args = args[i..-1]
21
+ end
22
+ maven_args ||= []
23
+ if options[ :pom ]
24
+ maven_args << '--pom'
25
+ maven_args << options[ :pom ]
26
+ end
27
+ maven_args
28
+ end
29
+ end
30
+
31
+ desc "[run]", "runs gwt development shell with either rails filesystem layout or with config.ru"
32
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
33
+ def server( *args )
34
+ exec( *( [ 'gwt:run' ] + maven_args ) )
35
+ end
36
+
37
+ desc "[codeserver]", "starts the gwt codeserver on its default port"
38
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
39
+ def codeserver(*args)
40
+ exec( *( [ 'gwt:run-codeserver' ] + maven_args ) )
41
+ end
42
+
43
+ desc "pom", "dump the gwt pom into pom.xml"
44
+ method_option :force, :type => :boolean, :default => false, :desc => 'force to overwrite pom.xml'
45
+ def pom(*args)
46
+ if File.exists?('pom.xml') && !options[:force]
47
+ warn "abort. pom.xml already exist. use --force to overwrite"
48
+ else
49
+ mvn.dump_pom(options[:force])
50
+ end
51
+ end
52
+
53
+ desc "setup JAVA_PACKAGE [APP_NAME]", 'setup gwt files. if the is no APP_NAME then the last part of the JAVA_PAKAGE will be the gwt_module name. the entry-point class will be in "client" subpackage'
54
+ def setup( java_package, app_name = nil )
55
+ gen = Maven::Gwt::Generator.new
56
+ gen.setup( java_package, app_name )
57
+ end
58
+
59
+ desc 'clean', "deleted the target directory and cleans up the generated files in public directory"
60
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
61
+ def clean
62
+ exec( *( [ 'clean', 'gwt:clean' ] + maven_args ) )
63
+ end
64
+
65
+ desc "compiles", "compiles the gwt java code to javascript"
66
+ method_option :env, :aliases => '-e', :type => :string, :desc => 'development or production'
67
+ method_option :force, :type => :boolean, :desc => 'force compilation. default: false'
68
+ method_option :strict, :type => :boolean, :desc => 'strict compile. default: false'
69
+ method_option :style, :type => :string, :desc => 'javascript style: DETAILED, PRETTY, OBF, OBFUSCATED. default: DETAILED (development), OBF (production)'
70
+ method_option :log_level, :type => :string, :desc => 'log level: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL. default: INFO'
71
+ def compile
72
+ args = [ 'compile' ]
73
+ if value = options[:force]
74
+ args << "-Dgwt.compiler.force=#{value}"
75
+ end
76
+ if value = options[:strict]
77
+ args << "-Dgwt.compiler.strict=#{value}"
78
+ end
79
+ if value = options[:style]
80
+ args << "-Dgwt.style=#{value}"
81
+ end
82
+ if value = options[:log_level]
83
+ args << "-Dgwt.logLevel=#{value}"
84
+ end
85
+ if value = options[:env]
86
+ args << "-P#{value}"
87
+ end
88
+ p args
89
+ exec( *( args + maven_args ) )
90
+ end
91
+ end
92
+ if i = ARGV.index('run')
93
+ ARGV[i] = 'server'
94
+ end
95
+ unless ARGV[0] =~ /^[a-z]/
96
+ ARGV.insert(0, 'server')
97
+ end
98
+ GwtCommand.start
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env ruby
2
+ require 'maven/gwt/cli'
3
+ require 'maven/gwt/generator'
4
+ require 'thor'
5
+
6
+ class GwtCommand < Thor
7
+ no_tasks do
8
+ def mvn
9
+ @mvn ||= Maven::Gwt::Cli.new
10
+ end
11
+
12
+ def exec( *args )
13
+ ARGV.clear # clean up in case another script gets executed
14
+ mvn.exec( args )
15
+ end
16
+
17
+ def maven_args
18
+ args = ARGV.dup
19
+ if i = args.index("--")
20
+ maven_args = args[i..-1]
21
+ end
22
+ maven_args ||= []
23
+ if options[ :pom ]
24
+ maven_args << '--pom'
25
+ maven_args << options[ :pom ]
26
+ end
27
+ maven_args
28
+ end
29
+ end
30
+
31
+ desc "[run]", "runs gwt development shell with either rails filesystem layout or with config.ru"
32
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
33
+ def server( *args )
34
+ exec( *( [ 'gwt:run' ] + maven_args ) )
35
+ end
36
+
37
+ desc "[codeserver]", "starts the gwt codeserver on its default port"
38
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
39
+ def codeserver(*args)
40
+ exec( *( [ 'gwt:run-codeserver' ] + maven_args ) )
41
+ end
42
+
43
+ desc "pom", "dump the gwt pom into pom.xml"
44
+ method_option :force, :type => :boolean, :default => false, :desc => 'force to overwrite pom.xml'
45
+ def pom(*args)
46
+ if File.exists?('pom.xml') && !options[:force]
47
+ warn "abort. pom.xml already exist. use --force to overwrite"
48
+ else
49
+ mvn.dump_pom(options[:force])
50
+ end
51
+ end
52
+
53
+ desc "setup JAVA_PACKAGE [APP_NAME]", 'setup gwt files. if the is no APP_NAME then the last part of the JAVA_PAKAGE will be the gwt_module name. the entry-point class will be in "client" subpackage'
54
+ def setup( java_package, app_name = nil )
55
+ gen = Maven::Gwt::Generator.new
56
+ gen.setup( java_package, app_name )
57
+ end
58
+
59
+ desc 'clean', "deleted the target directory and cleans up the generated files in public directory"
60
+ method_option :pom, :type => :string, :default => '.gwt-pom.xml', :desc => 'name of pom file which get generated (gwt-run just generates a pom.xml which gets execued by maven)'
61
+ def clean
62
+ exec( *( [ 'clean', 'gwt:clean' ] + maven_args ) )
63
+ end
64
+
65
+ desc "compiles", "compiles the gwt java code to javascript"
66
+ method_option :env, :aliases => '-e', :type => :string, :desc => 'development or production'
67
+ method_option :force, :type => :boolean, :desc => 'force compilation. default: false'
68
+ method_option :strict, :type => :boolean, :desc => 'strict compile. default: false'
69
+ method_option :style, :type => :string, :desc => 'javascript style: DETAILED, PRETTY, OBF, OBFUSCATED. default: DETAILED (development), OBF (production)'
70
+ method_option :log_level, :type => :string, :desc => 'log level: INFO, DEBUG. default: INFO'
71
+ def compile
72
+ args = []
73
+ args << 'gwt:clean' if options[ :force ]
74
+ args << 'compile'
75
+ args << 'gwt:compile'
76
+ if value = options[:strict]
77
+ args << "-Dgwt.compile.strict=#{value}"
78
+ end
79
+ if value = options[:style]
80
+ args << "-Dgwt.style=#{value}"
81
+ end
82
+ if value = options[:log_level]
83
+ args << "-Dgwt.logLevel=#{value}"
84
+ end
85
+ if value = options[:env]
86
+ args << "-P#{value}"
87
+ end
88
+ exec( *( args + maven_args ) )
89
+ end
90
+ end
91
+ if i = ARGV.index('run')
92
+ ARGV[i] = 'server'
93
+ end
94
+ unless ARGV[0] =~ /^[a-z]/
95
+ ARGV.insert(0, 'server')
96
+ end
97
+ GwtCommand.start
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+ require 'maven/jetty/ruby_maven'
3
+ require 'thor'
4
+
5
+ class JettyCommand < Thor
6
+ no_tasks do
7
+ def mvn
8
+ @mvn ||= Maven::Jetty::RubyMaven.new
9
+ end
10
+
11
+ def exec(*args)
12
+ ARGV.clear # clean up in case another script gets executed
13
+ mvn.exec(args)
14
+ end
15
+ end
16
+
17
+ desc "[run]", "runs jetty with a rails filesystem layout"
18
+ method_option :environment, :aliases => '-e', :type => :string, :required => false, :desc => 'rails environment'
19
+ method_option :port, :type => :numeric, :default => 8080, :desc => 'http port'
20
+ method_option :sslport, :type => :numeric, :default => 8443, :desc => 'https port'
21
+ def server(*args)
22
+ args = ARGV.dup
23
+ args.delete('server')
24
+ if i = args.index("--")
25
+ maven_args = args[i..-1]
26
+ end
27
+ maven_args ||= []
28
+ maven_args << "-Drails.env=#{options[:environment]}" if options[:environment]
29
+ maven_args << "-Djetty.port=#{options[:port]}"
30
+ maven_args << "-Djetty.sslport=#{options[:sslport]}"
31
+ exec(*(["jetty:run", "-Prun"] + maven_args))
32
+ end
33
+
34
+ desc "war WARFILE", "runs jetty with a given warfile"
35
+ method_option :port, :type => :numeric, :default => 8080, :desc => 'http port'
36
+ method_option :sslport, :type => :numeric, :default => 8443, :desc => 'https port'
37
+ def war(file, *args)
38
+ args = ARGV.dup
39
+ if i = args.index("--")
40
+ maven_args = args[i..-1]
41
+ end
42
+ maven_args ||= []
43
+ maven_args << "-Djetty.war=#{file}"
44
+ maven_args << "-Djetty.port=#{options[:port]}"
45
+ maven_args << "-Djetty.sslport=#{options[:sslport]}"
46
+ exec(*(["jetty:deploy-war", "-Pwar"] + maven_args))
47
+ end
48
+
49
+ desc "pom", "dump the pom used into pom.xml"
50
+ method_option :force, :type => :boolean, :default => false, :desc => 'force to overwrite pom.xml'
51
+ def pom(*args)
52
+ if File.exists?('pom.xml') && !options[:force]
53
+ warn "abort. pom.xml already exist. use --force to overwrite"
54
+ else
55
+ mvn.dump_pom(options[:force])
56
+ end
57
+ end
58
+
59
+ def help(*args)
60
+ super(*args)
61
+ goal =
62
+ case args[0]
63
+ when 'server'
64
+ 'run'
65
+ when 'war'
66
+ 'deploy-war'
67
+ end
68
+ # TODO not sure whether or not these options are needed/helpful
69
+ # if goal
70
+ # puts
71
+ # puts "Maven Options: (from jetty maven plugin)"
72
+ # exec ["jetty:help", "-Ddetail=true", "-Dgoal=#{goal}"]
73
+ # end
74
+ end
75
+
76
+ end
77
+ if i = ARGV.index('run')
78
+ ARGV[i] = 'server'
79
+ end
80
+ #p ARGV.detect {|a| p a ;a =~ /^[a-z]/ }
81
+ unless ARGV[0] =~ /^[a-z]/
82
+ ARGV.insert(0, 'server')
83
+ end
84
+ JettyCommand.start
@@ -0,0 +1,21 @@
1
+ #
2
+ # Copyright (C) 2013 Christian Meier
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ # this software and associated documentation files (the "Software"), to deal in
6
+ # the Software without restriction, including without limitation the rights to
7
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ # the Software, and to permit persons to whom the Software is furnished to do so,
9
+ # subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ #
21
+ require 'gwt_run'
@@ -0,0 +1 @@
1
+ require 'jetty_run'
@@ -0,0 +1,21 @@
1
+ #
2
+ # Copyright (C) 2013 Christian Meier
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ # this software and associated documentation files (the "Software"), to deal in
6
+ # the Software without restriction, including without limitation the rights to
7
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ # the Software, and to permit persons to whom the Software is furnished to do so,
9
+ # subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ #
21
+ require 'maven/gwt/version'
@@ -0,0 +1 @@
1
+ require 'maven/jetty/version'
@@ -0,0 +1 @@
1
+ require 'maven_tools'
@@ -0,0 +1 @@
1
+ require 'maven/tools/jarfile'
@@ -0,0 +1,68 @@
1
+ #-*- mode: ruby -*-
2
+
3
+ jar('org.jruby.rack:jruby-rack', '1.1.13.1').exclusions << 'org.jruby:jruby-complete'
4
+ if defined?( JRUBY_VERSION ) && JRUBY_VERSION =~ /^1\.7\./
5
+ jar("org.jruby:jruby-core", "${jruby.version}")
6
+ else
7
+ jar("org.jruby:jruby-complete", "${jruby.version}")
8
+ end
9
+ jar('com.google.gwt:gwt-user', '${gwt.version}').scope :provided
10
+
11
+ jar('org.fusesource.restygwt:restygwt', '1.3').scope :provided
12
+ jar('javax.ws.rs:jsr311-api', '1.1').scope :provided
13
+ jar('com.google.gwt.inject:gin', '1.5.0').scope :provided
14
+ jar('javax.validation:validation-api', '1.0.0.GA').scope :provided
15
+ jar('javax.validation:validation-api', '1.0.0.GA', 'sources').scope :provided
16
+
17
+ plugin( :compiler, '3.0' ).with( :source => '1.6', :target => '1.6' )
18
+
19
+ plugin('org.codehaus.mojo:gwt-maven-plugin', '${gwt.version}') do |gwt|
20
+ gwt.with({ :warSourceDirectory => "${basedir}/public",
21
+ :webXml => "${basedir}/public/WEB-INF/web.xml",
22
+ :webappDirectory => "${basedir}/public",
23
+ :hostedWebapp => "${basedir}/public",
24
+ :inplace => true,
25
+ :logLevel => "INFO",
26
+ :treeLogger => true,
27
+ :extraJvmArgs => "-Xmx512m",
28
+ :gen => "${project.build.directory}/generated",
29
+ :runTarget => "APP_NAME.html",
30
+ :module => 'GWT_MODULEDevelopment',
31
+ :style => "DETAILED",
32
+ :includes => "**/GWT_MODULE_NAMEGWTTestSuite.java",
33
+ :draftCompile => true
34
+ })
35
+ gwt.in_phase( :'integration-test' ).execute_goal( 'test' )
36
+ gwt.in_phase( :compile ).execute_goal( 'compile' )
37
+ gwt.in_phase( :clean ).execute_goal( 'clean' )
38
+ end
39
+
40
+ profile :development do |p|
41
+ # will go in future
42
+ end
43
+
44
+ profile :production do |p|
45
+ p.plugin('org.codehaus.mojo:gwt-maven-plugin', '${gwt.version}') do |gwt|
46
+ gwt.with({ :module => 'GWT_MODULE',
47
+ :style => "OBF",
48
+ :draftCompile => false,
49
+ :disableClassMetadata => true,
50
+ :disableCastChecking => true,
51
+ :optimizationLevel => 9})
52
+ end
53
+ end
54
+
55
+ #-- Macs need the -d32 -XstartOnFirstThread jvm options -->
56
+ profile("mac") do |mac|
57
+ mac.activation.os.family "mac"
58
+ mac.plugin('org.codehaus.mojo:gwt-maven-plugin', '${gwt.version}').with(:extraJvmArgs => "-d32 -XstartOnFirstThread -Xmx512m")
59
+ end
60
+
61
+ # lock down versions
62
+ properties['gwt.version'] = '2.5.1-rc1'
63
+ properties['jruby.version'] = '1.7.3'
64
+ properties['jruby.plugins.version'] = '0.29.4'
65
+ # jetty version to run it in standalone jetty via jetty-run
66
+ properties['jetty.version'] = '8.1.9.v20130131'
67
+
68
+ # vim: syntax=Ruby