vraptor-scaffold 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/History.txt +24 -3
- data/README.textile +1 -1
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/generators/app_generator/app_generator.rb +36 -15
- data/lib/generators/app_generator/dependency.rb +15 -0
- data/lib/generators/app_generator/dependency_manager.rb +57 -0
- data/lib/generators/app_generator/freemarker_template_engine.rb +0 -8
- data/lib/generators/app_generator/templates/build.gradle.erb +38 -0
- data/lib/generators/app_generator/templates/build.xml +2 -1
- data/lib/generators/app_generator/templates/eclipse/{classpath → classpath.erb} +3 -3
- data/lib/generators/app_generator/templates/{ivy-2.2.0-rc1.jar → ivy-2.2.0.jar} +0 -0
- data/lib/generators/app_generator/templates/ivy.erb +12 -20
- data/lib/generators/app_generator/templates/pom.erb +30 -97
- data/lib/load_paths.rb +2 -0
- data/spec/lib/configuration_spec.rb +0 -1
- data/spec/lib/generators/app_generator/app_generator_spec.rb +113 -3
- data/spec/lib/generators/app_generator/dependency_manager_spec.rb +25 -0
- data/spec/lib/generators/app_generator/dependency_spec.rb +14 -0
- data/spec/lib/generators/app_generator/freemarker_template_engine_spec.rb +1 -33
- data/spec/lib/generators/app_generator/jsp_template_engine_spec.rb +1 -1
- data/spec/lib/generators/app_generator/templates/build.gradle +40 -0
- data/spec/lib/generators/app_generator/templates/build.properties +1 -1
- data/spec/lib/generators/app_generator/templates/build_spring3.gradle +44 -0
- data/spec/lib/generators/app_generator/templates/ivy.xml +6 -6
- data/spec/lib/generators/app_generator/templates/ivy_spring3.xml +39 -0
- data/spec/lib/generators/app_generator/templates/pom.xml +34 -55
- data/spec/lib/generators/app_generator/templates/pom_spring3.xml +157 -0
- data/vraptor-scaffold.gemspec +25 -16
- metadata +25 -16
- data/lib/generators/app_generator/templates/freemarker/freemarker-ivy.xml +0 -2
- data/lib/generators/app_generator/templates/freemarker/freemarker-pom.xml +0 -6
data/Gemfile
CHANGED
data/History.txt
CHANGED
@@ -1,14 +1,35 @@
|
|
1
|
-
===
|
1
|
+
=== 0.0.3 / 2010-11-04
|
2
|
+
|
3
|
+
== New Features
|
4
|
+
* works with gradle
|
5
|
+
* works with spring 3
|
6
|
+
|
7
|
+
== Improvements
|
8
|
+
* bumped ivy version to 2.2.0
|
9
|
+
* updated maven plugins
|
10
|
+
* validate users action when create app
|
11
|
+
* update hsqldb
|
12
|
+
* update junit
|
13
|
+
* better build.xml
|
14
|
+
|
15
|
+
=== 0.0.2 / 2010-10-08
|
16
|
+
|
17
|
+
== Improvements
|
18
|
+
* bumped vraptor version to 3.2.0
|
19
|
+
|
20
|
+
=== 0.0.1 / 2010-10-05
|
2
21
|
|
3
22
|
== New Features
|
4
23
|
* jsp support
|
5
24
|
* base package
|
6
|
-
* ant + ivy
|
25
|
+
* works with ant + ivy
|
26
|
+
* help command
|
7
27
|
|
8
28
|
== Improvements
|
9
29
|
* Better use of Generics.
|
30
|
+
* Update Hibernate
|
10
31
|
|
11
|
-
=== 0.0.1.rc / 2010-08-
|
32
|
+
=== 0.0.1.rc / 2010-08-24
|
12
33
|
|
13
34
|
== New Features
|
14
35
|
* Added Hamcrest 1.1
|
data/README.textile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
h1. Documentation
|
2
2
|
|
3
3
|
Vraptor Scaffold website can be found at "http://vraptor.org":http://vraptor.org
|
4
|
-
RDocs can be found at "http://rdoc.info":http://
|
4
|
+
RDocs can be found at "http://rdoc.info":http://rubydoc.info/gems/vraptor-scaffold
|
5
5
|
|
6
6
|
h1. Installation
|
7
7
|
|
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ begin
|
|
13
13
|
gem.add_dependency "thor", ">=0.14.3"
|
14
14
|
gem.add_dependency "rake", ">=0.8.7"
|
15
15
|
gem.add_dependency "activesupport", ">=3.0.0"
|
16
|
-
gem.post_install_message = "Thank you for installing vraptor-scaffold. Please read http://github.com/caelum/vraptor-scaffold/blob/master/README.
|
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
17
|
end
|
18
18
|
Jeweler::GemcutterTasks.new
|
19
19
|
rescue LoadError
|
data/VERSION.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
class AppGenerator < VraptorScaffold::Base
|
2
2
|
|
3
3
|
TEMPLATE_ENGINES = %w( jsp ftl )
|
4
|
-
BUILD_TOOLS = %w( ant mvn )
|
5
|
-
IVY_JAR = "ivy-2.2.0
|
4
|
+
BUILD_TOOLS = %w( ant mvn gradle )
|
5
|
+
IVY_JAR = "ivy-2.2.0.jar"
|
6
6
|
|
7
7
|
argument :project_path
|
8
8
|
|
@@ -18,6 +18,9 @@ class AppGenerator < VraptorScaffold::Base
|
|
18
18
|
class_option :skip_eclipse, :type => :boolean, :aliases => "-E",
|
19
19
|
:desc => "Skip Eclipse files"
|
20
20
|
|
21
|
+
class_option :spring3, :aliases => "-S", :type => :boolean,
|
22
|
+
:desc => "Use spring 3 instead of spring 2.5"
|
23
|
+
|
21
24
|
def self.source_root
|
22
25
|
File.join File.dirname(__FILE__), "templates"
|
23
26
|
end
|
@@ -28,17 +31,32 @@ class AppGenerator < VraptorScaffold::Base
|
|
28
31
|
|
29
32
|
def initialize(args, opts=[])
|
30
33
|
super([args], opts)
|
34
|
+
validate
|
31
35
|
self.destination_root=(project_path)
|
32
36
|
@project_name = project_path.split("/").last
|
37
|
+
@dependency_manager = DependencyManager.new(options)
|
33
38
|
end
|
34
39
|
|
35
40
|
def create_root_folder
|
36
41
|
empty_directory "."
|
37
42
|
end
|
38
43
|
|
39
|
-
def
|
44
|
+
def configure_maven
|
40
45
|
template("pom.erb", "pom.xml") if options[:build_tool] == "mvn"
|
41
|
-
|
46
|
+
end
|
47
|
+
|
48
|
+
def configure_ant
|
49
|
+
if options[:build_tool] == "ant"
|
50
|
+
create_eclipse_files unless options[:skip_eclipse]
|
51
|
+
copy_file("build.xml")
|
52
|
+
template("build.properties.erb", "build.properties")
|
53
|
+
template("ivy.erb", "ivy.xml")
|
54
|
+
copy_file(IVY_JAR)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def configure_gradle
|
59
|
+
template("build.gradle.erb", "build.gradle") if options[:build_tool] == "gradle"
|
42
60
|
end
|
43
61
|
|
44
62
|
def create_main_java
|
@@ -57,7 +75,7 @@ class AppGenerator < VraptorScaffold::Base
|
|
57
75
|
def configure_template_engine
|
58
76
|
template("vraptor-scaffold.erb", Configuration::FILENAME)
|
59
77
|
templates = {"jsp" => JspTemplateEngine, "ftl" => FreemarkerTemplateEngine}
|
60
|
-
templates[options[:template_engine]].new(project_path).configure
|
78
|
+
templates[options[:template_engine]].new(project_path).configure if templates[options[:template_engine]]
|
61
79
|
end
|
62
80
|
|
63
81
|
def create_test
|
@@ -67,17 +85,20 @@ class AppGenerator < VraptorScaffold::Base
|
|
67
85
|
end
|
68
86
|
|
69
87
|
private
|
70
|
-
def
|
71
|
-
copy_file("build.xml")
|
72
|
-
template("build.properties.erb", "build.properties")
|
73
|
-
template("ivy.erb", "ivy.xml")
|
74
|
-
copy_file(IVY_JAR)
|
75
|
-
create_eclipse_wtp unless options[:skip_eclipse]
|
76
|
-
end
|
77
|
-
|
78
|
-
def create_eclipse_wtp
|
88
|
+
def create_eclipse_files
|
79
89
|
template("eclipse/project.erb", ".project")
|
80
|
-
|
90
|
+
template("eclipse/classpath.erb", ".classpath")
|
81
91
|
directory("eclipse/settings", ".settings")
|
82
92
|
end
|
93
|
+
|
94
|
+
def validate
|
95
|
+
unless BUILD_TOOLS.include? options[:build_tool]
|
96
|
+
puts "Build tool #{options[:build_tool]} is not supported. The supported build tools are: #{BUILD_TOOLS.join(", ")}"
|
97
|
+
Kernel::exit
|
98
|
+
end
|
99
|
+
unless TEMPLATE_ENGINES.include? options[:template_engine]
|
100
|
+
puts "Template engine #{options[:template_engine]} is not supported. The supported template engines are: #{TEMPLATE_ENGINES.join(", ")}"
|
101
|
+
Kernel::exit
|
102
|
+
end
|
103
|
+
end
|
83
104
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Dependency
|
2
|
+
|
3
|
+
attr_accessor :group, :name, :version, :exclusions
|
4
|
+
|
5
|
+
def initialize group, name, version=nil, exclusions=[]
|
6
|
+
@group = group
|
7
|
+
@name = name
|
8
|
+
@version = version
|
9
|
+
@exclusions = exclusions
|
10
|
+
end
|
11
|
+
|
12
|
+
def has_exclusions?
|
13
|
+
!@exclusions.empty?
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
class DependencyManager
|
2
|
+
|
3
|
+
attr_accessor :options
|
4
|
+
|
5
|
+
def initialize(options)
|
6
|
+
@options = options
|
7
|
+
end
|
8
|
+
|
9
|
+
def compile_scope
|
10
|
+
dependencies = vraptor_dependencies + default_dependencies
|
11
|
+
append_freemarker_dependency_if_necessary dependencies
|
12
|
+
dependencies
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_scope
|
16
|
+
[Dependency.new("junit", "junit", "4.8.2"),
|
17
|
+
Dependency.new("org.hamcrest", "hamcrest-all", "1.1"),
|
18
|
+
Dependency.new("org.mockito", "mockito-all", "1.8.5")]
|
19
|
+
end
|
20
|
+
|
21
|
+
def provided_scope
|
22
|
+
[Dependency.new("javax.servlet", "servlet-api", "2.5")]
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
def default_dependencies
|
27
|
+
[ Dependency.new("org.hsqldb", "hsqldb", "2.0.0"),
|
28
|
+
Dependency.new("opensymphony", "sitemesh", "2.4.2"), Dependency.new("javax.servlet", "jstl", "1.2"),
|
29
|
+
Dependency.new("javax.persistence", "persistence-api", "1.0"),
|
30
|
+
Dependency.new("org.hibernate", "hibernate-entitymanager", "3.4.0.GA"),
|
31
|
+
Dependency.new("org.hibernate", "hibernate-core", "3.3.2.GA"),
|
32
|
+
Dependency.new("org.hibernate", "hibernate-validator", "3.1.0.GA"),
|
33
|
+
Dependency.new("joda-time", "joda-time", "1.6")]
|
34
|
+
end
|
35
|
+
|
36
|
+
def vraptor_dependencies
|
37
|
+
vraptor_dependency = Dependency.new("br.com.caelum", "vraptor", "3.2.0")
|
38
|
+
append_spring_dependency_if_necessary vraptor_dependency
|
39
|
+
end
|
40
|
+
|
41
|
+
def spring3_dependencies
|
42
|
+
[Dependency.new("org.springframework", "spring-web", "3.0.4.RELEASE"),
|
43
|
+
Dependency.new("com.thoughtworks.xstream", "xstream", "1.3.1")]
|
44
|
+
end
|
45
|
+
|
46
|
+
def append_freemarker_dependency_if_necessary dependencies
|
47
|
+
dependencies << Dependency.new("org.freemarker", "freemarker", "2.3.16") if @options[:template_engine] == 'ftl'
|
48
|
+
end
|
49
|
+
|
50
|
+
def append_spring_dependency_if_necessary vraptor_dependency
|
51
|
+
if options[:spring3]
|
52
|
+
vraptor_dependency.exclusions << Dependency.new("org.springframework", "spring")
|
53
|
+
return [vraptor_dependency] + spring3_dependencies
|
54
|
+
end
|
55
|
+
[vraptor_dependency]
|
56
|
+
end
|
57
|
+
end
|
@@ -16,7 +16,6 @@ class FreemarkerTemplateEngine < VraptorScaffold::Base
|
|
16
16
|
copy_file("main.ftl", File.join(Configuration::WEB_INF, "decorators", "main.ftl"))
|
17
17
|
directory("infrastructure", infra_path)
|
18
18
|
empty_directory File.join(Configuration::WEB_INF, "views")
|
19
|
-
append_freemarker_dependencies
|
20
19
|
append_freemarker_servlet
|
21
20
|
end
|
22
21
|
|
@@ -40,11 +39,4 @@ class FreemarkerTemplateEngine < VraptorScaffold::Base
|
|
40
39
|
File.join Configuration::MAIN_SRC, package.gsub(".", File::Separator), "infrastructure"
|
41
40
|
end
|
42
41
|
|
43
|
-
def append_freemarker_dependencies
|
44
|
-
file = "pom.xml" if File.exist?("#{@project_path}/pom.xml")
|
45
|
-
file = "ivy.xml" if File.exist?("#{@project_path}/ivy.xml")
|
46
|
-
template = File.join FreemarkerTemplateEngine.source_root, "freemarker-#{file}"
|
47
|
-
inject_into_file(file, File.read(template), :after => "<dependencies>", :verbose => false)
|
48
|
-
end
|
49
|
-
|
50
42
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
repositories {
|
2
|
+
mavenCentral()
|
3
|
+
}
|
4
|
+
|
5
|
+
apply plugin: 'java'
|
6
|
+
apply plugin: 'war'
|
7
|
+
apply plugin: 'jetty'
|
8
|
+
apply plugin: 'eclipse'
|
9
|
+
apply plugin: 'project-report'
|
10
|
+
|
11
|
+
sourceCompatibility = 1.6
|
12
|
+
targetCompatibility = 1.6
|
13
|
+
version = '1.0'
|
14
|
+
|
15
|
+
sourceSets.main.classesDir = new File('<%= Configuration::WEB_INF %>/classes')
|
16
|
+
|
17
|
+
jettyRun.scanIntervalSeconds=3
|
18
|
+
jettyRun.contextPath = '/'
|
19
|
+
[jettyRunWar,jettyStop]*.stopPort = 8081
|
20
|
+
[jettyRunWar,jettyStop]*.stopKey = 'stopKey'
|
21
|
+
|
22
|
+
dependencies {
|
23
|
+
<% @dependency_manager.compile_scope.each do |dependency| -%>
|
24
|
+
compile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'<% if dependency.has_exclusions? %>, {<% dependency.exclusions.each do |exclusion| %>
|
25
|
+
exclude group: '<%= exclusion.group %>', name: '<%= exclusion.name %>'<% end %>
|
26
|
+
}<% end %>
|
27
|
+
<% end -%>
|
28
|
+
|
29
|
+
//Provided dependencies
|
30
|
+
<% @dependency_manager.provided_scope.each do |dependency| -%>
|
31
|
+
providedCompile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'
|
32
|
+
<% end -%>
|
33
|
+
|
34
|
+
//Test dependencies
|
35
|
+
<% @dependency_manager.test_scope.each do |dependency| -%>
|
36
|
+
testCompile group: '<%= dependency.group %>', name: '<%= dependency.name %>', version: '<%= dependency.version %>'
|
37
|
+
<% end -%>
|
38
|
+
}
|
@@ -10,8 +10,8 @@
|
|
10
10
|
<path id="test.path.id">
|
11
11
|
<fileset dir="lib/test" />
|
12
12
|
<path refid="lib.path.id" />
|
13
|
-
<pathelement location="${build.dir}" />
|
14
13
|
<pathelement location="${test.build.dir}" />
|
14
|
+
<pathelement location="${build.dir}" />
|
15
15
|
</path>
|
16
16
|
|
17
17
|
<!-- =================================
|
@@ -71,6 +71,7 @@
|
|
71
71
|
<include name="**/*Test.java" />
|
72
72
|
</fileset>
|
73
73
|
</batchtest>
|
74
|
+
<formatter type="brief" usefile="false" />
|
74
75
|
<formatter type="xml" />
|
75
76
|
<classpath refid="test.path.id" />
|
76
77
|
</junit>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</classpathentry>
|
18
18
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
19
19
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
20
|
-
|
21
|
-
<classpathentry kind="lib" path="lib/test
|
22
|
-
|
20
|
+
<% @dependency_manager.test_scope.each do |dependency| %>
|
21
|
+
<classpathentry kind="lib" path="lib/test/<%= "#{dependency.name}-#{dependency.version}.jar" %>"/>
|
22
|
+
<% end -%>
|
23
23
|
</classpath>
|
Binary file
|
@@ -8,28 +8,20 @@
|
|
8
8
|
<conf name="provided" description="dependencies used for compile but is not packaged" visibility="public" />
|
9
9
|
</configurations>
|
10
10
|
|
11
|
-
<dependencies
|
12
|
-
<dependency org="
|
13
|
-
|
14
|
-
|
15
|
-
<dependency org="javax.servlet" name="jstl" rev="1.2" conf="default" />
|
16
|
-
<dependency org="javax.persistence" name="persistence-api" rev="1.0" conf="default" />
|
17
|
-
<dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.4.0.GA" conf="default" />
|
18
|
-
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.2.GA" conf="default" />
|
19
|
-
<dependency org="org.hibernate" name="hibernate-validator" rev="3.1.0.GA" conf="default" />
|
20
|
-
<dependency org="joda-time" name="joda-time" rev="1.6" conf="default" />
|
11
|
+
<dependencies><% @dependency_manager.compile_scope.each do |dependency| -%>
|
12
|
+
<dependency org="<%= dependency.group %>" name="<%= dependency.name %>" rev="<%= dependency.version %>" conf="default"<% if dependency.has_exclusions? %>><% dependency.exclusions.each do |exclusion| %>
|
13
|
+
<exclude org="<%= exclusion.group %>" name="<%= exclusion.name %>" />
|
14
|
+
</dependency><% end %><% else %> /><% end %><% end %>
|
21
15
|
|
22
|
-
<!-- Provided dependencies
|
23
|
-
<dependency org="
|
16
|
+
<!-- Provided dependencies --><% @dependency_manager.provided_scope.each do |dependency| -%>
|
17
|
+
<dependency org="<%= dependency.group %>" name="<%= dependency.name %>" rev="<%= dependency.version %>" conf="provided->default" /><% end -%>
|
24
18
|
|
25
|
-
<!-- Test dependencies
|
26
|
-
<dependency org="
|
27
|
-
<dependency org="org.hamcrest" name="hamcrest-all" rev="1.1" conf="test->default" />
|
28
|
-
<dependency org="org.mockito" name="mockito-all" rev="1.8.5" conf="test->default" />
|
19
|
+
<!-- Test dependencies --><% @dependency_manager.test_scope.each do |dependency| -%>
|
20
|
+
<dependency org="<%= dependency.group %>" name="<%= dependency.name %>" rev="<%= dependency.version %>" conf="test->default" /><% end -%>
|
29
21
|
|
30
|
-
<!--
|
31
|
-
<dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.14" conf="jetty->default"/>
|
32
|
-
<dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.14" conf="jetty->default"/>
|
33
|
-
<dependency org="org.mortbay.jetty" name="jetty-ant" rev="6.1.14" conf="jetty->default" />
|
22
|
+
<!-- Jetty dependencies -->
|
23
|
+
<dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.14" conf="jetty->default" />
|
24
|
+
<dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.14" conf="jetty->default" />
|
25
|
+
<dependency org="org.mortbay.jetty" name="jetty-ant" rev="6.1.14" conf="jetty->default" />
|
34
26
|
</dependencies>
|
35
27
|
</ivy-module>
|
@@ -6,17 +6,17 @@
|
|
6
6
|
<packaging>war</packaging>
|
7
7
|
<version>0.0.1-SNAPSHOT</version>
|
8
8
|
<name><%= @project_name %></name>
|
9
|
-
|
9
|
+
|
10
10
|
<properties>
|
11
11
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
12
12
|
</properties>
|
13
|
-
|
13
|
+
|
14
14
|
<build>
|
15
|
-
|
15
|
+
<outputDirectory>${basedir}/<%= Configuration::WEB_INF %>/classes</outputDirectory>
|
16
16
|
<plugins>
|
17
17
|
<plugin>
|
18
18
|
<artifactId>maven-compiler-plugin</artifactId>
|
19
|
-
<version>2.
|
19
|
+
<version>2.3.2</version>
|
20
20
|
<configuration>
|
21
21
|
<source>1.6</source>
|
22
22
|
<target>1.6</target>
|
@@ -32,10 +32,10 @@
|
|
32
32
|
<wtpversion>2.0</wtpversion>
|
33
33
|
</configuration>
|
34
34
|
</plugin>
|
35
|
-
|
35
|
+
<plugin>
|
36
36
|
<groupId>org.apache.maven.plugins</groupId>
|
37
37
|
<artifactId>maven-war-plugin</artifactId>
|
38
|
-
<version>2.
|
38
|
+
<version>2.1</version>
|
39
39
|
</plugin>
|
40
40
|
<plugin>
|
41
41
|
<groupId>org.mortbay.jetty</groupId>
|
@@ -53,102 +53,34 @@
|
|
53
53
|
</plugins>
|
54
54
|
</build>
|
55
55
|
|
56
|
-
<dependencies
|
57
|
-
<dependency>
|
58
|
-
<groupId>junit</groupId>
|
59
|
-
<artifactId>junit</artifactId>
|
60
|
-
<version>4.8.1</version>
|
61
|
-
<scope>test</scope>
|
62
|
-
</dependency>
|
63
|
-
<dependency>
|
64
|
-
<groupId>org.hamcrest</groupId>
|
65
|
-
<artifactId>hamcrest-all</artifactId>
|
66
|
-
<version>1.1</version>
|
67
|
-
<scope>test</scope>
|
68
|
-
</dependency>
|
69
|
-
<dependency>
|
70
|
-
<groupId>org.mockito</groupId>
|
71
|
-
<artifactId>mockito-all</artifactId>
|
72
|
-
<version>1.8.5</version>
|
73
|
-
<scope>test</scope>
|
74
|
-
</dependency>
|
75
|
-
<dependency>
|
76
|
-
<groupId>hsqldb</groupId>
|
77
|
-
<artifactId>hsqldb</artifactId>
|
78
|
-
<version>1.8.0.10</version>
|
79
|
-
</dependency>
|
80
|
-
<dependency>
|
81
|
-
<groupId>br.com.caelum</groupId>
|
82
|
-
<artifactId>vraptor</artifactId>
|
83
|
-
<version>3.2.0</version>
|
84
|
-
</dependency>
|
85
|
-
<dependency>
|
86
|
-
<groupId>opensymphony</groupId>
|
87
|
-
<artifactId>sitemesh</artifactId>
|
88
|
-
<version>2.4.2</version>
|
89
|
-
</dependency>
|
56
|
+
<dependencies><% @dependency_manager.compile_scope.each do |dependency| %>
|
90
57
|
<dependency>
|
91
|
-
<groupId
|
92
|
-
<artifactId
|
93
|
-
<version
|
94
|
-
|
95
|
-
<dependency>
|
96
|
-
<groupId>javax.persistence</groupId>
|
97
|
-
<artifactId>persistence-api</artifactId>
|
98
|
-
<version>1.0</version>
|
99
|
-
</dependency>
|
100
|
-
<dependency>
|
101
|
-
<groupId>org.hibernate</groupId>
|
102
|
-
<artifactId>hibernate-entitymanager</artifactId>
|
103
|
-
<version>3.4.0.GA</version>
|
104
|
-
<exclusions>
|
105
|
-
<exclusion>
|
106
|
-
<artifactId>slf4j-api</artifactId>
|
107
|
-
<groupId>org.slf4j</groupId>
|
108
|
-
</exclusion>
|
58
|
+
<groupId><%= dependency.group %></groupId>
|
59
|
+
<artifactId><%= dependency.name %></artifactId>
|
60
|
+
<version><%= dependency.version %></version><% if dependency.has_exclusions? %>
|
61
|
+
<exclusions><% dependency.exclusions.each do |exclusion| %>
|
109
62
|
<exclusion>
|
110
|
-
<
|
111
|
-
<
|
112
|
-
</exclusion
|
113
|
-
</exclusions
|
114
|
-
</dependency
|
115
|
-
|
116
|
-
|
117
|
-
<artifactId>hibernate-core</artifactId>
|
118
|
-
<version>3.3.2.GA</version>
|
119
|
-
<exclusions>
|
120
|
-
<exclusion>
|
121
|
-
<artifactId>slf4j-api</artifactId>
|
122
|
-
<groupId>org.slf4j</groupId>
|
123
|
-
</exclusion>
|
124
|
-
</exclusions>
|
125
|
-
</dependency>
|
126
|
-
<dependency>
|
127
|
-
<groupId>org.hibernate</groupId>
|
128
|
-
<artifactId>hibernate-validator</artifactId>
|
129
|
-
<version>3.1.0.GA</version>
|
130
|
-
<exclusions>
|
131
|
-
<exclusion>
|
132
|
-
<artifactId>slf4j-api</artifactId>
|
133
|
-
<groupId>org.slf4j</groupId>
|
134
|
-
</exclusion>
|
135
|
-
<exclusion>
|
136
|
-
<artifactId>org.hibernate</artifactId>
|
137
|
-
<groupId>hibernate-core</groupId>
|
138
|
-
</exclusion>
|
139
|
-
</exclusions>
|
140
|
-
</dependency>
|
63
|
+
<groupId><%= exclusion.group %></groupId>
|
64
|
+
<artifactId><%= exclusion.name %></artifactId>
|
65
|
+
</exclusion><% end %>
|
66
|
+
</exclusions><% end %>
|
67
|
+
</dependency><% end %>
|
68
|
+
|
69
|
+
<!-- Test dependencies --><% @dependency_manager.test_scope.each do |dependency| %>
|
141
70
|
<dependency>
|
142
|
-
<groupId
|
143
|
-
<artifactId
|
144
|
-
<version
|
145
|
-
|
71
|
+
<groupId><%= dependency.group %></groupId>
|
72
|
+
<artifactId><%= dependency.name %></artifactId>
|
73
|
+
<version><%= dependency.version %></version>
|
74
|
+
<scope>test</scope>
|
75
|
+
</dependency><% end %>
|
76
|
+
|
77
|
+
<!-- Provided dependencies --><% @dependency_manager.provided_scope.each do |dependency| %>
|
146
78
|
<dependency>
|
147
|
-
<groupId
|
148
|
-
<artifactId
|
149
|
-
<version
|
79
|
+
<groupId><%= dependency.group %></groupId>
|
80
|
+
<artifactId><%= dependency.name %></artifactId>
|
81
|
+
<version><%= dependency.version %></version>
|
150
82
|
<scope>provided</scope>
|
151
|
-
</dependency
|
83
|
+
</dependency><% end %>
|
152
84
|
</dependencies>
|
153
85
|
|
154
86
|
<reporting>
|
@@ -156,6 +88,7 @@
|
|
156
88
|
<plugin>
|
157
89
|
<groupId>org.codehaus.mojo</groupId>
|
158
90
|
<artifactId>cobertura-maven-plugin</artifactId>
|
91
|
+
<version>2.4</version>
|
159
92
|
</plugin>
|
160
93
|
</plugins>
|
161
94
|
</reporting>
|