public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Search Repo:
A bit more organization: consolidated generic packaging stuff in 
buildr/packaging, left only Java-specific packaging in buildr/java.



git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@645778 
13f79535-47bb-0310-9956-ffa450edef68
Assaf (author)
Mon Apr 07 23:59:39 -0700 2008
commit  979cff6a7161fee286d0025ce408897700d9288d
tree    cb1e421098c81837379b81c7a6b027da534b7314
parent  49c5639ecf5bd93485ab12aae06979bafe528f66
...
18
19
20
21
 
22
23
24
...
18
19
20
 
21
22
23
24
0
@@ -18,7 +18,7 @@ require 'uri'
0
 require 'net/http'
0
 require 'buildr/core/project'
0
 require 'buildr/java'
0
-require 'buildr/java/artifact'
0
+require 'buildr/packaging'
0
 require 'thread'
0
 
0
 
...
20
21
22
23
24
25
26
27
28
29
...
20
21
22
 
23
24
25
26
27
 
0
@@ -20,10 +20,8 @@ require 'buildr/core/project'
0
 require 'buildr/core/environment'
0
 require 'buildr/core/help'
0
 require 'buildr/core/build'
0
-require 'buildr/core/package'
0
 require 'buildr/core/filter'
0
 require 'buildr/core/compile'
0
 require 'buildr/core/test'
0
 require 'buildr/core/checks'
0
 require 'buildr/core/generate'
0
-require 'buildr/core/addon'
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,98 +0,0 @@
0
-# Licensed to the Apache Software Foundation (ASF) under one or more
0
-# contributor license agreements. See the NOTICE file distributed with this
0
-# work for additional information regarding copyright ownership. The ASF
0
-# licenses this file to you under the Apache License, Version 2.0 (the
0
-# "License"); you may not use this file except in compliance with the License.
0
-# You may obtain a copy of the License at
0
-#
0
-# http://www.apache.org/licenses/LICENSE-2.0
0
-#
0
-# Unless required by applicable law or agreed to in writing, software
0
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
0
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
0
-# License for the specific language governing permissions and limitations under
0
-# the License.
0
-
0
-
0
-require 'buildr/core/package'
0
-require 'buildr/tasks/zip'
0
-require 'rubyforge'
0
-
0
-
0
-module Buildr
0
-
0
- class PackageGemTask < ArchiveTask
0
-
0
- def initialize(*args)
0
- super
0
- @spec = Gem::Specification.new
0
- end
0
-
0
- def spec
0
- yield @spec if block_given?
0
- @spec
0
- end
0
-
0
- def install
0
- Util.ruby 'install', name, :command => 'gem', :sudo => true
0
- end
0
-
0
- def uninstall
0
- Util.ruby 'uninstall', spec.name, '-v', spec.version.to_s, :command => 'gem', :sudo => true
0
- end
0
-
0
- def upload
0
- rubyforge = RubyForge.new
0
- rubyforge.login
0
- #File.open('.changes', 'w'){|f| f.write(current)}
0
- #rubyforge.userconfig.merge!('release_changes' => '.changes', 'preformatted' => true)
0
- rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version, package(:gem).to_s
0
- end
0
-
0
- private
0
-
0
- def create_from(file_map)
0
- spec.mark_version
0
- spec.validate
0
- Gem::Package.open(name, 'w', signer) do |pkg|
0
- pkg.metadata = spec.to_yaml
0
- file_map.each do |path, content|
0
- next if content.nil? || File.directory?(content.to_s)
0
- pkg.add_file_simple(path, File.stat(name).mode & 0777, File.size(content.to_s)) do |os|
0
- os.write File.open(content.to_s, 'rb') { |f| f.read }
0
- end
0
- end
0
- end
0
- end
0
-
0
- def signer
0
- # TODO: implement.
0
- end
0
- end
0
-
0
-
0
- module PackageAsGem
0
-
0
- def package_as_gem(file_name) #:nodoc:
0
- PackageGemTask.define_task(file_name).tap do |gem|
0
- %{ lib test doc }.each do |dir|
0
- gem.include :from=>_(dir), :path=>dir if File.directory?(_(dir))
0
- end
0
- gem.spec do |spec|
0
- spec.name = id
0
- spec.version = version
0
- spec.summary = full_comment
0
- spec.has_rdoc = true
0
- spec.rdoc_options << '--title' << comment
0
- spec.require_path = 'lib'
0
- end
0
- end
0
- end
0
-
0
- end
0
-
0
- class Project
0
- include PackageAsGem
0
- end
0
-
0
-end
...
13
14
15
 
 
16
17
18
...
118
119
120
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
 
 
 
 
 
 
 
 
 
 
 
