vraptor-scaffold 1.3.0.rc → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/.rvmrc.example +1 -0
  2. data/.travis.yml +2 -1
  3. data/CHANGELOG.rdoc +22 -3
  4. data/Rakefile +2 -2
  5. data/lib/vraptor-scaffold.rb +1 -1
  6. data/lib/vraptor-scaffold/generators/app/app_generator.rb +23 -56
  7. data/lib/vraptor-scaffold/generators/app/dependency/default_dependencies.rb +44 -0
  8. data/lib/vraptor-scaffold/generators/app/{dependency.rb → dependency/dependency.rb} +0 -0
  9. data/lib/vraptor-scaffold/generators/app/dependency/dependency_manager.rb +25 -0
  10. data/lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb +49 -0
  11. data/lib/vraptor-scaffold/generators/app/dependency/heroku_dependencies.rb +48 -0
  12. data/lib/vraptor-scaffold/generators/app/freemarker_template_engine.rb +7 -5
  13. data/lib/vraptor-scaffold/generators/app/gae_app_generator.rb +145 -0
  14. data/lib/vraptor-scaffold/generators/app/jsp_template_engine.rb +6 -5
  15. data/lib/vraptor-scaffold/generators/app/templates/build-gae.xml +144 -0
  16. data/lib/vraptor-scaffold/generators/app/templates/build.gradle.erb +4 -4
  17. data/lib/vraptor-scaffold/generators/app/templates/eclipse/classpath-gae.erb +1 -3
  18. data/lib/vraptor-scaffold/generators/app/templates/eclipse/classpath.erb +1 -1
  19. data/lib/vraptor-scaffold/generators/app/templates/eclipse/project-gae.erb +2 -2
  20. data/lib/vraptor-scaffold/generators/app/templates/eclipse/settings-gae/com.google.appengine.eclipse.core.prefs +4 -0
  21. data/lib/vraptor-scaffold/generators/app/templates/eclipse/settings-gae/com.google.gdt.eclipse.core.prefs +1 -2
  22. data/lib/vraptor-scaffold/generators/app/templates/freemarker/macros/html.ftl +12 -0
  23. data/lib/vraptor-scaffold/generators/app/templates/freemarker/main.ftl.erb +18 -0
  24. data/lib/vraptor-scaffold/generators/app/templates/gae/appengine-web.xml.tt +1 -0
  25. data/lib/vraptor-scaffold/generators/app/templates/gae/ivysettings.xml +1 -1
  26. data/lib/vraptor-scaffold/generators/app/templates/gitignore-gae +4 -0
  27. data/lib/vraptor-scaffold/generators/app/templates/ivy.erb +3 -3
  28. data/lib/vraptor-scaffold/generators/app/templates/jsp/main.jsp.erb +20 -0
  29. data/lib/vraptor-scaffold/generators/app/templates/pom.erb +3 -3
  30. data/lib/vraptor-scaffold/generators/app/templates/vraptor-scaffold-gae.erb +7 -0
  31. data/lib/vraptor-scaffold/generators/base.rb +21 -0
  32. data/lib/vraptor-scaffold/generators/scaffold/attribute.rb +7 -1
  33. data/lib/vraptor-scaffold/generators/scaffold/base_scaffold.rb +18 -0
  34. data/lib/vraptor-scaffold/generators/scaffold/controller_generator/templates/controller.erb +26 -1
  35. data/lib/vraptor-scaffold/generators/scaffold/controller_generator/templates/controller_test.erb +1 -1
  36. data/lib/vraptor-scaffold/generators/scaffold/import_manager.rb +20 -0
  37. data/lib/vraptor-scaffold/generators/scaffold/model_generator/templates/model.erb +7 -4
  38. data/lib/vraptor-scaffold/generators/scaffold/model_generator/templates/objectify_model.erb +3 -3
  39. data/lib/vraptor-scaffold/generators/scaffold/template_engine_generator/freemarker_generator/templates/form.erb +8 -0
  40. data/lib/vraptor-scaffold/generators/scaffold/template_engine_generator/jsp_generator/templates/form.erb +13 -3
  41. data/lib/vraptor-scaffold/load_paths.rb +3 -3
  42. data/lib/vraptor-scaffold/runner/generator.rb +11 -1
  43. data/lib/vraptor-scaffold/runner/start.rb +1 -1
  44. data/lib/vraptor-scaffold/version.rb +1 -1
  45. data/maven/repo/br/com/caelum/vraptor3.4-compatible-gae/1.1/vraptor3.4-compatible-gae-1.1.jar +0 -0
  46. data/spec/spec_helper.rb +9 -1
  47. data/spec/vraptor-scaffold/generators/app/app_generator_spec.rb +47 -99
  48. data/spec/vraptor-scaffold/generators/app/dependency/dependency_manager_spec.rb +21 -0
  49. data/spec/vraptor-scaffold/generators/app/{dependency_spec.rb → dependency/dependency_spec.rb} +4 -4
  50. data/spec/vraptor-scaffold/generators/app/dependency/gae_dependencies_spec.rb +20 -0
  51. data/spec/vraptor-scaffold/generators/app/dependency/heroku_dependencies_spec.rb +20 -0
  52. data/spec/vraptor-scaffold/generators/app/freemarker_template_engine_spec.rb +49 -7
  53. data/spec/vraptor-scaffold/generators/app/gae_app_generator_spec.rb +286 -0
  54. data/spec/vraptor-scaffold/generators/app/jsp_template_engine_spec.rb +49 -7
  55. data/spec/vraptor-scaffold/generators/app/templates/build.gradle +6 -6
  56. data/spec/vraptor-scaffold/generators/app/templates/classpath-gae +1 -3
  57. data/spec/vraptor-scaffold/generators/app/templates/gae-jsp-web.xml +1 -1
  58. data/spec/vraptor-scaffold/generators/app/templates/ivy-gae.xml +8 -6
  59. data/spec/vraptor-scaffold/generators/app/templates/ivy.xml +5 -5
  60. data/{lib/vraptor-scaffold/generators/app/templates/freemarker/main.ftl → spec/vraptor-scaffold/generators/app/templates/main-with-jquery.ftl} +0 -0
  61. data/{lib/vraptor-scaffold/generators/app/templates/jsp/main.jsp → spec/vraptor-scaffold/generators/app/templates/main-with-jquery.jsp} +0 -0
  62. data/spec/vraptor-scaffold/generators/app/templates/main-without-jquery.ftl +14 -0
  63. data/spec/vraptor-scaffold/generators/app/templates/main-without-jquery.jsp +16 -0
  64. data/spec/vraptor-scaffold/generators/app/templates/pom-heroku.xml +5 -5
  65. data/spec/vraptor-scaffold/generators/app/templates/pom.xml +5 -5
  66. data/spec/vraptor-scaffold/generators/app/templates/project-gae +2 -2
  67. data/spec/vraptor-scaffold/generators/app/templates/vraptor-scaffold-gae.properties +7 -0
  68. data/spec/vraptor-scaffold/generators/plugin/expected_configs/build.gradle +7 -7
  69. data/spec/vraptor-scaffold/generators/plugin/expected_configs/default_org_build.gradle +6 -6
  70. data/spec/vraptor-scaffold/generators/plugin/expected_configs/default_org_ivy.xml +5 -5
  71. data/spec/vraptor-scaffold/generators/plugin/expected_configs/default_org_pom.xml +5 -5
  72. data/spec/vraptor-scaffold/generators/plugin/expected_configs/ivy.xml +6 -6
  73. data/spec/vraptor-scaffold/generators/plugin/expected_configs/pom.xml +6 -6
  74. data/spec/vraptor-scaffold/generators/plugin/plugin_generator_spec.rb +7 -7
  75. data/spec/vraptor-scaffold/generators/scaffold/attribute_spec.rb +198 -181
  76. data/spec/vraptor-scaffold/generators/scaffold/base_scaffold_spec.rb +7 -1
  77. data/spec/vraptor-scaffold/generators/scaffold/controller_generator/templates/ProductController.java +9 -1
  78. data/spec/vraptor-scaffold/generators/scaffold/freemarker_generator/templates/form.ftl +15 -0
  79. data/spec/vraptor-scaffold/generators/scaffold/import_manager_spec.rb +9 -0
  80. data/spec/vraptor-scaffold/generators/scaffold/jsp_generator/templates/form.jsp +23 -3
  81. data/spec/vraptor-scaffold/generators/scaffold/model_generator/model_generator_spec.rb +2 -2
  82. data/spec/vraptor-scaffold/generators/scaffold/model_generator/objectify_model_generator_spec.rb +6 -6
  83. data/spec/vraptor-scaffold/generators/scaffold/model_generator/templates/Objectify_Product.java +23 -5
  84. data/spec/vraptor-scaffold/generators/scaffold/model_generator/templates/Product.java +24 -6
  85. data/spec/vraptor-scaffold/http_request_spec.rb +10 -0
  86. data/spec/vraptor-scaffold/runner/generator_spec.rb +18 -2
  87. metadata +86 -30
  88. data/lib/vraptor-scaffold/generators/app/dependency_manager.rb +0 -83
  89. data/spec/vraptor-scaffold/generators/app/dependency_manager_spec.rb +0 -34
