buildr 1.4.17 → 1.4.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzAwYjE0NTBlYTRjYjU2Yjc3NmEzYmRjNTI3OWE0MjFkYzE2ODczNA==
4
+ NTkzMTBlY2Q3ZmQzODRkYTIyNjYzNzVjMzczMTIwNDdhNDE1NjNhZQ==
5
5
  data.tar.gz: !binary |-
6
- MDFlNWU0Yjc2MzIzY2MyNzFjN2U3MTFkNDM0NjUwZWZlMDVmODI5NA==
6
+ ODBkYjk1MWY1YWNlZmE4OTgyZGQ0MDJkYWYxODRjNDk4ZGIzN2JjYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGUwOGRjZTlkMjAyZmM1ZjYyMWMwMGNhYmJiYzIxZjE2OGM5YTE3ZTg2MjMz
10
- N2VjYTExMjMzMWRiMDQzOTczMDkxN2IyN2IwZjYzMWM5ZTYzMWJjY2Y1NDY1
11
- NDFiNzQ5NjQxYzkxMzBiZTc5NjllNGE4NzViNjdhMDM1MjUwZTc=
9
+ YTQ0ODIxZmExOWI0NDk0ODVjNGNmNGJlM2NhN2Y3YzRiOWNlNWI3MTlhNGRk
10
+ OWFhZDRkM2Y1MmU3Y2UwYWE3OTlkMGYzNjk1ZmFlNTNlZWFlNmUzYjk2NmY1
11
+ N2NhNTk4MjJhNTMxZjVlMzNlOGViMTkwMTFkM2RhZDMzZmQ0YTk=
12
12
  data.tar.gz: !binary |-
13
- NmVlMDZjMTNkZmE2YTk3MzM2YTgyYWY3NTc0ZjE3M2ZkNWQxZGFhMjAzNmM0
14
- N2ZhMTgzNTZlNjc3MTIyN2RiODQzMTBjYjRmOTUyNzU4OWM0ZmNjYzliZjZk
15
- NWNhZGViOWU2MDRmYWE5MmIyNWViMGM1MGY0MGU3ZjdhYWJiNDI=
13
+ NjQ4ZWVjOWNlZjg3N2UxYzNjNGI4MjY2NWY1NjhiNzAwNTFhYjJkOWY2NDY4
14
+ YTA5ZWQ0MTIwZTcwZmI1NzBkMjJhODA4MjZhMmUxZDVjYWE4ODE4OWFlN2I3
15
+ MzM2YmI3NGJiN2RmNWRjOWJlM2E3Y2Y4OTNmYmViYjNhMDBmZjA=
data/CHANGELOG CHANGED
@@ -1,3 +1,29 @@
1
+ 1.4.18 (2014-06-24)
2
+ * Fixed: BUILDR-699 - Update the custom_pom addon to avoid failure when
3
+ used with zip packages.
4
+ * Fixed: BUILDR-694 - "buildr upload" fails: wrong number of arguments in
5
+ progress bar read() in Ruby 2.1.0. Submitted By Mark Reibert.
6
+ * Change: Remove support for uploads to RubyForge.org with gem dependencies
7
+ as the site no longer exists.
8
+ * Change: BUILDR-664 - Update Checkstyle addon so that extra_dependencies is
9
+ the project dependencies by default. Move the checkstyle dependencies
10
+ to the start of the classpath to avoid problems running checkstyle.
11
+ Submitted by Dieter Vrancken.
12
+ * Fixed: BUILDR-698 - Correct "Lines of code" example in documentation.
13
+ Submitted By: Trejkaz.
14
+ * Added: Add ipr.add_glassfish_configuration method for defining a local
15
+ glassfish configuration within IDEA.
16
+ * Added: Add ipr.add_ruby_script_configuration method for defining a ruby
17
+ configuration within IDEA.
18
+ * Added: Add ipr.add_java_configuration method for defining a java
19
+ configuration within IDEA.
20
+ * Change: Include additional rules in default pmd rule set: 'finalizers' and
21
+ 'braces'.
22
+ * Change: Upgrade the version of PMD in use to 5.1.1.
23
+ * Change: Supply a default xsl file for generating the jdepend report.
24
+ * Fixed: Fix the naming of css_lint addon file so it is made available
25
+ as an addon.
26
+
1
27
  1.4.17 (2014-05-25)
