buildr 1.4.16 → 1.4.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG +20 -0
  3. data/addon/buildr/bnd.rb +158 -158
  4. data/addon/buildr/checkstyle-report.xsl +87 -0
  5. data/addon/buildr/checkstyle.rb +213 -205
  6. data/addon/buildr/css_lint-report.xsl +83 -0
  7. data/addon/buildr/css_lint.rake +196 -0
  8. data/addon/buildr/custom_pom.rb +282 -0
  9. data/addon/buildr/drb.rb +0 -1
  10. data/addon/buildr/git_auto_version.rb +34 -34
  11. data/addon/buildr/gwt.rb +171 -171
  12. data/addon/buildr/hibernate.rb +8 -8
  13. data/addon/buildr/javancss.rb +155 -155
  14. data/addon/buildr/jaxb_xjc.rb +74 -74
  15. data/addon/buildr/jibx.rb +0 -1
  16. data/addon/buildr/org/apache/buildr/BuildrNail.java +2 -2
  17. data/addon/buildr/org/apache/buildr/JettyWrapper.java +3 -3
  18. data/addon/buildr/package_as_nsis.rb +2 -2
  19. data/addon/buildr/pmd.rb +166 -166
  20. data/addon/buildr/scss_lint-report.xsl +79 -0
  21. data/addon/buildr/scss_lint.rb +199 -0
  22. data/addon/buildr/wsgen.rb +4 -0
  23. data/doc/building.textile +3 -3
  24. data/doc/css/default.css +3 -3
  25. data/doc/css/print.css +1 -1
  26. data/doc/download.textile +18 -7
  27. data/doc/index.textile +8 -1
  28. data/doc/installing.textile +3 -3
  29. data/doc/languages.textile +0 -1
  30. data/doc/mailing_lists.textile +0 -4
  31. data/doc/more_stuff.textile +127 -3
  32. data/doc/preface.textile +1 -1
  33. data/doc/projects.textile +6 -6
  34. data/doc/releasing.textile +0 -1
  35. data/lib/buildr/clojure/shell.rb +0 -1
  36. data/lib/buildr/core/build.rb +16 -16
  37. data/lib/buildr/core/filter.rb +3 -3
  38. data/lib/buildr/core/jrebel.rb +0 -1
  39. data/lib/buildr/core/linux.rb +0 -1
  40. data/lib/buildr/core/run.rb +0 -1
  41. data/lib/buildr/core/shell.rb +0 -1
  42. data/lib/buildr/groovy/doc.rb +0 -1
  43. data/lib/buildr/ide/eclipse.rb +0 -2
  44. data/lib/buildr/ide/idea.rb +44 -8
  45. data/lib/buildr/java/bdd.rb +0 -1
  46. data/lib/buildr/java/commands.rb +2 -3
  47. data/lib/buildr/java/jruby.rb +2 -2
  48. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +5 -5
  49. data/lib/buildr/java/tests.rb +0 -1
  50. data/lib/buildr/packaging/artifact_namespace.rb +0 -2
  51. data/lib/buildr/resources/icons-license.txt +14 -17
  52. data/lib/buildr/scala/bdd.rb +0 -1
  53. data/lib/buildr/scala/compiler.rb +0 -1
  54. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
  55. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +0 -2
  56. data/lib/buildr/version.rb +1 -1
  57. data/rakelib/metrics.rake +3 -3
  58. data/rakelib/release.rake +8 -2
  59. data/spec/addon/bnd_spec.rb +383 -383
  60. data/spec/addon/custom_pom_spec.rb +149 -0
  61. data/spec/addon/drb_spec.rb +0 -1
  62. data/spec/addon/jaxb_xjc_spec.rb +130 -130
  63. data/spec/core/application_spec.rb +0 -1
  64. data/spec/core/build_spec.rb +1 -1
  65. data/spec/core/console_spec.rb +0 -1
  66. data/spec/core/doc_spec.rb +0 -1
  67. data/spec/core/extension_spec.rb +0 -1
  68. data/spec/core/generate_from_eclipse_spec.rb +9 -9
  69. data/spec/core/run_spec.rb +2 -3
  70. data/spec/core/shell_spec.rb +0 -1
  71. data/spec/ide/idea_spec.rb +1979 -1941
  72. data/spec/java/cobertura_spec.rb +6 -6
  73. data/spec/java/commands_spec.rb +11 -11
  74. data/spec/java/compiler_spec.rb +0 -1
  75. data/spec/java/doc_spec.rb +0 -1
  76. data/spec/java/ecj_spec.rb +1 -3
  77. data/spec/java/external_spec.rb +0 -2
  78. data/spec/java/java_spec.rb +3 -3
  79. data/spec/java/run_spec.rb +0 -1
  80. data/spec/java/tests_spec.rb +15 -0
  81. data/spec/xpath_matchers.rb +121 -120
  82. metadata +10 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2YxODc1NzFlZjQ0NDZlOGRhMWJhYWM3ZmYyOWZlZmU1M2MwZjRlMw==
