buildr 1.4.16-x86-mswin32 → 1.4.17-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +20 -0
- data/addon/buildr/bnd.rb +158 -158
- data/addon/buildr/checkstyle-report.xsl +87 -0
- data/addon/buildr/checkstyle.rb +213 -205
- data/addon/buildr/css_lint-report.xsl +83 -0
- data/addon/buildr/css_lint.rake +196 -0
- data/addon/buildr/custom_pom.rb +282 -0
- data/addon/buildr/drb.rb +0 -1
- data/addon/buildr/git_auto_version.rb +34 -34
- data/addon/buildr/gwt.rb +171 -171
- data/addon/buildr/hibernate.rb +8 -8
- data/addon/buildr/javancss.rb +155 -155
- data/addon/buildr/jaxb_xjc.rb +74 -74
- data/addon/buildr/jibx.rb +0 -1
- data/addon/buildr/org/apache/buildr/BuildrNail.java +2 -2
- data/addon/buildr/org/apache/buildr/JettyWrapper.java +3 -3
- data/addon/buildr/package_as_nsis.rb +2 -2
- data/addon/buildr/pmd.rb +166 -166
- data/addon/buildr/scss_lint-report.xsl +79 -0
- data/addon/buildr/scss_lint.rb +199 -0
- data/addon/buildr/wsgen.rb +4 -0
- data/doc/building.textile +3 -3
- data/doc/css/default.css +3 -3
- data/doc/css/print.css +1 -1
- data/doc/download.textile +18 -7
- data/doc/index.textile +8 -1
- data/doc/installing.textile +3 -3
- data/doc/languages.textile +0 -1
- data/doc/mailing_lists.textile +0 -4
- data/doc/more_stuff.textile +127 -3
- data/doc/preface.textile +1 -1
- data/doc/projects.textile +6 -6
- data/doc/releasing.textile +0 -1
- data/lib/buildr/clojure/shell.rb +0 -1
- data/lib/buildr/core/build.rb +16 -16
- data/lib/buildr/core/filter.rb +3 -3
- data/lib/buildr/core/jrebel.rb +0 -1
- data/lib/buildr/core/linux.rb +0 -1
- data/lib/buildr/core/run.rb +0 -1
- data/lib/buildr/core/shell.rb +0 -1
- data/lib/buildr/groovy/doc.rb +0 -1
- data/lib/buildr/ide/eclipse.rb +0 -2
- data/lib/buildr/ide/idea.rb +44 -8
- data/lib/buildr/java/bdd.rb +0 -1
- data/lib/buildr/java/commands.rb +2 -3
- data/lib/buildr/java/jruby.rb +2 -2
- data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +5 -5
- data/lib/buildr/java/tests.rb +0 -1
- data/lib/buildr/packaging/artifact_namespace.rb +0 -2
- data/lib/buildr/resources/icons-license.txt +14 -17
- data/lib/buildr/scala/bdd.rb +0 -1
- data/lib/buildr/scala/compiler.rb +0 -1
- data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
- data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +0 -2
- data/lib/buildr/version.rb +1 -1
- data/rakelib/metrics.rake +3 -3
- data/rakelib/release.rake +8 -2
- data/spec/addon/bnd_spec.rb +383 -383
- data/spec/addon/custom_pom_spec.rb +149 -0
- data/spec/addon/drb_spec.rb +0 -1
- data/spec/addon/jaxb_xjc_spec.rb +130 -130
- data/spec/core/application_spec.rb +0 -1
- data/spec/core/build_spec.rb +1 -1
- data/spec/core/console_spec.rb +0 -1
- data/spec/core/doc_spec.rb +0 -1
- data/spec/core/extension_spec.rb +0 -1
- data/spec/core/generate_from_eclipse_spec.rb +9 -9
- data/spec/core/run_spec.rb +2 -3
- data/spec/core/shell_spec.rb +0 -1
- data/spec/ide/idea_spec.rb +1979 -1941
- data/spec/java/cobertura_spec.rb +6 -6
- data/spec/java/commands_spec.rb +11 -11
- data/spec/java/compiler_spec.rb +0 -1
- data/spec/java/doc_spec.rb +0 -1
- data/spec/java/ecj_spec.rb +1 -3
- data/spec/java/external_spec.rb +0 -2
- data/spec/java/java_spec.rb +3 -3
- data/spec/java/run_spec.rb +0 -1
- data/spec/java/tests_spec.rb +15 -0
- data/spec/xpath_matchers.rb +121 -120
- metadata +10 -2
data/addon/buildr/drb.rb
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
-
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
-
# work for additional information regarding copyright ownership. The ASF
|
4
|
-
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
-
# "License"); you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
-
# License for the specific language governing permissions and limitations under
|
14
|
-
# the License.
|
15
|
-
|
16
|
-
module Buildr
|
17
|
-
module GitAutoVersion
|
18
|
-
module ProjectExtension
|
19
|
-
include Extension
|
20
|
-
|
21
|
-
before_define do |project|
|
22
|
-
unless project.version
|
23
|
-
version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
|
24
|
-
version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
|
25
|
-
project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
class Buildr::Project
|
33
|
-
include Buildr::GitAutoVersion::ProjectExtension
|
34
|
-
end
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
# work for additional information regarding copyright ownership. The ASF
|
4
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
# "License"); you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations under
|
14
|
+
# the License.
|
15
|
+
|
16
|
+
module Buildr
|
17
|
+
module GitAutoVersion
|
18
|
+
module ProjectExtension
|
19
|
+
include Extension
|
20
|
+
|
21
|
+
before_define do |project|
|
22
|
+
unless project.version
|
23
|
+
version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
|
24
|
+
version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
|
25
|
+
project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Buildr::Project
|
33
|
+
include Buildr::GitAutoVersion::ProjectExtension
|
34
|
+
end
|
data/addon/buildr/gwt.rb
CHANGED
@@ -1,171 +1,171 @@
|
|
1
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
-
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
-
# work for additional information regarding copyright ownership. The ASF
|
4
|
-
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
-
# "License"); you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
-
# License for the specific language governing permissions and limitations under
|
14
|
-
# the License.
|
15
|
-
|
16
|
-
module Buildr
|
17
|
-
module GWT
|
18
|
-
|
19
|
-
class << self
|
20
|
-
|
21
|
-
def version=(version)
|
22
|
-
@version = version
|
23
|
-
end
|
24
|
-
|
25
|
-
def version
|
26
|
-
@version || Buildr.settings.build['gwt'] || '2.5.1'
|
27
|
-
end
|
28
|
-
|
29
|
-
# The specs for requirements
|
30
|
-
def dependencies(version = nil)
|
31
|
-
["com.google.gwt:gwt-dev:jar:#{version || self.version}"]
|
32
|
-
end
|
33
|
-
|
34
|
-
def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir, options = {})
|
35
|
-
cp = Buildr.artifacts(self.dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
|
36
|
-
style = options[:style] || "OBFUSCATED," # "PRETTY", "DETAILED"
|
37
|
-
log_level = options[:log_level] # ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
|
38
|
-
workers = options[:workers] || 2
|
39
|
-
|
40
|
-
args = []
|
41
|
-
if log_level
|
42
|
-
args << "-logLevel"
|
43
|
-
args << log_level
|
44
|
-
end
|
45
|
-
args << "-strict"
|
46
|
-
args << "-style"
|
47
|
-
args << style
|
48
|
-
args << "-localWorkers"
|
49
|
-
args << workers
|
50
|
-
args << "-war"
|
51
|
-
args << output_dir
|
52
|
-
if options[:compile_report_dir]
|
53
|
-
args << "-compileReport"
|
54
|
-
args << "-extra"
|
55
|
-
args << options[:compile_report_dir]
|
56
|
-
end
|
57
|
-
|
58
|
-
if options[:draft_compile]
|
59
|
-
args << "-draftCompile"
|
60
|
-
end
|
61
|
-
|
62
|
-
if options[:enable_closure_compiler].nil? || options[:enable_closure_compiler]
|
63
|
-
args << "-XenableClosureCompiler"
|
64
|
-
end
|
65
|
-
|
66
|
-
args += modules
|
67
|
-
|
68
|
-
properties = options[:properties] ? options[:properties].dup : {}
|
69
|
-
properties["gwt.persistentunitcache"] = "true"
|
70
|
-
properties["gwt.persistentunitcachedir"] = unit_cache_dir
|
71
|
-
|
72
|
-
Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args], :pathing_jar => false}])
|
73
|
-
end
|
74
|
-
|
75
|
-
def superdev_dependencies(version = nil)
|
76
|
-
self.dependencies + ["com.google.gwt:gwt-codeserver:jar:#{version || self.version}"]
|
77
|
-
end
|
78
|
-
|
79
|
-
def gwt_superdev(module_name, source_artifacts, work_dir, options = {})
|
80
|
-
|
81
|
-
cp = Buildr.artifacts(self.superdev_dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
|
82
|
-
|
83
|
-
args = []
|
84
|
-
args << "-port" << (options[:port] || 5050)
|
85
|
-
args << "-workDir" << work_dir
|
86
|
-
(options[:src] || []).each do |src|
|
87
|
-
args << "-src" << src
|
88
|
-
end
|
89
|
-
args << module_name
|
90
|
-
|
91
|
-
properties = options[:properties] ? options[:properties].dup : {}
|
92
|
-
|
93
|
-
java_args = options[:java_args] ? options[:java_args].dup : {}
|
94
|
-
|
95
|
-
Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
module ProjectExtension
|
100
|
-
include Extension
|
101
|
-
|
102
|
-
def gwt(module_names, options = {})
|
103
|
-
output_key = options[:output_key] || project.id
|
104
|
-
output_dir = project._(:target, :generated, :gwt, output_key)
|
105
|
-
artifacts = ([project.compile.target] + project.compile.sources + project.resources.sources).collect do |a|
|
106
|
-
a.is_a?(String) ? file(a) : a
|
107
|
-
end
|
108
|
-
dependencies = options[:dependencies] ? artifacts(options[:dependencies]) : (project.compile.dependencies + [project.compile.target]).collect do |dep|
|
109
|
-
dep.is_a?(String) ? file(dep) : dep
|
110
|
-
end
|
111
|
-
|
112
|
-
unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
|
113
|
-
|
114
|
-
task = project.file(output_dir) do
|
115
|
-
Buildr::GWT.gwtc_main(module_names,
|
116
|
-
dependencies + artifacts,
|
117
|
-
output_dir,
|
118
|
-
unit_cache_dir,
|
119
|
-
{:version => gwt_detect_version(dependencies)}.merge(options))
|
120
|
-
end
|
121
|
-
task.enhance(dependencies)
|
122
|
-
task.enhance([project.compile])
|
123
|
-
project.assets.paths << task
|
124
|
-
task
|
125
|
-
end
|
126
|
-
|
127
|
-
def gwt_superdev_runner(module_name, options = {})
|
128
|
-
|
129
|
-
dependencies = []
|
130
|
-
if options[:dependencies]
|
131
|
-
dependencies = artifacts(options[:dependencies])
|
132
|
-
else
|
133
|
-
sources = [] + project.compile.sources + project.resources.sources
|
134
|
-
classes = [] + project.compile.dependencies + [project.compile.target]
|
135
|
-
dependencies = (classes + sources).collect do |dep|
|
136
|
-
dep.is_a?(String) ? file(dep) : dep
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
desc "Run Superdev mode"
|
141
|
-
project.task("superdev") do
|
142
|
-
work_dir = project._(:target, :gwt, :superdev)
|
143
|
-
mkdir_p work_dir
|
144
|
-
Buildr::GWT.gwt_superdev(module_name,
|
145
|
-
dependencies,
|
146
|
-
work_dir,
|
147
|
-
{:version => gwt_detect_version(dependencies)}.merge(options))
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
protected
|
152
|
-
|
153
|
-
def gwt_detect_version(dependencies)
|
154
|
-
version = nil
|
155
|
-
dependencies.each do |dep|
|
156
|
-
if dep.respond_to?(:to_spec_hash)
|
157
|
-
hash = dep.to_spec_hash
|
158
|
-
if 'com.google.gwt' == hash[:group] && 'gwt-user' == hash[:id] && :jar == hash[:type]
|
159
|
-
version = hash[:version]
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
version
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
class Buildr::Project
|
170
|
-
include Buildr::GWT::ProjectExtension
|
171
|
-
end
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
# work for additional information regarding copyright ownership. The ASF
|
4
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
# "License"); you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations under
|
14
|
+
# the License.
|
15
|
+
|
16
|
+
module Buildr
|
17
|
+
module GWT
|
18
|
+
|
19
|
+
class << self
|
20
|
+
|
21
|
+
def version=(version)
|
22
|
+
@version = version
|
23
|
+
end
|
24
|
+
|
25
|
+
def version
|
26
|
+
@version || Buildr.settings.build['gwt'] || '2.5.1'
|
27
|
+
end
|
28
|
+
|
29
|
+
# The specs for requirements
|
30
|
+
def dependencies(version = nil)
|
31
|
+
["com.google.gwt:gwt-dev:jar:#{version || self.version}"]
|
32
|
+
end
|
33
|
+
|
34
|
+
def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir, options = {})
|
35
|
+
cp = Buildr.artifacts(self.dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
|
36
|
+
style = options[:style] || "OBFUSCATED," # "PRETTY", "DETAILED"
|
37
|
+
log_level = options[:log_level] # ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
|
38
|
+
workers = options[:workers] || 2
|
39
|
+
|
40
|
+
args = []
|
41
|
+
if log_level
|
42
|
+
args << "-logLevel"
|
43
|
+
args << log_level
|
44
|
+
end
|
45
|
+
args << "-strict"
|
46
|
+
args << "-style"
|
47
|
+
args << style
|
48
|
+
args << "-localWorkers"
|
49
|
+
args << workers
|
50
|
+
args << "-war"
|
51
|
+
args << output_dir
|
52
|
+
if options[:compile_report_dir]
|
53
|
+
args << "-compileReport"
|
54
|
+
args << "-extra"
|
55
|
+
args << options[:compile_report_dir]
|
56
|
+
end
|
57
|
+
|
58
|
+
if options[:draft_compile]
|
59
|
+
args << "-draftCompile"
|
60
|
+
end
|
61
|
+
|
62
|
+
if options[:enable_closure_compiler].nil? || options[:enable_closure_compiler]
|
63
|
+
args << "-XenableClosureCompiler"
|
64
|
+
end
|
65
|
+
|
66
|
+
args += modules
|
67
|
+
|
68
|
+
properties = options[:properties] ? options[:properties].dup : {}
|
69
|
+
properties["gwt.persistentunitcache"] = "true"
|
70
|
+
properties["gwt.persistentunitcachedir"] = unit_cache_dir
|
71
|
+
|
72
|
+
Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args], :pathing_jar => false}])
|
73
|
+
end
|
74
|
+
|
75
|
+
def superdev_dependencies(version = nil)
|
76
|
+
self.dependencies + ["com.google.gwt:gwt-codeserver:jar:#{version || self.version}"]
|
77
|
+
end
|
78
|
+
|
79
|
+
def gwt_superdev(module_name, source_artifacts, work_dir, options = {})
|
80
|
+
|
81
|
+
cp = Buildr.artifacts(self.superdev_dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
|
82
|
+
|
83
|
+
args = []
|
84
|
+
args << "-port" << (options[:port] || 5050)
|
85
|
+
args << "-workDir" << work_dir
|
86
|
+
(options[:src] || []).each do |src|
|
87
|
+
args << "-src" << src
|
88
|
+
end
|
89
|
+
args << module_name
|
90
|
+
|
91
|
+
properties = options[:properties] ? options[:properties].dup : {}
|
92
|
+
|
93
|
+
java_args = options[:java_args] ? options[:java_args].dup : {}
|
94
|
+
|
95
|
+
Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
module ProjectExtension
|
100
|
+
include Extension
|
101
|
+
|
102
|
+
def gwt(module_names, options = {})
|
103
|
+
output_key = options[:output_key] || project.id
|
104
|
+
output_dir = project._(:target, :generated, :gwt, output_key)
|
105
|
+
artifacts = ([project.compile.target] + project.compile.sources + project.resources.sources).collect do |a|
|
106
|
+
a.is_a?(String) ? file(a) : a
|
107
|
+
end
|
108
|
+
dependencies = options[:dependencies] ? artifacts(options[:dependencies]) : (project.compile.dependencies + [project.compile.target]).collect do |dep|
|
109
|
+
dep.is_a?(String) ? file(dep) : dep
|
110
|
+
end
|
111
|
+
|
112
|
+
unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
|
113
|
+
|
114
|
+
task = project.file(output_dir) do
|
115
|
+
Buildr::GWT.gwtc_main(module_names,
|
116
|
+
(dependencies + artifacts).flatten.compact,
|
117
|
+
output_dir,
|
118
|
+
unit_cache_dir,
|
119
|
+
{:version => gwt_detect_version(dependencies)}.merge(options))
|
120
|
+
end
|
121
|
+
task.enhance(dependencies)
|
122
|
+
task.enhance([project.compile])
|
123
|
+
project.assets.paths << task
|
124
|
+
task
|
125
|
+
end
|
126
|
+
|
127
|
+
def gwt_superdev_runner(module_name, options = {})
|
128
|
+
|
129
|
+
dependencies = []
|
130
|
+
if options[:dependencies]
|
131
|
+
dependencies = artifacts(options[:dependencies])
|
132
|
+
else
|
133
|
+
sources = [] + project.compile.sources + project.resources.sources
|
134
|
+
classes = [] + project.compile.dependencies + [project.compile.target]
|
135
|
+
dependencies = (classes + sources).collect do |dep|
|
136
|
+
dep.is_a?(String) ? file(dep) : dep
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
desc "Run Superdev mode"
|
141
|
+
project.task("superdev") do
|
142
|
+
work_dir = project._(:target, :gwt, :superdev)
|
143
|
+
mkdir_p work_dir
|
144
|
+
Buildr::GWT.gwt_superdev(module_name,
|
145
|
+
dependencies,
|
146
|
+
work_dir,
|
147
|
+
{:version => gwt_detect_version(dependencies)}.merge(options))
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
protected
|
152
|
+
|
153
|
+
def gwt_detect_version(dependencies)
|
154
|
+
version = nil
|
155
|
+
dependencies.each do |dep|
|
156
|
+
if dep.respond_to?(:to_spec_hash)
|
157
|
+
hash = dep.to_spec_hash
|
158
|
+
if 'com.google.gwt' == hash[:group] && 'gwt-user' == hash[:id] && :jar == hash[:type]
|
159
|
+
version = hash[:version]
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
version
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
class Buildr::Project
|
170
|
+
include Buildr::GWT::ProjectExtension
|
171
|
+
end
|
data/addon/buildr/hibernate.rb
CHANGED
@@ -17,7 +17,7 @@ module Buildr
|
|
17
17
|
|
18
18
|
# Provides Hibernate Doclet and schema export tasks. Require explicitly using <code>require "buildr/hibernate"</code>.
|
19
19
|
module Hibernate
|
20
|
-
|
20
|
+
|
21
21
|
REQUIRES = Buildr.struct(
|
22
22
|
:collections => "commons-collections:commons-collections:jar:3.1",
|
23
23
|
:logging => "commons-logging:commons-logging:jar:1.0.3",
|
@@ -75,7 +75,7 @@ module Buildr
|
|
75
75
|
def hibernate_requires()
|
76
76
|
@requires ||= REQUIRES.dup
|
77
77
|
end
|
78
|
-
|
78
|
+
|
79
79
|
# :call-seq:
|
80
80
|
# hibernate_doclet(options?) => task
|
81
81
|
#
|
@@ -115,22 +115,22 @@ module Buildr
|
|
115
115
|
# end
|
116
116
|
def hibernate_schemaexport(args, &block)
|
117
117
|
path, arg_names, deps = Rake.application.resolve_args([args])
|
118
|
-
file(path).enhance { |task|
|
118
|
+
file(path).enhance { |task|
|
119
119
|
unless task.respond_to? :ant #this is a hack. A better way to do the job is to create a real task for all this.
|
120
120
|
class << task ; attr_accessor :ant ; end
|
121
|
-
task.ant = Hibernate.schemaexport(hib_resolve_classpath)
|
121
|
+
task.ant = Hibernate.schemaexport(hib_resolve_classpath)
|
122
122
|
end
|
123
|
-
}
|
124
|
-
|
123
|
+
}
|
124
|
+
|
125
125
|
if block
|
126
126
|
file(path).enhance(deps) { |task| block.call task, task.ant }
|
127
127
|
else
|
128
128
|
file(path).enhance deps
|
129
129
|
end
|
130
130
|
end
|
131
|
-
|
131
|
+
|
132
132
|
protected
|
133
|
-
|
133
|
+
|
134
134
|
# This will download all the required artifacts before returning a classpath, and we want to do this only once.
|
135
135
|
def hib_resolve_classpath
|
136
136
|
Buildr.artifacts(hibernate_requires.to_a).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
|