@@ -0,0 +1,145 @@
1
+ class GaeAppGenerator < VraptorScaffold::Base
2
+
3
+ argument :project_path
4
+
5
+ class_option :package, :default => "app", :aliases => "-p",
6
+ :desc => "Define base package"
7
+
8
+ class_option :models_package, :aliases => "-m", :default => "models",
9
+ :desc => "Define models package"
10
+
11
+ class_option :controllers_package, :aliases => "-c", :default => "controllers",
12
+ :desc => "Define controllers package"
13
+
14
+ class_option :repositories_package, :aliases => "-r", :default => "repositories",
15
+ :desc => "Define repositories package"
16
+
17
+ class_option :skip_jquery, :type => :boolean, :aliases => "-j",
18
+ :desc => "Skip jQuery download file"
19
+
20
+ class_option :skip_eclipse, :type => :boolean, :aliases => "-E",
21
+ :desc => "Skip Eclipse files"
22
+
23
+ def self.source_root
24
+ File.join File.dirname(__FILE__), "templates"
25
+ end
26
+
27
+ def initialize(args, opts=[])
28
+ super([args], opts)
29
+ validate
30
+ self.destination_root=(project_path)
31
+ @project_name = project_path.split("/").last
32
+ @dependencies = DependencyManager.new({:gae => true}).dependencies
33
+ end
34
+
35
+ def create_root_folder
36
+ empty_directory "."
37
+ end
38
+
39
+ def configure_ant
40
+ create_eclipse_files unless options[:skip_eclipse]
41
+ copy_file("gitignore-gae", ".gitignore")
42
+ copy_file("build-gae.xml", "build.xml")
43
+ template("build.properties.erb", "build.properties")
44
+ template("ivy.erb", "ivy.xml")
45
+ copy_file(AppGenerator::IVY_JAR)
46
+ copy_file("gae/ivysettings.xml", "ivysettings.xml")
47
+ end
48
+
49
+ def configure_vraptor_packages
50
+ @vraptor_packages = ["br.com.caelum.vraptor.gae"]
51
+ end
52
+
53
+ def create_main_java
54
+ empty_directory Configuration::MAIN_SRC
55
+ @src = File.join(Configuration::MAIN_SRC, options[:package].gsub(".", File::Separator))
56
+ end
57
+
58
+ def create_controllers_directory
59
+ empty_directory File.join @src, options[:controllers_package]
60
+ end
61
+
62
+ def create_models_directory
63
+ empty_directory File.join(@src, options[:models_package])
64
+ end
65
+
66
+ def create_repositories_directory
67
+ repositories_folder = File.join @src, options[:repositories_package]
68
+ empty_directory repositories_folder
69
+ template("orm/Repository-objectify.java.tt", "#{repositories_folder}/Repository.java")
70
+ end
71
+
72
+ def create_main_resources
73
+ directory("resources", Configuration::MAIN_RESOURCES)
74
+ end
75
+
76
+ def configure_orm
77
+ infra_folder = File.join @src, "infra"
78
+ empty_directory infra_folder
79
+ template("gae/ObjectifyFactory.java.tt", "#{@src}/infra/ObjectifyFactory.java")
80
+ end
81
+
82
+ def create_webapp
83
+ directory("webapp", Configuration::WEB_APP)
84
+ template("gae/appengine-web.xml.tt", "#{Configuration::WEB_INF}/appengine-web.xml")
85
+ copy_file("gae/logging.properties", "#{Configuration::WEB_INF}/logging.properties")
86
+ end
87
+
88
+ def create_javascripts
89
+ javascripts = File.join Configuration::WEB_APP, "javascripts"
90
+ create_file File.join javascripts, "application.js"
91
+ unless options[:skip_jquery]
92
+ jquery = get_jquery
93
+ add_file (File.join javascripts, "jquery.min.js"), jquery.body if jquery
94
+ end
95
+ end
96
+
97
+ def configure_scaffold_properties
98
+ template("vraptor-scaffold-gae.erb", Configuration::FILENAME)
99
+ end
100
+
101
+ def configure_template_engine
102
+ JspTemplateEngine.new(project_path, @options).configure
103
+ end
104
+
105
+ def create_test
106
+ empty_directory Configuration::TEST_SRC
107
+ test_src = File.join(Configuration::TEST_SRC, options[:package].gsub(".", File::Separator))
108
+
109
+ empty_directory File.join test_src, options[:controllers_package]
110
+ empty_directory File.join test_src, options[:models_package]
111
+ empty_directory File.join test_src, options[:repositories_package]
112
+
113
+ directory("resources-test", Configuration::TEST_RESOURCES)
114
+ end
115
+
116
+ private
117
+ def orm
118
+ return "objectify"
119
+ end
120
+
121
+ def create_eclipse_files
122
+ template("eclipse/classpath-gae.erb", ".classpath")
123
+ template("eclipse/project-gae.erb", ".project")
124
+ directory("eclipse/settings-gae", ".settings")
125
+ end
126
+
127
+ def validate
128
+ if File.directory? project_path
129
+ puts "The project #{project_path} already exist"
130
+ Kernel::exit
131
+ end
132
+ end
133
+
134
+ def jquery_uri
135
+ "/ajax/libs/jquery/1/jquery.min.js"
136
+ end
137
+
138
+ def get_jquery
139
+ begin
140
+ VraptorScaffold::HttpRequest.open_session("ajax.googleapis.com").get jquery_uri;
141
+ rescue
142
+ Kernel.puts "Was not possible to download jQuery."
143
+ end
144
+ end
145
+ end
@@ -4,14 +4,15 @@ class JspTemplateEngine < VraptorScaffold::Base
4
4
  File.join(File.dirname(__FILE__), "templates", "jsp")