4
+ MzAwYjE0NTBlYTRjYjU2Yjc3NmEzYmRjNTI3OWE0MjFkYzE2ODczNA==
5
5
  data.tar.gz: !binary |-
6
- NGNhNzZiYzlkOWJiZmExYzJiODY4ZTk3ZTU0ZDI2MzcwODZiYTg4Zg==
6
+ MDFlNWU0Yjc2MzIzY2MyNzFjN2U3MTFkNDM0NjUwZWZlMDVmODI5NA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWY2NjRlZGY5Mzg3ZDM1NTI2YTg1Y2Y5NTJjYzgxYTkzMDdkMGI4Y2YwNThk
10
- OTI2NTg0NWMwZDk4NjhiNDljYTA1N2VkN2M3MGVlNjJmN2YzMzA5OTU4ZjE1
11
- N2M2MWUyNjM2M2RlNTZiYTQ4N2Y1ZjM3YTU5NGI3ZWFkMDdkNWY=
9
+ ZGUwOGRjZTlkMjAyZmM1ZjYyMWMwMGNhYmJiYzIxZjE2OGM5YTE3ZTg2MjMz
10
+ N2VjYTExMjMzMWRiMDQzOTczMDkxN2IyN2IwZjYzMWM5ZTYzMWJjY2Y1NDY1
11
+ NDFiNzQ5NjQxYzkxMzBiZTc5NjllNGE4NzViNjdhMDM1MjUwZTc=
12
12
  data.tar.gz: !binary |-
13
- MDUzZjIwNGUyOTEwNDBhOTc5ZGZmMmQ0NjJkYWYzYzlhYWFkYzk2N2QyNDQx
14
- NjRmYzc4ZWJkODFkOGJiYzI5YzIzZGQ4YzQ3ZDliYjc4YjQ5OTcyNGY4OTFh
15
- OTM2MjE1ZjI0NDdkODRhMDNhYzZmYzA1NjVmZjAzN2QwY2ZjNjM=
13
+ NmVlMDZjMTNkZmE2YTk3MzM2YTgyYWY3NTc0ZjE3M2ZkNWQxZGFhMjAzNmM0
14
+ N2ZhMTgzNTZlNjc3MTIyN2RiODQzMTBjYjRmOTUyNzU4OWM0ZmNjYzliZjZk
15
+ NWNhZGViOWU2MDRmYWE5MmIyNWViMGM1MGY0MGU3ZjdhYWJiNDI=
data/CHANGELOG CHANGED
@@ -1,3 +1,23 @@
1
+ 1.4.17 (2014-05-25)
2
+ * Added: Add the add_default_testng_configuration method to help IDEA
3
+ project creation. Improves test coverage across 'default'
4
+ configurations.
5
+ * Fixed: Fix a bug where 'default' configurations in IDEA projects
6
+ were being incorrectly created.
7
+ * Fixed: Fix the vcs detection in IDEA addon for 1.8.6 (!) versions
8
+ of ruby by reordering blocks.
9
+ * Change: Supply a default xsl file for generating the checkstyle
10
+ report.
11
+ * Added: Add csslint tasks css_lint:xml and css_lint:html that
12
+ support source code analysis of CSS files.
13
+ * Added: Add scss_lint tasks scss_lint:xml and scss_lint:html that
14
+ support source code analysis of SCSS files.
15
+ * Added: Import 'buildr/custom_pom' addon to make it easier to
16
+ build POMs for projects publishing to Maven Central.
17
+ * Added: Add flag to allow non portable extensions in wsgen addon.
18
+ * Fixed: Avoid nil dereference bug in GWT addon when running GWT in
19
+ a project that has no source directory.
20
+
1
21
  1.4.16 (2014-05-03)