2
28
  * Added: Add the add_default_testng_configuration method to help IDEA
3
29
  project creation. Improves test coverage across 'default'
data/README.rdoc CHANGED
@@ -13,7 +13,7 @@ Buildr needs Ruby 1.8 or later and RubyGems 0.9 or later.
13
13
  Windows users can get the one-click Ruby installer, which includes the latest
14
14
  version of Ruby and RubyGems:
15
15
 
16
- http://rubyinstaller.rubyforge.org
16
+ http://rubyinstaller.org
17
17
 
18
18
  Make sure to set JAVA_HOME environment variable first, then:
19
19
 
@@ -53,7 +53,7 @@ dependencies are installed when you run:
53
53
  Windows users can get the one-click Ruby installer, which includes the latest
54
54
  version of Ruby and RubyGems:
55
55
 
56
- http://rubyinstaller.rubyforge.org
56
+ http://rubyinstaller.org
57
57
 
58
58
  Before installing Buildr, please set the JAVA_HOME environment variable to
59
59
  point to your JDK distribution. Next, use Ruby Gem to install Buildr:
@@ -2,6 +2,23 @@
2
2
 
3
3
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
4
 
5
+ <!--
6
+ Licensed to the Apache Software Foundation (ASF) under one or more
7
+ contributor license agreements. See the NOTICE file distributed with
8
+ this work for additional information regarding copyright ownership.
9
+ The ASF licenses this file to You under the Apache License, Version 2.0
10
+ (the "License"); you may not use this file except in compliance with
11
+ the License. You may obtain a copy of the License at
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ Unless required by applicable law or agreed to in writing, software
16
+ distributed under the License is distributed on an "AS IS" BASIS,
17
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ See the License for the specific language governing permissions and
19
+ limitations under the License.
20
+ -->
21
+
5
22
  <xsl:template match="/">
6
23
  <html>
7
24
  <head>
@@ -35,7 +35,7 @@ module Buildr
35
35
  end
36
36
 
37
37
  def checkstyle(configuration_file, format, output_file, source_paths, options = {})
38
- dependencies = (options[:dependencies] || []) + self.dependencies
38
+ dependencies = self.dependencies + (options[:dependencies] || [])
39
39
  cp = Buildr.artifacts(dependencies).each { |a| a.invoke() if a.respond_to?(:invoke) }.map(&:to_s)
40
40
 
41
41
  args = []
@@ -153,7 +153,7 @@ module Buildr
153
153
  end
154
154
 
155
155
  def extra_dependencies
156
- @extra_dependencies ||= []
156
+ @extra_dependencies ||= [self.project.compile.dependencies, self.project.test.compile.dependencies].flatten
157
157
  end
158
158
 
159
159
  protected
@@ -2,6 +2,23 @@
2
2
 
3
3
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
4
 
5
+ <!--
6
+ Licensed to the Apache Software Foundation (ASF) under one or more
7
+ contributor license agreements. See the NOTICE file distributed with
8
+ this work for additional information regarding copyright ownership.
9
+ The ASF licenses this file to You under the Apache License, Version 2.0
10
+ (the "License"); you may not use this file except in compliance with
11
+ the License. You may obtain a copy of the License at
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ Unless required by applicable law or agreed to in writing, software
16
+ distributed under the License is distributed on an "AS IS" BASIS,
17
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ See the License for the specific language governing permissions and
19
+ limitations under the License.
20
+ -->
21
+
5
22
  <xsl:template match="/">
6
23
  <html>
7
24
  <head>
File without changes
@@ -236,47 +236,46 @@ module Buildr
236
236
  end
237
237
  end
238
238
  end
239
- end
240
-
241
- module Buildr
242
- class Project #:nodoc:
243
- def pom
244
- unless @pom
245
- @pom = parent ? parent.pom.dup : Buildr::CustomPom.new
246
- @pom.send :associate_project, self
239
+ module CPom
240
+ module ProjectExtension
241
+ include Extension
242
+
243
+ def pom
244
+ unless @pom
245
+ @pom = parent ? parent.pom.dup : Buildr::CustomPom.new
246
+ @pom.send :associate_project, self
247
+ end
248
+ @pom
247
249
  end