5
5
  end
6
6
 
7
- def initialize(project_path)
7
+ def initialize(project_path, options)
8
8
  super
9
9
  self.destination_root=(project_path)
10
+ @options = options
10
11
  end
11
12
 
12
13
  def configure
13
14
  template("../decorators.erb", File.join(Configuration::WEB_INF, "decorators.xml"))
14
- copy_file("main.jsp", File.join(Configuration::WEB_INF, decorators_path, "main.jsp"))
15
+ template("main.jsp.erb", File.join(Configuration::WEB_INF, decorators_path, "main.jsp"))
15
16
  copy_file("prelude.jspf", File.join(Configuration::WEB_INF, "jsp", "prelude.jspf"))
16
17
  append_prelude_config
17
18
  end
@@ -19,15 +20,15 @@ class JspTemplateEngine < VraptorScaffold::Base
19
20
  def extension
20
21
  "jsp"
21
22
  end
22
-
23
+
23
24
  def decorators_path
24
25
  File.join "jsp", "decorators"
25
26
  end
26
-
27
+
27
28
  private
28
29
  def append_prelude_config
29
30
  file = File.join(Configuration::WEB_INF, "web.xml")
30
31
  template = File.join JspTemplateEngine.source_root, "jsp-web.xml"
31
32
  inject_into_file(file, File.read(template), :before => "</web-app>", :verbose => false)
