vraptor-scaffold 1.0.0 → 1.1.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -17
- data/Gemfile.lock +8 -10
- data/History.txt +18 -1
- data/Rakefile +3 -23
- data/bin/vraptor +1 -1
- data/lib/vraptor-scaffold.rb +25 -28
- data/lib/{configuration.rb → vraptor-scaffold/configuration.rb} +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/app_generator.rb +2 -1
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/dependency.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/dependency_manager.rb +4 -6
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/freemarker_template_engine.rb +3 -4
- data/lib/vraptor-scaffold/generators/app_generator/jsp_template_engine.rb +33 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/build.gradle.erb +1 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/build.properties.erb +2 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/build.xml +32 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/decorators.erb +1 -1
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/classpath.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/project.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/settings/org.eclipse.jdt.core.prefs +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/settings/org.eclipse.wst.common.component.tt +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/settings/org.eclipse.wst.common.project.facet.core.xml +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.container +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.name +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/freemarker/freemarker-web.xml +0 -1
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/freemarker/infrastructure/FreemarkerPathResolver.java.tt +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/freemarker/macros/html.ftl +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/freemarker/main.ftl +1 -1
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/ivy-2.2.0.jar +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/ivy.erb +5 -1
- data/lib/vraptor-scaffold/generators/app_generator/templates/ivysettings.xml +9 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/jsp/jsp-web.xml +7 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/jsp/main.jsp +16 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/jsp/prelude.jspf +3 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/pom.erb +8 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/resources-test/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/resources/META-INF/persistence.xml +2 -2
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/resources/log4j.properties +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/resources/messages.properties +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src-test/controllers/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src-test/models/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src-test/repositories/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src/controllers/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src/models/Entity.java.tt +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/src/repositories/Repository.java.tt +17 -12
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/vraptor-scaffold.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/webapp/WEB-INF/web.xml +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/webapp/images/.empty_directory +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/webapp/index.jsp +0 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/webapp/javascripts/jquery.min.js +16 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/webapp/stylesheets/common.css +3 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/webapp/stylesheets/reset.css +47 -0
- data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/webapp/stylesheets/scaffold.css +0 -0
- data/lib/vraptor-scaffold/generators/app_generator/templates/webapp/stylesheets/stylesheets.css +5 -0
- data/lib/{generators → vraptor-scaffold/generators}/base.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/attribute.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/base_scaffold.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/controller_generator/controller_generator.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/controller_generator/templates/controller.erb +9 -18
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/controller_generator/templates/controller_test.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/freemarker_generator.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/templates/edit.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/templates/form.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/templates/index.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/templates/new.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/freemarker_generator/templates/show.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/jsp_generator/jsp_generator.rb +1 -1
- data/lib/vraptor-scaffold/generators/scaffold_generator/jsp_generator/templates/edit.erb +6 -0
- data/lib/vraptor-scaffold/generators/scaffold_generator/jsp_generator/templates/form.erb +26 -0
- data/lib/vraptor-scaffold/generators/scaffold_generator/jsp_generator/templates/index.erb +36 -0
- data/lib/vraptor-scaffold/generators/scaffold_generator/jsp_generator/templates/new.erb +6 -0
- data/lib/vraptor-scaffold/generators/scaffold_generator/jsp_generator/templates/show.erb +14 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/model_generator/model_generator.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/model_generator/templates/model.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/model_generator/templates/model_test.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/repository_generator/repository_generator.rb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/repository_generator/templates/repository.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/repository_generator/templates/repository_impl.erb +1 -1
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/repository_generator/templates/repository_test.erb +0 -0
- data/lib/{generators → vraptor-scaffold/generators}/scaffold_generator/scaffold_generator.rb +0 -0
- data/lib/vraptor-scaffold/load_paths.rb +22 -0
- data/lib/vraptor-scaffold/version.rb +3 -0
- data/spec/{lib → vraptor-scaffold}/configuration_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/app_generator_spec.rb +6 -6
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/dependency_manager_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/dependency_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/freemarker_template_engine_spec.rb +4 -4
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/jsp_template_engine_spec.rb +12 -1
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/Entity.java +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/FreemarkerPathResolver.java +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/Repository.java +17 -12
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/build.gradle +4 -6
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/build.properties +2 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/decorators-jsp.xml +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/decorators.xml +0 -0
- data/spec/vraptor-scaffold/generators/app_generator/templates/freemarker-web.xml +60 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/ivy.xml +8 -7
- data/spec/vraptor-scaffold/generators/app_generator/templates/jsp-web.xml +45 -0
- data/spec/{lib → vraptor-scaffold}/generators/app_generator/templates/pom.xml +11 -18
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/attribute_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/base_scaffold_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/controller_generator/controller_generator_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/controller_generator/templates/ProductController.java +9 -18
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/freemarker_generator/freemarker_generator_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/jsp_generator/jsp_generator_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/model_generator/model_generator_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/model_generator/templates/Product.java +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/repository_generator/repository_generator_spec.rb +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/repository_generator/templates/ProductRepository.java +0 -0
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/repository_generator/templates/ProductRepositoryImpl.java +1 -1
- data/spec/{lib → vraptor-scaffold}/generators/scaffold_generator/scaffold_generator_spec.rb +0 -0
- data/spec/{lib/vraptor-scaffold_spec.rb → vraptor-scaffold_spec.rb} +14 -14
- data/vraptor-scaffold.gemspec +24 -173
- metadata +226 -137
- data/VERSION.yml +0 -5
- data/lib/generators/app_generator/jsp_template_engine.rb +0 -24
- data/lib/generators/app_generator/templates/jsp/main.jsp +0 -16
- data/lib/generators/app_generator/templates/webapp/javascripts/jquery.min.js +0 -16
- data/lib/generators/scaffold_generator/jsp_generator/templates/edit.erb +0 -3
- data/lib/generators/scaffold_generator/jsp_generator/templates/form.erb +0 -27
- data/lib/generators/scaffold_generator/jsp_generator/templates/index.erb +0 -36
- data/lib/generators/scaffold_generator/jsp_generator/templates/new.erb +0 -3
- data/lib/generators/scaffold_generator/jsp_generator/templates/show.erb +0 -14
- data/lib/load_paths.rb +0 -22
data/Gemfile
CHANGED
@@ -1,17 +1,2 @@
|
|
1
|
-
source
|
2
|
-
|
3
|
-
gem "thor", "0.14.6"
|
4
|
-
gem "rake", "0.8.7"
|
5
|
-
gem "activesupport", "3.0.1"
|
6
|
-
|
7
|
-
gem "ruby-debug", :group => [:development, :test]
|
8
|
-
|
9
|
-
group :development do
|
10
|
-
gem "jeweler", "1.4.0"
|
11
|
-
end
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem "ZenTest", "4.4.0"
|
15
|
-
gem "rspec", "1.3.1", :require => "spec"
|
16
|
-
gem "rcov", "0.9.9"
|
17
|
-
end
|
1
|
+
source "http://rubygems.org"
|
2
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vraptor-scaffold (0.0.1)
|
5
|
+
activesupport (= 3.0.1)
|
6
|
+
thor (= 0.14.6)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: http://rubygems.org/
|
3
10
|
specs:
|
4
11
|
ZenTest (4.4.0)
|
5
12
|
activesupport (3.0.1)
|
6
13
|
columnize (0.3.2)
|
7
|
-
gemcutter (0.6.1)
|
8
|
-
git (1.2.5)
|
9
|
-
jeweler (1.4.0)
|
10
|
-
gemcutter (>= 0.1.0)
|
11
|
-
git (>= 1.2.5)
|
12
|
-
rubyforge (>= 2.0.0)
|
13
|
-
json_pure (1.4.6)
|
14
14
|
linecache (0.43)
|
15
15
|
rake (0.8.7)
|
16
16
|
rcov (0.9.9)
|
@@ -20,8 +20,6 @@ GEM
|
|
20
20
|
ruby-debug-base (~> 0.10.4.0)
|
21
21
|
ruby-debug-base (0.10.4)
|
22
22
|
linecache (>= 0.3)
|
23
|
-
rubyforge (2.0.4)
|
24
|
-
json_pure (>= 1.1.7)
|
25
23
|
thor (0.14.6)
|
26
24
|
|
27
25
|
PLATFORMS
|
@@ -30,9 +28,9 @@ PLATFORMS
|
|
30
28
|
DEPENDENCIES
|
31
29
|
ZenTest (= 4.4.0)
|
32
30
|
activesupport (= 3.0.1)
|
33
|
-
jeweler (= 1.4.0)
|
34
31
|
rake (= 0.8.7)
|
35
32
|
rcov (= 0.9.9)
|
36
33
|
rspec (= 1.3.1)
|
37
34
|
ruby-debug
|
38
35
|
thor (= 0.14.6)
|
36
|
+
vraptor-scaffold!
|
data/History.txt
CHANGED
@@ -1,9 +1,26 @@
|
|
1
|
+
=== 1.1.0 / 2011-??-??
|
2
|
+
|
3
|
+
== New Features
|
4
|
+
* JPA 2 support using hibernate 3.6.1.Final. (Issue 13)
|
5
|
+
* ant task to minify js and css. (Issue 27)
|
6
|
+
* created prelude to automatic import taglibs in jsp.
|
7
|
+
* added css reset to reduce browsers inconsistencies.
|
8
|
+
|
9
|
+
== Improvements
|
10
|
+
* updated hibernate validator to 4.1.0.Final.
|
11
|
+
* changed html DTD to XHTML.
|
12
|
+
* declared css encoding.
|
13
|
+
* better repository and controller encapsulation.
|
14
|
+
* added head with title tag for sitemesh capture it in jsp views.
|
15
|
+
* updated vraptor to 3.3.1.
|
16
|
+
* updated jquery to 1.5.1.
|
17
|
+
|
1
18
|
=== 1.0.0 / 2011-02-04
|
2
19
|
|
3
20
|
== Improvements
|
4
21
|
* updated vraptor to 3.3.0
|
5
22
|
* updated jquery to 1.5
|
6
|
-
* decorators folder inside WEB-INF
|
23
|
+
* decorators folder inside WEB-INF (Issue 24)
|
7
24
|
* removed spring 3 option.
|
8
25
|
|
9
26
|
=== 0.0.4 / 2010-11-20
|
data/Rakefile
CHANGED
@@ -1,24 +1,5 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "vraptor-scaffold"
|
8
|
-
gem.summary = "VRaptor Scaffold."
|
9
|
-
gem.description = "VRaptor scaffold extension to make it easier configuring new projects and plugins."
|
10
|
-
gem.email = "rodolfoliviero@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/caelum/vraptor-scaffold"
|
12
|
-
gem.authors = ["Rodolfo Liviero"]
|
13
|
-
gem.add_dependency "thor", "0.14.6"
|
14
|
-
gem.add_dependency "rake", "0.8.7"
|
15
|
-
gem.add_dependency "activesupport", "3.0.1"
|
16
|
-
gem.post_install_message = "Thank you for installing vraptor-scaffold. Please read http://github.com/caelum/vraptor-scaffold/blob/master/README.textile for more information."
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
-
end
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
22
3
|
|
23
4
|
require 'spec/rake/spectask'
|
24
5
|
Spec::Rake::SpecTask.new(:spec) do |spec|
|
@@ -34,7 +15,7 @@ end
|
|
34
15
|
|
35
16
|
require 'rake/rdoctask'
|
36
17
|
Rake::RDocTask.new do |rdoc|
|
37
|
-
version =
|
18
|
+
version = VraptorScaffold::VERSION
|
38
19
|
|
39
20
|
rdoc.rdoc_dir = 'rdoc'
|
40
21
|
rdoc.title = "vraptor-scaffold #{version}"
|
@@ -42,5 +23,4 @@ Rake::RDocTask.new do |rdoc|
|
|
42
23
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
43
24
|
end
|
44
25
|
|
45
|
-
task :spec => :check_dependencies
|
46
26
|
task :default => [:spec]
|
data/bin/vraptor
CHANGED
data/lib/vraptor-scaffold.rb
CHANGED
@@ -1,36 +1,33 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/load_paths'
|
1
|
+
require File.dirname(__FILE__) + '/vraptor-scaffold/load_paths'
|
2
2
|
|
3
3
|
module VraptorScaffold
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
run_scaffold_generator(args) if action == "scaffold"
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.run_app_generator(project_path, args)
|
14
|
-
print_help(AppGenerator) if help? project_path
|
15
|
-
AppGenerator.new(project_path, args).invoke_all
|
16
|
-
end
|
4
|
+
def self.execute(args)
|
5
|
+
action = args.shift
|
6
|
+
print_help(AppGenerator) if help? action
|
7
|
+
run_app_generator(args.shift, args) if action == "new"
|
8
|
+
run_scaffold_generator(args) if action == "scaffold"
|
9
|
+
end
|
17
10
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
Kernel::exit
|
23
|
-
end
|
24
|
-
ScaffoldGenerator.new(args).invoke_all
|
25
|
-
end
|
11
|
+
def self.run_app_generator(project_path, args)
|
12
|
+
print_help(AppGenerator) if help? project_path
|
13
|
+
AppGenerator.new(project_path, args).invoke_all
|
14
|
+
end
|
26
15
|
|
27
|
-
|
28
|
-
|
16
|
+
def self.run_scaffold_generator(args)
|
17
|
+
print_help(ScaffoldGenerator) if help? args.first
|
18
|
+
unless File.exist?("src")
|
19
|
+
puts "To run vraptor scaffold please go to the project root folder."
|
29
20
|
Kernel::exit
|
30
21
|
end
|
22
|
+
ScaffoldGenerator.new(args).invoke_all
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.print_help(generator)
|
26
|
+
generator.start(["-h"])
|
27
|
+
Kernel::exit
|
28
|
+
end
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
end
|
30
|
+
def self.help?(command)
|
31
|
+
[nil, "-h", "--help"].include?(command)
|
35
32
|
end
|
36
|
-
end
|
33
|
+
end
|
File without changes
|
@@ -47,7 +47,8 @@ class AppGenerator < VraptorScaffold::Base
|
|
47
47
|
create_eclipse_files unless options[:skip_eclipse]
|
48
48
|
copy_file("build.xml")
|
49
49
|
template("build.properties.erb", "build.properties")
|
50
|
-
template("ivy.erb", "ivy.xml")
|
50
|
+
template("ivy.erb", "ivy.xml")
|
51
|
+
copy_file("ivysettings.xml")
|
51
52
|
copy_file(IVY_JAR)
|
52
53
|
end
|
53
54
|
end
|
File without changes
|
@@ -22,13 +22,11 @@ class DependencyManager
|
|
22
22
|
|
23
23
|
private
|
24
24
|
def default_dependencies
|
25
|
-
[ Dependency.new("br.com.caelum", "vraptor", "3.3.
|
26
|
-
Dependency.new("
|
25
|
+
[ Dependency.new("br.com.caelum", "vraptor", "3.3.1"),
|
26
|
+
Dependency.new("org.hsqldb", "hsqldb", "2.0.0"),
|
27
27
|
Dependency.new("opensymphony", "sitemesh", "2.4.2"), Dependency.new("javax.servlet", "jstl", "1.2"),
|
28
|
-
Dependency.new("
|
29
|
-
Dependency.new("org.hibernate", "hibernate-
|
30
|
-
Dependency.new("org.hibernate", "hibernate-core", "3.3.2.GA"),
|
31
|
-
Dependency.new("org.hibernate", "hibernate-validator", "3.1.0.GA"),
|
28
|
+
Dependency.new("org.hibernate", "hibernate-entitymanager", "3.6.1.Final"),
|
29
|
+
Dependency.new("org.hibernate", "hibernate-validator", "4.1.0.Final"),
|
32
30
|
Dependency.new("joda-time", "joda-time", "1.6.2")]
|
33
31
|
end
|
34
32
|
|
data/lib/{generators → vraptor-scaffold/generators}/app_generator/freemarker_template_engine.rb
RENAMED
@@ -13,7 +13,7 @@ class FreemarkerTemplateEngine < VraptorScaffold::Base
|
|
13
13
|
def configure
|
14
14
|
directory("macros", File.join(Configuration::WEB_APP, "macros"))
|
15
15
|
template("../decorators.erb", File.join(Configuration::WEB_INF, "decorators.xml"))
|
16
|
-
copy_file("main.ftl", File.join(Configuration::WEB_INF,
|
16
|
+
copy_file("main.ftl", File.join(Configuration::WEB_INF, decorators_path, "main.ftl"))
|
17
17
|
directory("infrastructure", infra_path)
|
18
18
|
append_freemarker_servlet
|
19
19
|
end
|
@@ -22,7 +22,7 @@ class FreemarkerTemplateEngine < VraptorScaffold::Base
|
|
22
22
|
"ftl"
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def decorators_path
|
26
26
|
File.join "views", "decorators"
|
27
27
|
end
|
28
28
|
|
@@ -41,5 +41,4 @@ class FreemarkerTemplateEngine < VraptorScaffold::Base
|
|
41
41
|
def infra_path
|
42
42
|
File.join Configuration::MAIN_SRC, package.gsub(".", File::Separator), "infrastructure"
|
43
43
|
end
|
44
|
-
|
45
|
-
end
|
44
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class JspTemplateEngine < VraptorScaffold::Base
|
2
|
+
|
3
|
+
def self.source_root
|
4
|
+
File.join(File.dirname(__FILE__), "templates", "jsp")
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize(project_path)
|
8
|
+
super
|
9
|
+
self.destination_root=(project_path)
|
10
|
+
end
|
11
|
+
|
12
|
+
def configure
|
13
|
+
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
|
+
copy_file("prelude.jspf", File.join(Configuration::WEB_INF, "jsp", "prelude.jspf"))
|
16
|
+
append_prelude_config
|
17
|
+
end
|
18
|
+
|
19
|
+
def extension
|
20
|
+
"jsp"
|
21
|
+
end
|
22
|
+
|
23
|
+
def decorators_path
|
24
|
+
File.join "jsp", "decorators"
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def append_prelude_config
|
29
|
+
file = File.join(Configuration::WEB_INF, "web.xml")
|
30
|
+
template = File.join JspTemplateEngine.source_root, "jsp-web.xml"
|
31
|
+
inject_into_file(file, File.read(template), :before => "</web-app>", :verbose => false)
|
32
|
+
end
|
33
|
+
end
|
data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/build.properties.erb
RENAMED
@@ -4,6 +4,8 @@ output.dir=target
|
|
4
4
|
test.build.dir=target/test-classes
|
5
5
|
|
6
6
|
webapp.dir=<%= Configuration::WEB_APP %>
|
7
|
+
js.dir=<%= Configuration::WEB_APP %>/javascripts
|
8
|
+
css.dir=<%= Configuration::WEB_APP %>/stylesheets
|
7
9
|
lib.dir=<%= Configuration::WEB_INF %>/lib
|
8
10
|
build.dir=<%= Configuration::WEB_INF %>/classes
|
9
11
|
|
@@ -99,6 +99,38 @@
|
|
99
99
|
</jetty>
|
100
100
|
</target>
|
101
101
|
|
102
|
+
<!-- =================================
|
103
|
+
target: minify
|
104
|
+
================================= -->
|
105
|
+
<target name="minify" depends="resolve" description="minify js and css">
|
106
|
+
<property name="yuicompressor.jar" value="lib/minify/yuicompressor-2.3.6.jar" />
|
107
|
+
|
108
|
+
<fileset dir="${js.dir}" includes="*.js" excludes="all.min.js" id="alljs" />
|
109
|
+
<fileset dir="${css.dir}" includes="*.css" excludes="*.min.css" id="allcss" />
|
110
|
+
|
111
|
+
<delete file="${css.dir}/all.css" />
|
112
|
+
<concat destfile="${css.dir}/all.css" fixlastline="true">
|
113
|
+
<fileset refid="allcss" />
|
114
|
+
</concat>
|
115
|
+
|
116
|
+
<java jar="${yuicompressor.jar}" fork="true">
|
117
|
+
<arg value="${css.dir}/all.css" />
|
118
|
+
<arg value="-o" />
|
119
|
+
<arg value="${css.dir}/all.min.css" />
|
120
|
+
</java>
|
121
|
+
|
122
|
+
<delete file="${js.dir}/all.js" />
|
123
|
+
<concat destfile="${js.dir}/all.js" fixlastline="true">
|
124
|
+
<fileset refid="alljs" />
|
125
|
+
</concat>
|
126
|
+
|
127
|
+
<java jar="${yuicompressor.jar}" fork="true">
|
128
|
+
<arg value="${js.dir}/all.js" />
|
129
|
+
<arg value="-o" />
|
130
|
+
<arg value="${js.dir}/all.min.js" />
|
131
|
+
</java>
|
132
|
+
</target>
|
133
|
+
|
102
134
|
<!-- =================================
|
103
135
|
target: report
|
104
136
|
================================= -->
|
data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/classpath.erb
RENAMED
File without changes
|
data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/eclipse/project.erb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/{generators → vraptor-scaffold/generators}/app_generator/templates/freemarker/main.ftl
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
File without changes
|
@@ -3,9 +3,10 @@
|
|
3
3
|
|
4
4
|
<configurations>
|
5
5
|
<conf name="default" description="dependencies used for compile" />
|
6
|
+
<conf name="provided" description="dependencies used for compile but is not packaged" visibility="public" />
|
6
7
|
<conf name="test" description="dependencies used for tests" visibility="public" />
|
7
8
|
<conf name="jetty" description="dependencies used for jetty" visibility="public" />
|
8
|
-
<conf name="
|
9
|
+
<conf name="minify" description="dependencies used to minify js and css" visibility="public" />
|
9
10
|
</configurations>
|
10
11
|
|
11
12
|
<dependencies><% @dependency_manager.compile_scope.each do |dependency| -%>
|
@@ -23,5 +24,8 @@
|
|
23
24
|
<dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.14" conf="jetty->default" />
|
24
25
|
<dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.14" conf="jetty->default" />
|
25
26
|
<dependency org="org.mortbay.jetty" name="jetty-ant" rev="6.1.14" conf="jetty->default" />
|
27
|
+
|
28
|
+
<!-- Minify dependencies -->
|
29
|
+
<dependency org="com.yahoo.platform.yui" name="yuicompressor" rev="2.3.6" conf="minify->default" />
|
26
30
|
</dependencies>
|
27
31
|
</ivy-module>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ivysettings>
|
2
|
+
<settings defaultResolver="chain" />
|
3
|
+
<resolvers>
|
4
|
+
<chain name="chain">
|
5
|
+
<ibiblio name="central" m2compatible="true" />
|
6
|
+
<ibiblio name="jboss" m2compatible="true" root="https://repository.jboss.org/nexus/content/groups/public-jboss" />
|
7
|
+
</chain>
|
8
|
+
</resolvers>
|
9
|
+
</ivysettings>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
|
2
|
+
|
3
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
8
|
+
<title><decorator:title default="Vraptor Scaffold"/></title>
|
9
|
+
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/stylesheets/stylesheets.css"/>
|
10
|
+
<decorator:head/>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<decorator:body/>
|
14
|
+
<script type="text/javascript" src="${pageContext.request.contextPath}/javascripts/jquery.min.js"/></script>
|
15
|
+
</body>
|
16
|
+
</html>
|