buildr 1.4.16 → 1.4.17
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
@@ -0,0 +1,199 @@
|
|
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
|
+
# Provides the <code>scss_lint:html</code> and <code>scss_lint:xml</code> tasks.
|
18
|
+
# Require explicitly using <code>require "buildr/scss_lint"</code>.
|
19
|
+
module ScssLint
|
20
|
+
class << self
|
21
|
+
|
22
|
+
def scss_lint(output_file, source_paths, options = {})
|
23
|
+
args = []
|
24
|
+
if ENV['BUNDLE_GEMFILE']
|
25
|
+
args << 'bundle'
|
26
|
+
args << 'exec'
|
27
|
+
end
|
28
|
+
args << 'scss-lint'
|
29
|
+
if options[:configuration_file]
|
30
|
+
args << '--config'
|
31
|
+
args << options[:configuration_file]
|
32
|
+
end
|
33
|
+
if options[:file_excludes]
|
34
|
+
args << '--exclude'
|
35
|
+
args << options[:file_excludes].join(',')
|
36
|
+
end
|
37
|
+
if options[:formatter]
|
38
|
+
args << '--format'
|
39
|
+
args << options[:formatter]
|
40
|
+
end
|
41
|
+
if options[:linter_includes] && !options[:linter_includes].empty?
|
42
|
+
args << '--include-linter'
|
43
|
+
args << options[:linter_includes].join(',')
|
44
|
+
end
|
45
|
+
if options[:linter_excludes] && !options[:linter_excludes].empty?
|
46
|
+
args << '--exclude-linter'
|
47
|
+
args << options[:linter_excludes].join(',')
|
48
|
+
end
|
49
|
+
|
50
|
+
source_paths.each do |source_path|
|
51
|
+
args << source_path
|
52
|
+
end
|
53
|
+
|
54
|
+
mkdir_p File.dirname(output_file)
|
55
|
+
File.open(output_file, 'wb') do |f|
|
56
|
+
f.write `#{args.join(' ')}`
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class Config
|
62
|
+
def enabled?
|
63
|
+
File.exist?(self.configuration_file)
|
64
|
+
end
|
65
|
+
|
66
|
+
def html_enabled?
|
67
|
+
File.exist?(self.style_file)
|
68
|
+
end
|
69
|
+
|
70
|
+
attr_writer :config_directory
|
71
|
+
|
72
|
+
def config_directory
|
73
|
+
@config_directory || project._(:source, :main, :etc, :scss_lint)
|
74
|
+
end
|
75
|
+
|
76
|
+
attr_writer :report_dir
|
77
|
+
|
78
|
+
def report_dir
|
79
|
+
@report_dir || project._(:reports, :scss_lint)
|
80
|
+
end
|
81
|
+
|
82
|
+
attr_writer :file_excludes
|
83
|
+
|
84
|
+
def file_excludes
|
85
|
+
@file_excludes ||= []
|
86
|
+
end
|
87
|
+
|
88
|
+
attr_writer :linter_includes
|
89
|
+
|
90
|
+
def linter_includes
|
91
|
+
@linter_includes ||= []
|
92
|
+
end
|
93
|
+
|
94
|
+
attr_writer :linter_excludes
|
95
|
+
|
96
|
+
def linter_excludes
|
97
|
+
@linter_excludes ||= []
|
98
|
+
end
|
99
|
+
|
100
|
+
attr_writer :configuration_file
|
101
|
+
|
102
|
+
def configuration_file
|
103
|
+
@configuration_file || "#{self.config_directory}/checks.yml"
|
104
|
+
end
|
105
|
+
|
106
|
+
attr_writer :format
|
107
|
+
|
108
|
+
def format
|
109
|
+
@format || 'XML'
|
110
|
+
end
|
111
|
+
|
112
|
+
attr_writer :xml_output_file
|
113
|
+
|
114
|
+
def xml_output_file
|
115
|
+
@xml_output_file || "#{self.report_dir}/scss_lint.xml"
|
116
|
+
end
|
117
|
+
|
118
|
+
attr_writer :html_output_file
|
119
|
+
|
120
|
+
def html_output_file
|
121
|
+
@html_output_file || "#{self.report_dir}/scss_lint.html"
|
122
|
+
end
|
123
|
+
|
124
|
+
attr_writer :style_file
|
125
|
+
|
126
|
+
def style_file
|
127
|
+
unless @style_file
|
128
|
+
project_xsl = "#{self.config_directory}/scss_lint-report.xsl"
|
129
|
+
if File.exist?(project_xsl)
|
130
|
+
@style_file = project_xsl
|
131
|
+
else
|
132
|
+
@style_file = "#{File.dirname(__FILE__)}/scss_lint-report.xsl"
|
133
|
+
end
|
134
|
+
end
|
135
|
+
@style_file
|
136
|
+
end
|
137
|
+
|
138
|
+
def source_paths
|
139
|
+
@source_paths ||= [self.project._(:source, :main, :webapp, :sass)]
|
140
|
+
end
|
141
|
+
|
142
|
+
protected
|
143
|
+
|
144
|
+
def initialize(project)
|
145
|
+
@project = project
|
146
|
+
end
|
147
|
+
|
148
|
+
attr_reader :project
|
149
|
+
|
150
|
+
end
|
151
|
+
|
152
|
+
module ProjectExtension
|
153
|
+
include Extension
|
154
|
+
|
155
|
+
def scss_lint
|
156
|
+
@scss_lint ||= Buildr::ScssLint::Config.new(project)
|
157
|
+
end
|
158
|
+
|
159
|
+
after_define do |project|
|
160
|
+
if project.scss_lint.enabled?
|
161
|
+
desc "Generate scss-lint xml report."
|
162
|
+
project.task("scss_lint:xml") do
|
163
|
+
source_paths = project.scss_lint.source_paths.flatten.compact
|
164
|
+
source_paths.each do |path|
|
165
|
+
path.respond_to?(:invoke) ? path.invoke : project.file(path).invoke
|
166
|
+
end
|
167
|
+
puts "ScssLint: Analyzing source code..."
|
168
|
+
Buildr::ScssLint.scss_lint(project.scss_lint.xml_output_file,
|
169
|
+
source_paths,
|
170
|
+
:formatter => project.scss_lint.format,
|
171
|
+
:configuration_file => project.scss_lint.configuration_file,
|
172
|
+
:file_excludes => project.scss_lint.file_excludes,
|
173
|
+
:linter_includes => project.scss_lint.linter_includes,
|
174
|
+
:linter_excludes => project.scss_lint.linter_excludes)
|
175
|
+
end
|
176
|
+
|
177
|
+
if project.scss_lint.html_enabled?
|
178
|
+
xml_task = project.task("scss_lint:xml")
|
179
|
+
desc "Generate scss_lint html report."
|
180
|
+
project.task("scss_lint:html" => xml_task) do
|
181
|
+
puts "ScssLint: Generating report"
|
182
|
+
mkdir_p File.dirname(project.scss_lint.html_output_file)
|
183
|
+
Buildr.ant "scss_lint" do |ant|
|
184
|
+
ant.xslt :in => project.scss_lint.xml_output_file,
|
185
|
+
:out => project.scss_lint.html_output_file,
|
186
|
+
:style => project.scss_lint.style_file
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
class Buildr::Project
|
198
|
+
include Buildr::ScssLint::ProjectExtension
|
199
|
+
end
|
data/addon/buildr/wsgen.rb
CHANGED
@@ -114,6 +114,7 @@ module Buildr
|
|
114
114
|
# Service options include:
|
115
115
|
# * :service_name -- The name of the service.
|
116
116
|
# * :package -- The package in which to generate the code.
|
117
|
+
# * :extension -- Should we allow non-portable extensions.
|
117
118
|
#
|
118
119
|
# Method options include:
|
119
120
|
# * :output_dir -- The target directory.
|
@@ -153,6 +154,9 @@ module Buildr
|
|
153
154
|
command << ws_dir
|
154
155
|
command << "-p"
|
155
156
|
command << pkg
|
157
|
+
if config[:extension]
|
158
|
+
command << "-extension"
|
159
|
+
end
|
156
160
|
if wsdl_location
|
157
161
|
command << "-wsdllocation"
|
158
162
|
command << wsdl_location
|
data/doc/building.textile
CHANGED
@@ -130,7 +130,7 @@ You can also use "profiles":settings_profiles.html#profiles to supply a name/val
|
|
130
130
|
filter: &alpha1
|
131
131
|
version: experimental
|
132
132
|
copyright: Acme Inc (C) 2007
|
133
|
-
|
133
|
+
|
134
134
|
development:
|
135
135
|
filter: *alpha1
|
136
136
|
test:
|
@@ -143,7 +143,7 @@ You can specify a different format by passing it as the first argument. Supporte
|
|
143
143
|
| @:ant@ | Map from <code>@key@</code> to value. |
|
144
144
|
| @:maven@ | Map from @${key}@ to value (default). |
|
145
145
|
| @:ruby@ | Map from @#{key}@ to value. |
|
146
|
-
| @:erb@ | Map from @<%=key%>@ to value. |
|
146
|
+
| @:erb@ | Map from @<%=key%>@ to value. |
|
147
147
|
| @Regexp@ | Map using the matched value of the regular expression (e.g. @/=(.*?)=/@). |
|
148
148
|
|
149
149
|
For example, using the @:ruby@ format instead of the default @:maven@ format:
|
@@ -234,7 +234,7 @@ The @build@ task has an evil twin, the @clean@ task. It's the task you use to r
|
|
234
234
|
|
235
235
|
It basically erases the target directories, the one called @target@, and if you get creative and change the target directory for tasks like @compile@, it will also erase those. If you decide to generate files outside the target directory and want to cleanup after yourself, just extend the @clean@ task.
|
236
236
|
|
237
|
-
For example:
|
237
|
+
For example:
|
238
238
|
|
239
239
|
{% highlight ruby %}
|
240
240
|
clean { rm_rf _('staged') }
|
data/doc/css/default.css
CHANGED
@@ -82,7 +82,7 @@ blockquote {
|
|
82
82
|
font-style: italic;
|
83
83
|
}
|
84
84
|
|
85
|
-
ul {
|
85
|
+
ul {
|
86
86
|
list-style-type: disc;
|
87
87
|
}
|
88
88
|
|
@@ -153,7 +153,7 @@ th, thead td {
|
|
153
153
|
#pages ol li {
|
154
154
|
padding: 0.3em 0 0.6em 0em;
|
155
155
|
color: #669966;
|
156
|
-
font-weight: bold;
|
156
|
+
font-weight: bold;
|
157
157
|
}
|
158
158
|
#pages ol li ol {
|
159
159
|
margin-top: 0.3em;
|
@@ -206,7 +206,7 @@ ol.toc li ol.toc {
|
|
206
206
|
}
|
207
207
|
#content p.tip { background: url("../images/tip.png") 0 0 no-repeat; }
|
208
208
|
#content p.note { background: url("../images/note.png") 0 0 no-repeat; }
|
209
|
-
|
209
|
+
|
210
210
|
#content .footnote {
|
211
211
|
margin-top: 2.5em;
|
212
212
|
}
|
data/doc/css/print.css
CHANGED
data/doc/download.textile
CHANGED
@@ -20,16 +20,28 @@ The source code is included in both source and binary distribution, the Gem dist
|
|
20
20
|
|
21
21
|
h2(#dist). Binaries and Source Code
|
22
22
|
|
23
|
+
h3. buildr 1.4.16 (2014-05-03)
|
24
|
+
|
25
|
+
|_. Package |_. MD5 Checksum |_. PGP |
|
26
|
+
| "buildr-1.4.16-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16-java.gem | "da920dd00f4b09f01aa0e5c71a8a87e5":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.asc |
|
27
|
+
| "buildr-1.4.16-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem | "10180c59e1b11da4d6f499fd3f0d43bb":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.asc |
|
28
|
+
| "buildr-1.4.16.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.gem | "cfc81dacdd825928a5e1a8b55735895b":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.asc |
|
29
|
+
| "buildr-1.4.16.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.tgz | "b3234fff8924589fe2826acecc7bc03e":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.asc |
|
30
|
+
| "buildr-1.4.16.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.zip | "a20af0a5046e84813561ae50ce58703c":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.asc |
|
31
|
+
|
32
|
+
p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.16/KEYS)
|
33
|
+
|
34
|
+
|
23
35
|
h3. buildr 1.4.15 (2013-11-06)
|
24
36
|
|
25
37
|
|_. Package |_. MD5 Checksum |_. PGP |
|
26
|
-
| "buildr-1.4.15-java.gem":http://
|
27
|
-
| "buildr-1.4.15-x86-mswin32.gem":http://
|
28
|
-
| "buildr-1.4.15.gem":http://
|
29
|
-
| "buildr-1.4.15.tgz":http://
|
30
|
-
| "buildr-1.4.15.zip":http://
|
38
|
+
| "buildr-1.4.15-java.gem":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-java.gem | "5ea7f855a2e57340d840fea3ef635a44":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-java.gem.asc |
|
39
|
+
| "buildr-1.4.15-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-x86-mswin32.gem | "e297b9a358ed2fe90afe0a67285c1236":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15-x86-mswin32.gem.asc |
|
40
|
+
| "buildr-1.4.15.gem":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.gem | "d4052ac4aa739c63ab7ad08d80719a1a":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.gem.asc |
|
41
|
+
| "buildr-1.4.15.tgz":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.tgz | "c80a6fee2d2cfe7de1a57821596444bd":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.tgz.asc |
|
42
|
+
| "buildr-1.4.15.zip":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.zip | "0c63028d9965817b8d17ca49096974dc":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.15/buildr-1.4.15.zip.asc |
|
31
43
|
|
32
|
-
p>. ("Release signing keys":http://
|
44
|
+
p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.4.15/KEYS)
|
33
45
|
|
34
46
|
|
35
47
|
h3. buildr 1.4.14 (2013-10-11)
|
@@ -268,4 +280,3 @@ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.0-incubati
|
|
268
280
|
|
269
281
|
|
270
282
|
p(note). When downloading from files please check the "md5sum":http://www.apache.org/dev/release-signing#md5 and verify the "OpenPGP":http://www.apache.org/dev/release-signing#openpgp compatible signature from the main Apache site. This KEYS file contains the public keys used for signing releases. It is recommended that (when possible) a web of trust is used to confirm the identity of these keys. For more information, please see the "Apache Release FAQ":http://www.apache.org/dev/release.html.
|
271
|
-
|
data/doc/index.textile
CHANGED
@@ -46,6 +46,14 @@ So let's get started. You can "read the documentation online":quick_start.html,
|
|
46
46
|
|
47
47
|
h2(#news). What's New
|
48
48
|
|
49
|
+
Highlights from Buildr 1.4.17 (2014-05-25)
|
50
|
+
|
51
|
+
* Change: Supply a default xsl file for generating the checkstyle report.
|
52
|
+
* Added: Add csslint tasks css_lint:xml and css_lint:html that support source code analysis of CSS files.
|
53
|
+
* Added: Add scss_lint tasks scss_lint:xml and scss_lint:html that support source code analysis of SCSS files.
|
54
|
+
* Added: Import 'buildr/custom_pom' addon to make it easier to build POMs for projects publishing to Maven Central.
|
55
|
+
* Added: Add flag to allow non portable extensions in wsgen addon.
|
56
|
+
|
49
57
|
Highlights from Buildr 1.4.16 (2014-05-03)
|
50
58
|
|
51
59
|
* Added: Add the ability to generate a html report when using the
|
@@ -75,4 +83,3 @@ The Apache Software Foundation is a non-profit organization, consider "sponsorin
|
|
75
83
|
Community member quotes from a thread on "Stack Overflow":http://stackoverflow.com/questions/1015525/why-use-buildr-instead-of-ant-or-maven/1055864.
|
76
84
|
|
77
85
|
Developed with !http://www.jetbrains.com/ruby/features/ruby_banners/ruby1/ruby120x30_white.gif(Developed with RubyMine)!:http://www.jetbrains.com/ruby/features?utm_source=RubyMineUser&utm_medium=Banner&utm_campaign=RubyMine
|
78
|
-
|
data/doc/installing.textile
CHANGED
@@ -11,11 +11,11 @@ The RubyForge distribution is *not* an official Apache distribution. The all-in-
|
|
11
11
|
|
12
12
|
*In details:* Navigate to "Rubyforge's buildr's Files page":http://rubyforge.org/frs/?group_id=3180 and download the all-in-one bundle for the latest version available.
|
13
13
|
|
14
|
-
Unzip the bundle in a convenient location.
|
14
|
+
Unzip the bundle in a convenient location.
|
15
15
|
|
16
|
-
You can execute the buildr executable under the bin directory directly.
|
16
|
+
You can execute the buildr executable under the bin directory directly.
|
17
17
|
|
18
|
-
You should consider adding the bin directory of the result to the @PATH@ global environment variable. See "Installing Buildr for JRuby":#jruby for instructions to update it.
|
18
|
+
You should consider adding the bin directory of the result to the @PATH@ global environment variable. See "Installing Buildr for JRuby":#jruby for instructions to update it.
|
19
19
|
|
20
20
|
h1(#the-gem). Installing the gem
|
21
21
|
|
data/doc/languages.textile
CHANGED
@@ -617,4 +617,3 @@ Supports the following options:
|
|
617
617
|
| @:fork@ | Run the tests on a new java vm. (enabled unless running on JRuby) |
|
618
618
|
| @:properties@ | Hash of system properties available to the test case. |
|
619
619
|
| @:java_args@ | Arguments passed as is to the JVM. (only when fork is enabled) |
|
620
|
-
|
data/doc/mailing_lists.textile
CHANGED
@@ -23,7 +23,3 @@ title: Mailing Lists
|
|
23
23
|
| Search | "http://buildr.markmail.org/search/list:ci":http://buildr.markmail.org/search/list:ci |
|
24
24
|
| Subscribe | "ci-subscribe@buildr.apache.org":mailto:ci-subscribe@buildr.apache.org |
|
25
25
|
| Unsubscribe | "ci-unsubscribe@buildr.apache.org":mailto:ci-unsubscribe@buildr.apache.org |
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
data/doc/more_stuff.textile
CHANGED
@@ -391,6 +391,78 @@ $ buildr --generate /path/to/my_project
|
|
391
391
|
|
392
392
|
This creates a basic buildfile with a main project called 'my_project'. The buildfile contains a skeleton for compiling the Eclipse projects. If you want to automate dependency tracking via OSGi have a look at the "buildr4osgi":http://oss.intalio.com/buildr4osgi/ project. Support for building Eclipse RCP applications, running PDE tests and P2-sites is currently lacking in Buildr.
|
393
393
|
|
394
|
+
h2(#maven_central). Releasing to Maven Central
|
395
|
+
|
396
|
+
Many opensource projects release their artifacts to Maven Central. To release a library to Maven Central, the project needs to provide several elements for each library;
|
397
|
+
|
398
|
+
* the jar artifact,
|
399
|
+
* the sources artifact,
|
400
|
+
* the javadocs artifact,
|
401
|
+
* a pom that supplies fields required by Maven Central, and
|
402
|
+
* gpg signatures for every file supplied.
|
403
|
+
|
404
|
+
Buildr has built-in support for the artifacts and can easily sign the artifacts using the 'buildr/gpg' addon. However it has not always been easy to generate a pom in the required format until the 'buildr/custom_pom' became available.
|
405
|
+
|
406
|
+
Below is an extremely verbose example of a project that provides all the elements required to publish to Maven Central.
|
407
|
+
|
408
|
+
{% highlight sh %}
|
409
|
+
# Include addon to generate GPG Signatures
|
410
|
+
require 'buildr/gpg'
|
411
|
+
# Include addon to generate custom pom
|
412
|
+
require 'buildr/custom_pom'
|
413
|
+
|
414
|
+
define 'myproject' do
|
415
|
+
project.group = 'org.myproject'
|
416
|
+
project.version = '1.0'
|
417
|
+
|
418
|
+
pom.licenses['The Apache Software License, Version 2.0'] = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
419
|
+
pom.scm_connection = pom.scm_developer_connection = 'scm:git:git@github.com:jbloggs/myproject'
|
420
|
+
pom.scm_url = 'git@github.com:jbloggs/myproject'
|
421
|
+
pom.url = 'https://github.com/jbloggs/myproject'
|
422
|
+
pom.issues_url = 'https://github.com/jbloggs/myproject/issues'
|
423
|
+
pom.issues_system = 'GitHub Issues'
|
424
|
+
pom.add_developer('jbloggs', 'Joe Bloggs', 'jbloggs@example.com', ['Project Lead'])
|
425
|
+
pom.provided_dependencies.concat [:javax_servlet]
|
426
|
+
pom.optional_dependencies.concat [:optional_api]
|
427
|
+
|
428
|
+
compile.with :javax_servlet, :some_api, :optional_api
|
429
|
+
|
430
|
+
test.with :mockito
|
431
|
+
|
432
|
+
package(:jar)
|
433
|
+
package(:sources)
|
434
|
+
package(:javadoc)
|
435
|
+
end
|
436
|
+
{% endhighlight %}
|
437
|
+
|
438
|
+
That example is however, extremely verbose and there is a number of helper methods been added to the 'buildr/custom_pom' addon to simplify common scenarios. It would be more common to see the addon used in the following manner;
|
439
|
+
|
440
|
+
{% highlight sh %}
|
441
|
+
require 'buildr/gpg'
|
442
|
+
require 'buildr/custom_pom'
|
443
|
+
|
444
|
+
define 'myproject' do
|
445
|
+
project.group = 'org.myproject'
|
446
|
+
project.version = '1.0'
|
447
|
+
|
448
|
+
pom.add_apache2_license
|
449
|
+
pom.add_github_project('jbloggs/myproject')
|
450
|
+
pom.add_developer('jbloggs', 'Joe Bloggs')
|
451
|
+
pom.provided_dependencies.concat [:javax_servlet]
|
452
|
+
pom.optional_dependencies.concat [:optional_api]
|
453
|
+
|
454
|
+
compile.with :javax_servlet, :optional_api
|
455
|
+
|
456
|
+
test.with :mockito
|
457
|
+
|
458
|
+
package(:jar)
|
459
|
+
package(:sources)
|
460
|
+
package(:javadoc)
|
461
|
+
end
|
462
|
+
{% endhighlight %}
|
463
|
+
|
464
|
+
If there are other common scenarios useful for opensource developers, feel free to make a request on buildr mailing list to provide simplified helper methods.
|
465
|
+
|
394
466
|
h2(#idea). IntelliJ IDEA
|
395
467
|
|
396
468
|
If you use IntelliJ IDEA, you can generate project files by issuing:
|
@@ -812,7 +884,7 @@ $ buildr -rbuildr/java/cobertura cobertura:html
|
|
812
884
|
|
813
885
|
h2(#checkstyle). Checkstyle
|
814
886
|
|
815
|
-
Checkstyle is integrated into Buildr through an extension. The extension adds the "checkstyle:xml" task that generates an xml report listing checkstyle violations and
|
887
|
+
Checkstyle is integrated into Buildr through an extension. The extension adds the "checkstyle:xml" task that generates an xml report listing checkstyle violations and a "checkstyle:html" task to generate the html variant. A typical project that uses the extension may look something like;
|
816
888
|
|
817
889
|
{% highlight ruby %}
|
818
890
|
require 'buildr/checkstyle'
|
@@ -833,7 +905,7 @@ By default checkstyle will look for all configuration files in the src/main/etc/
|
|
833
905
|
|
834
906
|
The extension will include the source and test directories of the project aswell as the compile and test dependencies when invoking the checkstyle tool. These can be added to by the parameters "checkstyle.source_paths" and "checkstyle.extra_dependencies" as appropriate.
|
835
907
|
|
836
|
-
If the xsl file named "checkstyle-report.xsl" is present in the configuration directory then
|
908
|
+
If the xsl file named "checkstyle-report.xsl" is present in the configuration directory then it will be used to generate the html report, otherwise a xsl file that comes with buildr will be used. The name of the xsl file can be overridden by the parameter "checkstyle.style_file".
|
837
909
|
|
838
910
|
h2(#findbugs). FindBugs
|
839
911
|
|
@@ -987,6 +1059,59 @@ The method compile_jaxb accepts either an array of files or a single file as the
|
|
987
1059
|
* <tt>:keep_content</tt>: By default the generated directory will be deleted. If <tt>true</tt> is specified for this parameter the directory will not be deleted.
|
988
1060
|
* <tt>:package</tt>: The package in which the source is generated.
|
989
1061
|
|
1062
|
+
h2(#css_lint). CssLint
|
1063
|
+
|
1064
|
+
"CssLint":https://github.com/CSSLint/csslint is integrated into Buildr through an extension. The extension adds the "css_lint:xml" task to generate an xml report listing css lint violations and a "css_lint:html" task for a html variant of the same data. It is expected that a project that makes use of css linting will have installed the csslint using node. A typical project that uses the extension may look something like;
|
1065
|
+
|
1066
|
+
{% highlight ruby %}
|
1067
|
+
require 'buildr/css_lint'
|
1068
|
+
|
1069
|
+
define "foo" do
|
1070
|
+
project.version = "1.0.0"
|
1071
|
+
|
1072
|
+
define "bar" do ... end
|
1073
|
+
|
1074
|
+
css_lint.source_paths.concat([some_generated_dir])
|
1075
|
+
css_lint.ignore.concat(%w(box-sizing font-sizes adjoining-classes))
|
1076
|
+
end
|
1077
|
+
{% endhighlight %}
|
1078
|
+
|
1079
|
+
By default css_lint will look for the xsl file in the src/main/etc/css_lint directory but this can be overriden by the setting the "css_lint.config_directory" parameter. The "css_lint:xml" task will be defined if the source_paths is not empty. The rules can be passed to the task using the 'ignores', 'errors' and 'warnings' parameters.
|
1080
|
+
|
1081
|
+
The extension will lint the css files in the "_(:source, :main, :webapp, :css)" directory by default. The set of source directories linted can be controlled by the "css_lint.source_paths" parameter.
|
1082
|
+
|
1083
|
+
If the xsl file named "css_lint-report.xsl" is present in the configuration directory then that will be used in the "css_lint:html" task otherwise a default xsl included with buildr will be used. The name of the xsl file can be overridden by the parameter "css_lint.style_file".
|
1084
|
+
|
1085
|
+
h2(#scss_lint). ScssLint
|
1086
|
+
|
1087
|
+
"ScssLint":https://github.com/causes/scss-lint is integrated into Buildr through an extension. The extension adds the "scss_lint:xml" task to generate an xml report listing scss lint violations and a "scss_lint:html" task for a html variant of the same data. A buildr project that makes uses of the extension is expected to have added 'scss_lint' gem to the projects Gemfile by adding a line such as;
|
1088
|
+
|
1089
|
+
{% highlight ruby %}
|
1090
|
+
gem 'scss-lint', '= 0.24.0'
|
1091
|
+
{% endhighlight %}
|
1092
|
+
|
1093
|
+
A typical project that uses the extension may look something like;
|
1094
|
+
|
1095
|
+
{% highlight ruby %}
|
1096
|
+
require 'buildr/scss_lint'
|
1097
|
+
|
1098
|
+
define "foo" do
|
1099
|
+
project.version = "1.0.0"
|
1100
|
+
|
1101
|
+
define "bar" do ... end
|
1102
|
+
|
1103
|
+
scss_lint.configuration_file = _('etc/scss_lint/checks.yml')
|
1104
|
+
scss_lint.source_paths << project('web')._(:source, :main, :webapp, 'sass')
|
1105
|
+
scss_lint.file_excludes = FileList["#{project('web')._(:source, :main, :webapp, 'sass')}/vendor/**/*"]
|
1106
|
+
end
|
1107
|
+
{% endhighlight %}
|
1108
|
+
|
1109
|
+
By default scss_lint will look for all configuration files in the src/main/etc/scss_lint directory but this can be overriden by the setting the "scss_lint.config_directory" parameter. The "scss_lint:xml" task will be defined if the scss_lint rules file is found. The rules file is named "checks.yml" by default but can be overridden by setting the "scss_lint.configuration_file" parameter.
|
1110
|
+
|
1111
|
+
The extension will lint the sass files in the "_(:source, :main, :webapp, :sass)" directory by default. The set of source directories linted can be controlled by the "scss_lint.source_paths" parameter.
|
1112
|
+
|
1113
|
+
If the xsl file named "scss_lint-report.xsl" is present in the configuration directory then that will be used in the "scss_lint:html" task otherwise a default xsl included with buildr will be used. The name of the xsl file can be overridden by the parameter "scss_lint.style_file".
|
1114
|
+
|
990
1115
|
h2(#anything_ruby). Anything Ruby Can Do
|
991
1116
|
|
992
1117
|
Buildr is Ruby code. That's an implementation detail for some, but a useful features for others. You can use Ruby to keep your build scripts simple and DRY, tackle ad hoc tasks and write reusable features without the complexity of "plugins".
|
@@ -1041,4 +1166,3 @@ puts "There are #{source.size} source files"
|
|
1041
1166
|
lines = sources.inject(0) { |lines, src| lines += File.readlines(src).size }
|
1042
1167
|
puts "That contain #{lines} lines"
|
1043
1168
|
{% endhighlight %}
|
1044
|
-
|