32
33
  end
33
- end
34
+ end
@@ -0,0 +1,144 @@
1
+ <project name="vraptor-scaffold" default="war" xmlns:ivy="antlib:org.apache.ivy.ant">
2
+
3
+ <property file="build.properties" />
4
+
5
+ <!-- paths -->
6
+ <path id="lib.path.id">
7
+ <fileset dir="${lib.dir}" />
8
+ <fileset dir="lib/provided" />
9
+ </path>
10
+ <path id="test.path.id">
11
+ <fileset dir="lib/test" />
12
+ <path refid="lib.path.id" />
13
+ <pathelement location="${test.build.dir}" />
14
+ <pathelement location="${build.dir}" />
15
+ </path>
16
+
17
+ <!-- =================================
18
+ target: resolve
19
+ ================================= -->
20
+ <target name="resolve" description="--> retrieve dependencies with ivy">
21
+ <path id="ivy.lib.path">
22
+ <pathelement location="${ivy.jar.file}" />
23
+ </path>
24
+ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
25
+
26
+ <ivy:retrieve pattern="lib/[conf]/[artifact]-[revision].[ext]" sync="true" />
27
+ <delete dir="${lib.dir}" includes="**/*.*" />
28
+ <copy todir="${lib.dir}">
29
+ <fileset dir="lib/default">
30
+ <include name="*.jar" />
31
+ </fileset>
32
+ </copy>
33
+ </target>
34
+
35
+ <!-- =================================
36
+ target: compile
37
+ ================================= -->
38
+ <target name="compile" depends="resolve" description="--> compile">
39
+ <mkdir dir="${build.dir}" />
40
+ <delete dir="${build.dir}" includes="**/*.*" />
41
+ <javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" debug="on" />
42
+ <copy todir="${build.dir}">
43
+ <fileset dir="${resources.dir}">
44
+ <include name="**/*.*" />
45
+ </fileset>
46
+ </copy>
47
+ </target>
48
+
49
+ <!-- =================================
50
+ target: vraptor-scanning - By Otávio Scherer Garcia
51
+ ================================= -->
52
+ <target name="vraptor-scanning" depends="compile">
53
+ <path id="build.classpath">
54
+ <fileset dir="src/main/webapp/WEB-INF/lib" includes="*.jar" />
55
+ </path>
56
+
57
+ <java classpathref="build.classpath" classname="br.com.caelum.vraptor.scan.VRaptorStaticScanning" fork="true">
58
+ <arg value="src/main/webapp/WEB-INF/web.xml" />
59
+ <classpath refid="build.classpath" />
60
+ <classpath path="src/main/webapp/WEB-INF/classes" />
61
+ </java>
62
+ </target>
63
+
64
+ <!-- =================================
65
+ target: compile test
66
+ ================================= -->
67
+ <target name="compile-test" depends="compile" description="--> compile test">
68
+ <mkdir dir="${test.build.dir}" />
69
+ <delete dir="${test.build.dir}" includes="**/*.*" />
70
+ <javac srcdir="${test.src.dir}" destdir="${test.build.dir}" classpathref="test.path.id" debug="on" />
71
+ <copy todir="${test.build.dir}">
72
+ <fileset dir="${test.resources.dir}">
73
+ <include name="**/*.*" />
74
+ </fileset>
75
+ </copy>
76
+ </target>
77
+
78
+ <!-- =================================
79
+ target: run tests
80
+ ================================= -->
81
+ <target name="test" depends="compile-test" description="--> run all tests">
82
+ <mkdir dir="${output.dir}/test-results" />
83
+ <junit haltonfailure="yes">
84
+ <batchtest fork="yes" todir="${output.dir}/test-results">
85
+ <fileset dir="${test.src.dir}">
86
+ <include name="**/*Test.java" />
87
+ </fileset>
88
+ </batchtest>
89
+ <formatter type="brief" usefile="false" />
90
+ <formatter type="xml" />
91
+ <classpath refid="test.path.id" />
92
+ </junit>
93
+ </target>
94
+
95
+ <!-- =================================
96
+ target: war
97
+ ================================= -->
98
+ <target name="war" description="--> generate war file" depends="test">
99
+ <war destfile="${output.dir}/${project.name}.war">
100
+ <zipfileset dir="${webapp.dir}" />
101
+ </war>
102
+ </target>
103
+
104
+ <!-- =================================
105
+ target: minify
106
+ ================================= -->
107
+ <target name="minify" depends="resolve" description="minify js and css">
108
+ <property name="yuicompressor.jar" value="lib/minify/yuicompressor-2.3.6.jar" />
109
+
110
+ <fileset dir="${js.dir}" includes="*.js" excludes="all.min.js" id="alljs" />
111
+ <fileset dir="${css.dir}" includes="*.css" excludes="*.min.css" id="allcss" />
112
+
113
+ <delete file="${css.dir}/all.css" />
114
+ <concat destfile="${css.dir}/all.css" fixlastline="true">
115
+ <fileset refid="allcss" />
116
+ </concat>
117
+
118
+ <java jar="${yuicompressor.jar}" fork="true">
119
+ <arg value="${css.dir}/all.css" />
120
+ <arg value="-o" />
121
+ <arg value="${css.dir}/all.min.css" />
122
+ </java>
123
+
124
+ <delete file="${js.dir}/all.js" />
125
+ <concat destfile="${js.dir}/all.js" fixlastline="true">
126
+ <fileset refid="alljs" />
127
+ </concat>
128
+
129
+ <java jar="${yuicompressor.jar}" fork="true">
130
+ <arg value="${js.dir}/all.js" />
131
+ <arg value="-o" />
132
+ <arg value="${js.dir}/all.min.js" />
133
+ </java>
134
+ </target>
135
+
136
+ <!-- =================================
137
+ target: report
138
+ ================================= -->
139
+ <target name="report" depends="resolve" description="--> generates a report of dependencies">
140
+ <mkdir dir="${output.dir}/reports" />
141
+ <ivy:report todir="${output.dir}/reports" />
142
+ </target>
143
+
144
+ </project>
@@ -34,24 +34,24 @@ sourceSets {
34
34
  sourceSets.main.classesDir = new File('<%= Configuration::WEB_INF %>/classes')
35
35
 
36
36
  jettyRun.scanIntervalSeconds=3
37
- jettyRun.contextPath = '/'
37
+ jettyRun.contextPath = '/'
38
38
  [jettyRunWar,jettyStop]*.stopPort = 8081
39
39
  [jettyRunWar,jettyStop]*.stopKey = 'stopKey'
40
40
 
41
41
  dependencies {
42
- <% @dependency_manager.compile_scope.each do |dependency| -%>
42
+ <% @dependencies.compile_scope.each do |dependency| -%>
43
43
  compile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'<% if dependency.has_exclusions? %>, {<% dependency.exclusions.each do |exclusion| %>
44
44
  exclude group: '<%= exclusion.group %>', name: '<%= exclusion.name %>'<% end %>
45
45
  }<% end %>
46
46
  <% end -%>
47
47
 
48
48
  //Provided dependencies
49
- <% @dependency_manager.provided_scope.each do |dependency| -%>
49
+ <% @dependencies.provided_scope.each do |dependency| -%>
50
50
  providedCompile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'
51
51
  <% end -%>
52
52
 
53
53
  //Test dependencies
54
- <% @dependency_manager.test_scope.each do |dependency| -%>
54
+ <% @dependencies.test_scope.each do |dependency| -%>
55
55
  testCompile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'
56
56
  <% end -%>
57
57
  }