2
22
  * Added: Add the ability to generate a html report when using the
3
23
  jacoco addon. Extracted from the ode project.
@@ -1,159 +1,159 @@
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 Bnd
18
- class << self
19
- @@version = '1.50.0'
20
- def version
21
- @@version
22
- end
23
-
24
- def version=(newVersion)
25
- @@version = newVersion
26
- end
27
-
28
- # The specs for requirements
29
- def dependencies
30
- ["biz.aQute:bnd:jar:#{version}"]
31
- end
32
-
33
- # Repositories containing the requirements
34
- def remote_repository
35
- Buildr.application.deprecated "'Buildr:Bnd.remote_repository deprecated as the dependencies appear in maven central."
36
- "http://www.aqute.biz/repo"
37
- end
38
-
39
- def bnd_main(*args)
40
- cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
41
- Java::Commands.java 'aQute.bnd.main.bnd', *(args + [{ :classpath => cp }])
42
- end
43
- end
44
-
45
- class BundleTask < Rake::FileTask
46
- attr_reader :project
47
- attr_accessor :classpath
48
-
49
- def [](key)
50
- @params[key]
51
- end
52
-
53
- def []=(key, value)
54
- @params[key] = value
55
- end
56
-
57
- def classpath_element(dependencies)
58
- artifacts = Buildr.artifacts([dependencies])
59
- artifacts.each do |artifact|
60
- self.prerequisites << artifact
61
- end
62
- artifacts.each do |dependency|
63
- self.classpath << dependency.to_s
64
- end
65
- end
66
-
67
- def to_params
68
- params = self.project.manifest.merge(@params).reject { |k, v| v.nil? }
69
- params["-classpath"] ||= self.classpath.collect(&:to_s).join(", ")
70
- params['Bundle-SymbolicName'] ||= [self.project.group, self.project.name.gsub(':', '.')].join('.')
71
- params['Bundle-Name'] ||= self.project.comment || self.project.name
72
- params['Bundle-Description'] ||= self.project.comment
73
- params['Bundle-Version'] ||= self.project.version
74
- if params["Include-Resource"].nil? && !project.resources.target.nil?
75
- params["Include-Resource"] = "#{project.resources.target}/"
76
- end
77
- params['-removeheaders'] ||= "Include-Resource,Bnd-LastModified,Created-By,Implementation-Title,Tool"
78
-
79
- params
80
- end
81
-
82
- def project=(project)
83
- @project = project
84
- end
85
-
86
- def classpath=(classpath)
87
- @classpath = []
88
- Buildr.artifacts([classpath.flatten.compact]).each do |dependency|
89
- self.prerequisites << dependency
90
- @classpath << dependency.to_s
91
- end
92
- @classpath
93
- end
94
-
95
- def classpath
96
- @classpath ||= ([project.compile.target] + project.compile.dependencies).flatten.compact
97
- end
98
-
99
- protected
100
-
101
- def initialize(*args) #:nodoc:
102
- super
103
- @params = {}
104
- enhance do
105
- filename = self.name
106
- # Generate BND file with same name as target jar but different extension
107
- bnd_filename = filename.sub /(\.jar)?$/, '.bnd'
108
-
109
- params = self.to_params
110
- params["-output"] = filename
111
- File.open(bnd_filename, 'w') do |f|
112
- f.print params.collect { |k, v| "#{k}=#{v}" }.join("\n")
113
- end
114
-
115
- Buildr::Bnd.bnd_main( bnd_filename )
116
- begin
117
- Buildr::Bnd.bnd_main( "print", "-verify", filename )
118
- rescue => e
119
- rm filename
120
- raise e
121
- end
122
- end
123
- end
124
- end
125
-
126
- module ProjectExtension
127
- include Extension
128
-
129
- first_time do
130
- desc "Does `bnd print` on the packaged bundle and stdouts the output for inspection"
131
- Project.local_task("bnd:print")
132
- end
133
-
134
- def package_as_bundle(filename)
135
- project.task('bnd:print' => [filename]) do |task|
136
- Buildr::Bnd.bnd_main("print", filename)
137
- end
138
-
139
- dirname = File.dirname(filename)
140
- directory(dirname)
141
-
142
- # Add Buildr.application.buildfile so it will rebuild if we change settings
143
- task = BundleTask.define_task(filename => [Buildr.application.buildfile, dirname])
144
- task.project = self
145
- # the last task is the task considered the packaging task
146
- task
147
- end
148
-
149
- # Change the bundle package to .jar extension
150
- def package_as_bundle_spec(spec)
151
- spec.merge(:type => :jar)
152
- end
153
- end
154
- end
155
- end
156
-
157
- class Buildr::Project
158
- include Buildr::Bnd::ProjectExtension
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 Bnd
18
+ class << self
19
+ @@version = '1.50.0'
20
+ def version
21
+ @@version
22
+ end
23
+
24
+ def version=(newVersion)
25
+ @@version = newVersion
26
+ end
27
+
28
+ # The specs for requirements
29
+ def dependencies
30
+ ["biz.aQute:bnd:jar:#{version}"]
31
+ end
32
+
33
+ # Repositories containing the requirements
34
+ def remote_repository
35
+ Buildr.application.deprecated "'Buildr:Bnd.remote_repository deprecated as the dependencies appear in maven central."
36
+ "http://www.aqute.biz/repo"
37
+ end
38
+
39
+ def bnd_main(*args)
40
+ cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
41
+ Java::Commands.java 'aQute.bnd.main.bnd', *(args + [{ :classpath => cp }])
42
+ end
43
+ end
44
+
45
+ class BundleTask < Rake::FileTask
46
+ attr_reader :project
47
+ attr_accessor :classpath
48
+
49
+ def [](key)
50
+ @params[key]
51
+ end
52
+
53
+ def []=(key, value)
54
+ @params[key] = value
55
+ end
56
+
57
+ def classpath_element(dependencies)
58
+ artifacts = Buildr.artifacts([dependencies])
59
+ artifacts.each do |artifact|
60
+ self.prerequisites << artifact
61
+ end
62
+ artifacts.each do |dependency|
63
+ self.classpath << dependency.to_s
64
+ end
65
+ end
66
+
67
+ def to_params
68
+ params = self.project.manifest.merge(@params).reject { |k, v| v.nil? }
69
+ params["-classpath"] ||= self.classpath.collect(&:to_s).join(", ")
70
+ params['Bundle-SymbolicName'] ||= [self.project.group, self.project.name.gsub(':', '.')].join('.')
71
+ params['Bundle-Name'] ||= self.project.comment || self.project.name
72
+ params['Bundle-Description'] ||= self.project.comment
73
+ params['Bundle-Version'] ||= self.project.version
74
+ if params["Include-Resource"].nil? && !project.resources.target.nil?
75
+ params["Include-Resource"] = "#{project.resources.target}/"
76
+ end
77
+ params['-removeheaders'] ||= "Include-Resource,Bnd-LastModified,Created-By,Implementation-Title,Tool"
78
+
79
+ params
80
+ end
81
+
82
+ def project=(project)
83
+ @project = project
84
+ end
85
+
86
+ def classpath=(classpath)
87
+ @classpath = []
88
+ Buildr.artifacts([classpath.flatten.compact]).each do |dependency|
89
+ self.prerequisites << dependency
90
+ @classpath << dependency.to_s
91
+ end
92
+ @classpath
93
+ end
94
+
95
+ def classpath
96
+ @classpath ||= ([project.compile.target] + project.compile.dependencies).flatten.compact
97
+ end
98
+
99
+ protected
100
+
101
+ def initialize(*args) #:nodoc:
102
+ super
103
+ @params = {}
104
+ enhance do
105
+ filename = self.name
106
+ # Generate BND file with same name as target jar but different extension
107
+ bnd_filename = filename.sub /(\.jar)?$/, '.bnd'
108
+
109
+ params = self.to_params
110
+ params["-output"] = filename
111
+ File.open(bnd_filename, 'w') do |f|
112
+ f.print params.collect { |k, v| "#{k}=#{v}" }.join("\n")
113
+ end
114
+
115
+ Buildr::Bnd.bnd_main( bnd_filename )
116
+ begin
117
+ Buildr::Bnd.bnd_main( "print", "-verify", filename )
118
+ rescue => e
119
+ rm filename
120
+ raise e
121
+ end
122
+ end
123
+ end
124
+ end
125
+
126
+ module ProjectExtension
127
+ include Extension
128
+
129
+ first_time do
130
+ desc "Does `bnd print` on the packaged bundle and stdouts the output for inspection"
131
+ Project.local_task("bnd:print")
132
+ end
133
+
134
+ def package_as_bundle(filename)
135
+ project.task('bnd:print' => [filename]) do |task|
136
+ Buildr::Bnd.bnd_main("print", filename)
137
+ end
138
+
139
+ dirname = File.dirname(filename)
140
+ directory(dirname)
141
+
142
+ # Add Buildr.application.buildfile so it will rebuild if we change settings
143
+ task = BundleTask.define_task(filename => [Buildr.application.buildfile, dirname])
144
+ task.project = self
145
+ # the last task is the task considered the packaging task
146
+ task
147
+ end
148
+
149
+ # Change the bundle package to .jar extension
150
+ def package_as_bundle_spec(spec)
151
+ spec.merge(:type => :jar)
152
+ end
153
+ end
154
+ end
155
+ end
156
+
157
+ class Buildr::Project
158
+ include Buildr::Bnd::ProjectExtension
159
159
  end