123
 
...
13
14
15
16
17
18
19
20
...
120
121
122
 
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
0
@@ -13,6 +13,8 @@
0
 # License for the specific language governing permissions and limitations under
0
 # the License.
0
 
0
+
0
+require 'rake'
0
 require 'tempfile'
0
 require 'open-uri'
0
 $LOADED_FEATURES << 'rubygems/open-uri.rb' # avoid loading rubygems' open-uri
0
@@ -118,6 +120,36 @@ module Buildr
0
 
0
   end
0
 
0
-end
0
+ # A file task that concatenates all its prerequisites to create a new file.
0
+ #
0
+ # For example:
0
+ # concat("master.sql"=>["users.sql", "orders.sql", reports.sql"]
0
+ #
0
+ # See also Buildr#concat.
0
+ class ConcatTask < Rake::FileTask
0
+ def initialize(*args) #:nodoc:
0
+ super
0
+ enhance do |task|
0
+ content = prerequisites.inject("") do |content, prereq|
0
+ content << File.read(prereq.to_s) if File.exists?(prereq) && !File.directory?(prereq)
0
+ content
0
+ end
0
+ File.open(task.name, "wb") { |file| file.write content }
0
+ end
0
+ end
0
+ end
0
 
0
+ # :call-seq:
0
+ # concat(target=>files) => task
0
+ #
0
+ # Creates and returns a file task that concatenates all its prerequisites to create
0
+ # a new file. See #ConcatTask.
0
+ #
0
+ # For example:
0
+ # concat("master.sql"=>["users.sql", "orders.sql", reports.sql"]
0
+ def concat(args)
0
+ file, arg_names, deps = Buildr.application.resolve_args([args])
0
+ ConcatTask.define_task(File.expand_path(file)=>deps)
0
+ end
0
 