@@ -2,11 +2,9 @@
2
2
  <classpath>
3
3
  <classpathentry kind="src" path="src/main/java"/>
4
4
  <classpathentry kind="src" path="src/main/resources"/>
5
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
6
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
7
5
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
8
6
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
9
- <% @dependency_manager.test_scope.each do |dependency| %>
7
+ <% @dependencies.test_scope.each do |dependency| %>
10
8
  <classpathentry kind="lib" path="lib/test/<%= "#{dependency.name}-#{dependency.version}.jar" %>"/>
11
9
  <% end -%>
12
10
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
@@ -12,7 +12,7 @@
12
12
  </classpathentry>
13
13
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
14
14
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
15
- <% @dependency_manager.test_scope.each do |dependency| %>
15
+ <% @dependencies.test_scope.each do |dependency| %>
16
16
  <classpathentry kind="lib" path="lib/test/<%= "#{dependency.name}-#{dependency.version}.jar" %>"/>
17
17
  <% end -%>
18
18
  </classpath>
@@ -26,12 +26,12 @@
26
26
  </arguments>
27
27
  </buildCommand>
28
28
  <buildCommand>
29
- <name>com.google.appengine.eclipse.core.enhancerbuilder</name>
29
+ <name>com.google.appengine.eclipse.core.projectValidator</name>
30
30
  <arguments>