248
- @pom
249
- end
250
- end
251
- end
252
250
 
253
- module Buildr
254
- module Package
255
- alias :old_package :package
256
-
257
- def package(*args)
258
- package = old_package(*args)
259
- class << package
260
- def pom
261
- unless @pom || classifier
262
- pom_filename = Util.replace_extension(name, 'pom')
263
- spec = {:group => group, :id => id, :version => version, :type => :pom}
264
- @pom = Buildr.artifact(spec, pom_filename)
265
- buildr_project = Buildr.project(self.scope.join(':'))
266
- @pom.content Buildr::CustomPom.pom_xml(buildr_project, self)
251
+ after_define do |project|
252
+ project.packages.each do |pkg|
253
+ if pkg.type.to_s == 'jar' && !pkg.classifier
254
+ class << pkg
255
+ def pom_xml
256
+ self.pom.content
257
+ end
258
+
259
+ def pom
260
+ unless @pom
261
+ pom_filename = Util.replace_extension(name, 'pom')
262
+ spec = {:group => group, :id => id, :version => version, :type => :pom}
263
+ @pom = Buildr.artifact(spec, pom_filename)
264
+ buildr_project = Buildr.project(self.scope.join(':'))
265
+ @pom.content Buildr::CustomPom.pom_xml(buildr_project, self)
266
+ end
267
+ @pom
268
+ end
269
+ end
270
+ pkg.instance_variable_set('@pom', nil)
271
+ pkg.enhance([pkg.pom.to_s])
267
272
  end
268
- @pom
269
273
  end
270
274
  end
271
- package.instance_variable_set('@pom', nil)
272
- package.enhance([package.pom.to_s]) if package.type.to_s == 'jar' && !package.classifier
273
- package
274
275
  end
275
276
  end
277
+ end
276
278
 
277
- module ActsAsArtifact
278
- def pom_xml
279
- self.pom.content
280
- end
281
- end
279
+ class Buildr::Project
280
+ include Buildr::CPom::ProjectExtension
282
281
  end
data/addon/buildr/gpg.rb CHANGED
@@ -65,7 +65,7 @@ module Buildr
65
65
 
66
66
  def sign_and_upload_all_packages(project)
67
67
  project.packages.each { |pkg| Buildr::GPG.sign_and_upload(project, pkg) }
68
- project.packages.map { |pkg| pkg.pom }.compact.uniq.each { |pom| Buildr::GPG.sign_and_upload(project, pom) }
68
+ project.packages.select {|pkg| pkg.respond_to?(:pom) }.map { |pkg| pkg.pom }.compact.uniq.each { |pom| Buildr::GPG.sign_and_upload(project, pom) }
69
69
  end
70
70
  end
71
71
 