@@ -0,0 +1,87 @@
1
+ <?xml version="1.0"?>
2
+
3
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
+
5
+ <xsl:template match="/">
6
+ <html>
7
+ <head>
8
+ <title>Checkstyle Violations</title>
9
+ </head>
10
+ <body bgcolor="#FFFFEF">
11
+ <p>
12
+ <b>Coding Style Check Results</b>
13
+ </p>
14
+ <table border="1" cellspacing="0" cellpadding="2">
15
+ <tr bgcolor="#CC9966">
16
+ <th colspan="2">
17
+ <b>Summary</b>
18
+ </th>
19
+ </tr>
20
+ <tr bgcolor="#CCF3D0">
21
+ <td>Total files checked</td>
22
+ <td>
23
+ <xsl:number level="any" value="count(descendant::file)"/>
24
+ </td>
25
+ </tr>
26
+ <tr bgcolor="#F3F3E1">
27
+ <td>Files with errors</td>
28
+ <td>
29
+ <xsl:number level="any" value="count(descendant::file[error])"/>
30
+ </td>
31
+ </tr>
32
+ <tr bgcolor="#CCF3D0">
33
+ <td>Total errors</td>
34
+ <td>
35
+ <xsl:number level="any" value="count(descendant::error)"/>
36
+ </td>
37
+ </tr>
38
+ <tr bgcolor="#F3F3E1">
39
+ <td>Errors per file</td>
40
+ <td>
41
+ <xsl:number level="any" value="count(descendant::error) div count(descendant::file)"/>
42
+ </td>
43
+ </tr>
44
+ </table>
45
+ <hr align="left" width="95%" size="1"/>
46
+ <p>The following are violations of the Checkstyle Rules:</p>
47
+ <p/>
48
+ <xsl:apply-templates/>
49
+ </body>
50
+ </html>
51
+ </xsl:template>
52
+
53
+ <xsl:template match="file[error]">
54
+ <table bgcolor="#AFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
55
+ <tr>
56
+ <th>File:</th>
57
+ <td>
58
+ <xsl:value-of select="@name"/>
59
+ </td>
60
+ </tr>
61
+ </table>
62
+ <table bgcolor="#DFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
63
+ <tr>
64
+ <th>Line Number</th>
65
+ <th>Error Message</th>
66
+ <th>Check</th>
67
+ </tr>
68
+ <xsl:apply-templates select="error"/>
69
+ </table>
70
+ <p/>
71
+ </xsl:template>
72
+
73
+ <xsl:template match="error">
74
+ <tr>
75
+ <td>
76
+ <xsl:value-of select="@line"/>
77
+ </td>
78
+ <td>
79
+ <xsl:value-of select="@message"/>
80
+ </td>
81
+ <td>
82
+ <xsl:value-of select="@source"/>
83
+ </td>
84
+ </tr>
85
+ </xsl:template>
86
+
87
+ </xsl:stylesheet>