31
31
  </arguments>
32
32
  </buildCommand>
33
33
  <buildCommand>
34
- <name>com.google.appengine.eclipse.core.projectValidator</name>
34
+ <name>com.google.appengine.eclipse.core.enhancerbuilder</name>
35
35
  <arguments>
36
36
  </arguments>
37
37
  </buildCommand>
@@ -0,0 +1,4 @@
1
+ eclipse.preferences.version=1
2
+ gaeIsEclipseDefaultInstPath=true
3
+ googleCloudSqlEnabled=false
4
+ localDevMySqlEnabled=true
@@ -1,5 +1,4 @@
1
- #Sun Oct 23 00:00:26 BRST 2011
2
1
  eclipse.preferences.version=1
3
2
  jarsExcludedFromWebInfLib=
4
3
  warSrcDir=src/main/webapp
5
- warSrcDirIsOutput=false
4
+ warSrcDirIsOutput=true
@@ -14,6 +14,18 @@
14
14
  <textarea id="${name}" name="${name}" cols="40" rows="20">${value}</textarea>
15
15
  </#macro>
16
16
 
17
+ <#macro option value text="" selected=false>
18
+ <option value="${value}"<#if selected>selected="true"</#if> >${text}</option>
19
+ </#macro>
20
+
21
+ <#macro select name values check>
22
+ <select name="${name}">
23
+ <#list values as obj>
24
+ <#nested obj, check==obj.id>
25
+ </#list>
26
+ </select>
27
+ </#macro>
28
+
17
29
  <#macro css name>
18
30
  <link rel="stylesheet" type="text/css" href="${base}/stylesheets/${name}.css" />
19
31
  </#macro>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <@html.css "application"/>
6
+ <title>Vraptor Scaffold</title>
7
+ ${head}
8
+ </head>
9
+
10
+ <body>
11
+ ${body}
12
+ <%
13
+ jquery_file = File.join(destination_root, Configuration::WEB_APP, "javascripts", "jquery.min.js")
14
+ if (File.exists?(jquery_file))
15
+ %><@html.js "jquery.min"/>
16
+ <% end %><@html.js "application"/>
17
+ </body>
18
+ </html>