@@ -0,0 +1,404 @@
1
+ <?xml version="1.0"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
+
4
+ <!--
5
+ Licensed to the Apache Software Foundation (ASF) under one or more
6
+ contributor license agreements. See the NOTICE file distributed with
7
+ this work for additional information regarding copyright ownership.
8
+ The ASF licenses this file to You under the Apache License, Version 2.0
9
+ (the "License"); you may not use this file except in compliance with
10
+ the License. You may obtain a copy of the License at
11
+
12
+ http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ Unless required by applicable law or agreed to in writing, software
15
+ distributed under the License is distributed on an "AS IS" BASIS,
16
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and
18
+ limitations under the License.
19
+ -->
20
+
21
+ <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
22
+
23
+ <xsl:template match="JDepend">
24
+ <html>
25
+ <head>
26
+ <title>JDepend Analysis</title>
27
+
28
+ <style type="text/css">
29
+ body {
30
+ font:normal 68% verdana,arial,helvetica;
31
+ color:#000000;
32
+ }
33
+ table tr td, tr th {
34
+ font-size: 68%;
35
+ }
36
+ table.details tr th{
37
+ font-weight: bold;
38
+ text-align:left;
39
+ background:#a6caf0;
40
+ }
41
+ table.details tr td{
42
+ background:#eeeee0;
43
+ }
44
+
45
+ p {
46
+ line-height:1.5em;
47
+ margin-top:0.5em; margin-bottom:1.0em;
48
+ margin-left:2em;
49
+ margin-right:2em;
50
+ }
51
+ h1 {
52
+ margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
53
+ }
54
+ h2 {
55
+ margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
56
+ }
57
+ h3 {
58
+ margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
59
+ }
60
+ h4 {
61
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
62
+ }
63
+ h5 {
64
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
65
+ }
66
+ h6 {
67
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
68
+ }
69
+ .Error {
70
+ font-weight:bold; color:red;
71
+ }
72
+ .Failure {
73
+ font-weight:bold; color:purple;
74
+ }
75
+ .Properties {
76
+ text-align:right;
77
+ }
78
+ </style>
79
+
80
+
81
+ </head>
82
+ <body>
83
+ <!--h1>JDepend Report</h1>
84
+ <ul>
85
+ <xsl:for-each select="./Packages/Package">
86
+ <xsl:sort select="@name"/>
87
+ <li><xsl:value-of select="@name"/></li>
88
+ </xsl:for-each>
89
+ </ul-->
90
+
91
+ <h1>
92
+ <a name="top">JDepend Analysis</a>
93
+ </h1>
94
+ <p align="right">Designed for use with
95
+ <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://buildr.apache.org">Buildr</a>.
96
+ </p>
97
+ <hr size="2"/>
98
+
99
+ <table width="100%">
100
+ <tr>
101
+ <td>
102
+ <a name="NVsummary">
103
+ <h2>Summary</h2>
104
+ </a>
105
+ </td>
106
+ <td align="right">
107
+ [<a href="#NVsummary">summary</a>]
108
+ [<a href="#NVpackages">packages</a>]
109
+ [<a href="#NVcycles">cycles</a>]
110
+ [<a href="#NVexplanations">explanations</a>]
111
+ </td>
112
+ </tr>
113
+ </table>
114
+
115
+ <table width="100%" class="details">
116
+ <tr>
117
+ <th>Package</th>
118
+ <th>Total Classes</th>
119
+ <th>
120
+ <a href="#EXnumber">Abstract Classes</a>
121
+ </th>
122
+ <th>
123
+ <a href="#EXnumber">Concrete Classes</a>
124
+ </th>
125
+ <th>
126
+ <a href="#EXafferent">Afferent Couplings</a>
127
+ </th>
128
+ <th>
129
+ <a href="#EXefferent">Efferent Couplings</a>
130
+ </th>
131
+ <th>
132
+ <a href="#EXabstractness">Abstractness</a>
133
+ </th>
134
+ <th>
135
+ <a href="#EXinstability">Instability</a>
136
+ </th>
137
+ <th>
138
+ <a href="#EXdistance">Distance</a>
139
+ </th>
140
+
141
+ </tr>
142
+ <xsl:for-each select="./Packages/Package">
143
+ <xsl:if test="count(error) = 0">
144
+ <tr>
145
+ <td align="left">
146
+ <a>
147
+ <xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
148
+ </xsl:attribute>
149
+ <xsl:value-of select="@name"/>
150
+ </a>
151
+ </td>
152
+ <td align="right">
153
+ <xsl:value-of select="Stats/TotalClasses"/>
154
+ </td>
155
+ <td align="right">
156
+ <xsl:value-of select="Stats/AbstractClasses"/>
157
+ </td>
158
+ <td align="right">
159
+ <xsl:value-of select="Stats/ConcreteClasses"/>
160
+ </td>
161
+ <td align="right">
162
+ <xsl:value-of select="Stats/Ca"/>
163
+ </td>
164
+ <td align="right">
165
+ <xsl:value-of select="Stats/Ce"/>
166
+ </td>
167
+ <td align="right">
168
+ <xsl:value-of select="Stats/A"/>
169
+ </td>
170
+ <td align="right">
171
+ <xsl:value-of select="Stats/I"/>
172
+ </td>
173
+ <td align="right">
174
+ <xsl:value-of select="Stats/D"/>
175
+ </td>
176
+
177
+
178
+ </tr>
179
+ </xsl:if>
180
+ </xsl:for-each>
181
+ <xsl:for-each select="./Packages/Package">
182
+ <xsl:if test="count(error) &gt; 0">
183
+ <tr>
184
+ <td align="left">
185
+ <xsl:value-of select="@name"/>
186
+ </td>
187
+ <td align="left" colspan="8">
188
+ <xsl:value-of select="error"/>
189
+ </td>
190
+ </tr>
191
+ </xsl:if>
192
+ </xsl:for-each>
193
+ </table>
194
+
195
+ <table width="100%">
196
+ <tr>
197
+ <td>
198
+ <a name="NVpackages">
199
+ <h2>Packages</h2>
200
+ </a>
201
+ </td>
202
+ <td align="right">
203
+ [<a href="#NVsummary">summary</a>]
204
+ [<a href="#NVpackages">packages</a>]
205
+ [<a href="#NVcycles">cycles</a>]
206
+ [<a href="#NVexplanations">explanations</a>]
207
+ </td>
208
+ </tr>
209
+ </table>
210
+
211
+ <xsl:for-each select="./Packages/Package">
212
+ <xsl:if test="count(error) = 0">
213
+ <h3>
214
+ <a>
215
+ <xsl:attribute name="name">PK<xsl:value-of select="@name"/>
216
+ </xsl:attribute>
217
+ <xsl:value-of select="@name"/>
218
+ </a>
219
+ </h3>
220
+
221
+ <table width="100%">
222
+ <tr>
223
+ <td><a href="#EXafferent">Afferent Couplings</a>:
224
+ <xsl:value-of select="Stats/Ca"/>
225
+ </td>
226
+ <td><a href="#EXefferent">Efferent Couplings</a>:
227
+ <xsl:value-of select="Stats/Ce"/>
228
+ </td>
229
+ <td><a href="#EXabstractness">Abstractness</a>:
230
+ <xsl:value-of select="Stats/A"/>
231
+ </td>
232
+ <td><a href="#EXinstability">Instability</a>:
233
+ <xsl:value-of select="Stats/I"/>
234
+ </td>
235
+ <td><a href="#EXdistance">Distance</a>:
236
+ <xsl:value-of select="Stats/D"/>
237
+ </td>
238
+ </tr>
239
+ </table>
240
+
241
+ <table width="100%" class="details">
242
+ <tr>
243
+ <th>Abstract Classes</th>
244
+ <th>Concrete Classes</th>
245
+ <th>Used by Packages</th>
246
+ <th>Uses Packages</th>
247
+ </tr>
248
+ <tr>
249
+ <td valign="top" width="25%">
250
+ <xsl:if test="count(AbstractClasses/Class)=0">
251
+ <i>None</i>
252
+ </xsl:if>
253
+ <xsl:for-each select="AbstractClasses/Class">
254
+ <xsl:value-of select="node()"/>
255
+ <br/>
256
+ </xsl:for-each>
257
+ </td>
258
+ <td valign="top" width="25%">
259
+ <xsl:if test="count(ConcreteClasses/Class)=0">
260
+ <i>None</i>
261
+ </xsl:if>
262
+ <xsl:for-each select="ConcreteClasses/Class">
263
+ <xsl:value-of select="node()"/>
264
+ <br/>
265
+ </xsl:for-each>
266
+ </td>
267
+ <td valign="top" width="25%">
268
+ <xsl:if test="count(UsedBy/Package)=0">
269
+ <i>None</i>
270
+ </xsl:if>
271
+ <xsl:for-each select="UsedBy/Package">
272
+ <a>
273
+ <xsl:attribute name="href">#PK<xsl:value-of select="node()"/>
274
+ </xsl:attribute>
275
+ <xsl:value-of select="node()"/>
276
+ </a>
277
+ <br/>
278
+ </xsl:for-each>
279
+ </td>
280
+ <td valign="top" width="25%">
281
+ <xsl:if test="count(DependsUpon/Package)=0">
282
+ <i>None</i>
283
+ </xsl:if>
284
+ <xsl:for-each select="DependsUpon/Package">
285
+ <a>
286
+ <xsl:attribute name="href">#PK<xsl:value-of select="node()"/>
287
+ </xsl:attribute>
288
+ <xsl:value-of select="node()"/>
289
+ </a>
290
+ <br/>
291
+ </xsl:for-each>
292
+ </td>
293
+ </tr>
294
+ </table>
295
+ </xsl:if>
296
+ </xsl:for-each>
297
+
298
+ <table width="100%">
299
+ <tr>
300
+ <td>
301
+ <a name="NVcycles">
302
+ <h2>Cycles</h2>
303
+ </a>
304
+ </td>
305
+ <td align="right">
306
+ [<a href="#NVsummary">summary</a>]
307
+ [<a href="#NVpackages">packages</a>]
308
+ [<a href="#NVcycles">cycles</a>]
309
+ [<a href="#NVexplanations">explanations</a>]
310
+ </td>
311
+ </tr>
312
+ </table>
313
+
314
+ <xsl:if test="count(Cycles/Package) = 0">
315
+ <p>There are no cyclic dependancies.</p>
316
+ </xsl:if>
317
+ <xsl:for-each select="Cycles/Package">
318
+ <h3>
319
+ <xsl:value-of select="@Name"/>
320
+ </h3>
321
+ <p>
322
+ <xsl:for-each select="Package">
323
+ <xsl:value-of select="."/>
324
+ <br/>
325
+ </xsl:for-each>
326
+ </p>
327
+ </xsl:for-each>
328
+
329
+ <table width="100%">
330
+ <tr>
331
+ <td>
332
+ <a name="NVexplanations">
333
+ <h2>Explanations</h2>
334
+ </a>
335
+ </td>
336
+ <td align="right">
337
+ [<a href="#NVsummary">summary</a>]
338
+ [<a href="#NVpackages">packages</a>]
339
+ [<a href="#NVcycles">cycles</a>]
340
+ [<a href="#NVexplanations">explanations</a>]
341
+ </td>
342
+ </tr>
343
+ </table>
344
+
345
+ <p>The following explanations are for quick reference and are lifted directly from the original<a
346
+ href="http://www.clarkware.com/software/JDepend.html">
347
+ JDepend documentation</a>.
348
+ </p>
349
+
350
+ <h3>
351
+ <a name="EXnumber">Number of Classes</a>
352
+ </h3>
353
+ <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the
354
+ extensibility of the package.
355
+ </p>
356
+ <h3>
357
+ <a name="EXafferent">Afferent Couplings</a>
358
+ </h3>
359
+ <p>The number of other packages that depend upon classes within the package is an indicator of the package's
360
+ responsibility.
361
+ </p>
362
+ <h3>
363
+ <a name="EXefferent">Efferent Couplings</a>
364
+ </h3>
365
+ <p>The number of other packages that the classes in the package depend upon is an indicator of the package's
366
+ independence.
367
+ </p>
368
+ <h3>
369
+ <a name="EXabstractness">Abstractness</a>
370
+ </h3>
371
+ <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of
372
+ classes in the analyzed package.
373
+ </p>
374
+ <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a
375
+ completely abstract package.
376
+ </p>
377
+ <h3>
378
+ <a name="EXinstability">Instability</a>
379
+ </h3>
380
+ <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the
381
+ package's resilience to change.
382
+ </p>
383
+ <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a
384
+ completely instable package.
385
+ </p>
386
+ <h3>
387
+ <a name="EXdistance">Distance</a>
388
+ </h3>
389
+ <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the
390
+ package's balance between abstractness and stability.
391
+ </p>
392
+ <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability.
393
+ Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1,
394
+ y=0).
395
+ </p>
396
+ <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence
397
+ and D=1 indicating a package that is as far from the main sequence as possible.
398
+ </p>
399
+
400
+ </body>
401
+ </html>
402
+ </xsl:template>
403
+
404
+ </xsl:stylesheet>
@@ -98,7 +98,15 @@ module Buildr
98
98
  attr_writer :style_file
99
99
 
100
100
  def style_file
101
- @style_file || "#{self.config_directory}/jdepend.xsl"
101
+ unless @style_file
102
+ project_xsl = "#{self.config_directory}/jdepend-report.xsl"
103
+ if File.exist?(project_xsl)
104
+ @style_file = project_xsl
105
+ else
106
+ @style_file = "#{File.dirname(__FILE__)}/jdepend-report.xsl"
107
+ end
108
+ end
109
+ @style_file
102
110
  end
103
111
 
104
112
  def target_paths