0
+end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,233 +0,0 @@
0
-# Licensed to the Apache Software Foundation (ASF) under one or more
0
-# contributor license agreements. See the NOTICE file distributed with this
0
-# work for additional information regarding copyright ownership. The ASF
0
-# licenses this file to you under the Apache License, Version 2.0 (the
0
-# "License"); you may not use this file except in compliance with the License.
0
-# You may obtain a copy of the License at
0
-#
0
-# http://www.apache.org/licenses/LICENSE-2.0
0
-#
0
-# Unless required by applicable law or agreed to in writing, software
0
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
0
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
0
-# License for the specific language governing permissions and limitations under
0
-# the License.
0
-
0
-
0
-require 'buildr/core/project'
0
-require 'buildr/core/compile'
0
-require 'buildr/java/artifact'
0
-
0
-
0
-module Buildr
0
- # Methods added to Project to support packaging and tasks for packaging,
0
- # installing and uploading packages.
0
- module Package
0
-
0
- include Extension
0
-
0
- first_time do
0
- desc 'Create packages'
0
- Project.local_task('package'=>'build') { |name| "Packaging #{name}" }
0
- desc 'Install packages created by the project'
0
- Project.local_task('install'=>'package') { |name| "Installing packages from #{name}" }
0
- desc 'Remove previously installed packages'
0
- Project.local_task('uninstall') { |name| "Uninstalling packages from #{name}" }
0
- desc 'Upload packages created by the project'
0
- Project.local_task('upload'=>'package') { |name| "Deploying packages from #{name}" }
0
- # Anything that comes after local packaging (install, deploy) executes the integration tests,
0
- # which do not conflict with integration invoking the project's own packaging (package=>
0
- # integration=>foo:package is not circular, just confusing to debug.)
0
- task 'package' do
0
- task('integration').invoke if Buildr.options.test && Buildr.application.original_dir == Dir.pwd
0
- end
0
- end
0
-
0
- before_define do |project|
0
- [ :package, :install, :uninstall, :upload ].each { |name| project.recursive_task name }
0
- # Need to run build before package, since package is often used as a dependency by tasks that
0
- # expect build to happen.
0
- project.task('package'=>project.task('build'))
0
- project.group ||= project.parent && project.parent.group || project.name
0
- project.version ||= project.parent && project.parent.version
0
- end
0
-
0
- # The project's identifier. Same as the project name, with colons replaced by dashes.
0
- # The ID for project foo:bar is foo-bar.
0
- def id
0
- name.gsub(':', '-')
0
- end
0
-
0
- # Group used for packaging. Inherited from parent project. Defaults to the top-level project name.
0
- attr_accessor :group
0
-
0
- # Version used for packaging. Inherited from parent project.
0
- attr_accessor :version
0
-
0
- # :call-seq:
0
- # package(type, spec?) => task
0
- #
0
- # Defines and returns a package created by this project.
0
- #
0
- # The first argument declares the package type. For example, :jar to create a JAR file.
0
- # The package is an artifact that takes its artifact specification from the project.
0
- # You can override the artifact specification by passing various options in the second
0
- # argument, for example:
0
- # package(:zip, :classifier=>'sources')
0
- #
0
- # Packages that are ZIP files provides various ways to include additional files, directories,
0
- # and even merge ZIPs together. Have a look at ZipTask for more information. In case you're
0
- # wondering, JAR and WAR packages are ZIP files.
0
- #
0
- # You can also enhance a JAR package using the ZipTask#with method that accepts the following options:
0
- # * :manifest -- Specifies how to create the MANIFEST.MF. By default, uses the project's
0
- # #manifest property.
0
- # * :meta_inf -- Specifies files to be included in the META-INF directory. By default,
0
- # uses the project's #meta-inf property.
0
- #
0
- # The WAR package supports the same options and adds a few more:
0
- # * :classes -- Directories of class files to include in WEB-INF/classes. Includes the compile
0
- # target directory by default.
0
- # * :libs -- Artifacts and files to include in WEB-INF/libs. Includes the compile classpath
0
- # dependencies by default.
0
- #
0
- # For example:
0
- # define 'project' do
0
- # define 'beans' do
0
- # package :jar
0
- # end
0
- # define 'webapp' do
0
- # compile.with project('beans')
0
- # package(:war).with :libs=>MYSQL_JDBC
0
- # end
0
- # package(:zip, :classifier=>'sources').include path_to('.')
0
- # end
0
- #
0
- # Two other packaging types are:
0
- # * package :sources -- Creates a ZIP file with the source code and classifier 'sources', for use by IDEs.
0
- # * package :javadoc -- Creates a ZIP file with the Javadocs and classifier 'javadoc'. You can use the
0
- # javadoc method to further customize it.
0
- #
0
- # A package is also an artifact. The following tasks operate on packages created by the project:
0
- # buildr upload # Upload packages created by the project
0
- # buildr install # Install packages created by the project
0
- # buildr package # Create packages
0
- # buildr uninstall # Remove previously installed packages
0
- #
0
- # If you want to add additional packaging types, implement a method with the name package_as_[type]
0
- # that accepts a file name and returns an appropriate Rake task. For example:
0
- # def package_as_zip(file_name) #:nodoc:
0
- # ZipTask.define_task(file_name)
0
- # end
0
- #
0
- # The file name is determined from the specification passed to the package method, however, some
0
- # packagers need to override this. For example, package(:sources) produces a file with the extension
0
- # 'zip' and the classifier 'sources'. If you need to overwrite the default implementation, you should
0
- # also include a method named package_as_[type]_respec. For example:
0
- # def package_as_sources_spec(spec) #:nodoc:
0
- # { :type=>:zip, :classifier=>'sources' }.merge(spec)
0
- # end
0
- def package(*args)
0
- spec = Hash === args.last ? args.pop.dup : {}
0
- if spec[:file]
0
- rake_check_options spec, :file, :type
0
- spec[:type] = args.shift || spec[:type] || spec[:file].split('.').last
0
- file_name = spec[:file]
0
- else
0
- rake_check_options spec, *ActsAsArtifact::ARTIFACT_ATTRIBUTES
0
- spec[:id] ||= self.id
0
- spec[:group] ||= self.group
0
- spec[:version] ||= self.version
0
- spec[:type] = args.shift || spec[:type] || compile.packaging || :zip
0
- end
0
-
0
- packager = method("package_as_#{spec[:type]}") rescue fail("Don't know how to create a package of type #{spec[:type]}")
0
- if packager.arity == 1
0
- unless file_name
0
- spec = send("package_as_#{spec[:type]}_spec", spec) if respond_to?("package_as_#{spec[:type]}_spec")
0
- file_name = path_to(:target, Artifact.hash_to_file_name(spec))
0
- end
0
- package = packages.find { |pkg| pkg.name == file_name } || packager.call(file_name)
0
- else
0
- Buildr.application.deprecated "We changed the way package_as methods are implemented. See the package method documentation for more details."
0
- file_name ||= path_to(:target, Artifact.hash_to_file_name(spec))
0
- package = packager.call(file_name, spec)
0
- end
0
-
0
- # First time: prepare package for install, uninstall and upload tasks.
0
- unless packages.include?(package)
0
- # We already run build before package, but we also need to do so if the package itself is
0
- # used as a dependency, before we get to run the package task.
0
- task 'package'=>package
0
- package.enhance [task('build')]
0
-
0
- if spec[:file]
0
- class << package ; self ; end.send(:define_method, :type) { spec[:type] }
0
- elsif !package.respond_to?(:install)
0
- # Make it an artifact using the specifications, and tell it how to create a POM.
0
- package.extend ActsAsArtifact
0
- package.send :apply_spec, spec.only(*Artifact::ARTIFACT_ATTRIBUTES)
0
- # Another task to create the POM file.
0
- pom = package.pom
0
- pom.enhance do
0
- mkpath File.dirname(pom.name), :verbose=>false
0
- File.open(pom.name, 'w') { |file| file.write pom.pom_xml }
0
- end
0
- file(Buildr.repositories.locate(package)=>package) { package.install }
0
-
0
- # Add the package to the list of packages created by this project, and
0
- # register it as an artifact. The later is required so if we look up the spec
0
- # we find the package in the project's target directory, instead of finding it
0
- # in the local repository and attempting to install it.
0
- Artifact.register package, pom
0
- end
0
-
0
- task('install') { package.install if package.respond_to?(:install) }
0
- task('uninstall') { package.uninstall if package.respond_to?(:uninstall) }
0
- task('upload') { package.upload if package.respond_to?(:upload) }
0
-
0
- packages << package
0
- end
0
- package
0
- end
0
-
0
- # :call-seq:
0
- # packages => tasks
0
- #
0
- # Returns all packages created by this project. A project may create any number of packages.
0
- #
0
- # This method is used whenever you pass a project to Buildr#artifact or any other method
0
- # that accepts artifact specifications and projects. You can use it to list all packages
0
- # created by the project. If you want to return a specific package, it is often more
0
- # convenient to call #package with the type.
0
- def packages
0
- @packages ||= []
0
- end
0
-
0
- protected
0
-
0
- def package_as_zip(file_name) #:nodoc:
0
- ZipTask.define_task(file_name)
0
- end
0
-
0
- def package_as_tar(file_name) #:nodoc:
0
- TarTask.define_task(file_name)
0
- end
0
- alias :package_as_tgz :package_as_tar
0
-
0
- def package_as_sources_spec(spec) #:nodoc:
0
- spec.merge(:type=>:zip, :classifier=>'sources')
0
- end
0
-
0
- def package_as_sources(file_name) #:nodoc:
0
- ZipTask.define_task(file_name).tap do |zip|
0
- zip.include :from=>compile.sources
0
- end
0
- end
0
-
0
- end
0
-end
0
-
0
-class Buildr::Project
0
- include Buildr::Package
0
-end
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@
0
 
0
 
0
 require 'buildr/core/project'
0
-require 'buildr/java/artifact'
0
+require 'buildr/packaging'
0
 
0
 
0
 module Buildr
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@
0
 
0
 
0
 require 'buildr/core/project'
0
-require 'buildr/java/artifact'
0
+require 'buildr/packaging'
0
 require 'stringio'
0
 require 'rexml/document'
0
 
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@
0
 
0
 
0
 require 'buildr/core/project'
0
-require 'buildr/java/artifact'
0
+require 'buildr/packaging'
0
 require 'stringio'
0
 require 'rexml/document'
0
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,699 +0,0 @@
0
-# Licensed to the Apache Software Foundation (ASF) under one or more
0
-# contributor license agreements. See the NOTICE file distributed with this
0
-# work for additional information regarding copyright ownership. The ASF
0
-# licenses this file to you under the Apache License, Version 2.0 (the
0
-# "License"); you may not use this file except in compliance with the License.
0
-# You may obtain a copy of the License at
0
-#
0
-# http://www.apache.org/licenses/LICENSE-2.0
0
-#
0
-# Unless required by applicable law or agreed to in writing, software
0
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
0
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
0
-# License for the specific language governing permissions and limitations under