buildr 1.3.4-java → 1.3.5-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/CHANGELOG +35 -0
  2. data/README.rdoc +1 -1
  3. data/Rakefile +3 -3
  4. data/buildr.buildfile +6 -1
  5. data/buildr.gemspec +10 -9
  6. data/doc/_config.yml +1 -0
  7. data/doc/_layouts/default.html +25 -19
  8. data/doc/artifacts.textile +0 -36
  9. data/doc/building.textile +0 -38
  10. data/doc/contributing.textile +51 -15
  11. data/doc/css/default.css +11 -4
  12. data/doc/css/print.css +32 -24
  13. data/doc/download.textile +33 -22
  14. data/doc/extending.textile +10 -20
  15. data/doc/images/1442160941-frontcover.jpg +0 -0
  16. data/doc/images/asf-logo.png +0 -0
  17. data/doc/images/note.png +0 -0
  18. data/doc/images/project-structure.png +0 -0
  19. data/doc/images/tip.png +0 -0
  20. data/doc/images/zbuildr.png +0 -0
  21. data/doc/index.textile +39 -17
  22. data/doc/{getting_started.textile → installing.textile} +3 -80
  23. data/doc/languages.textile +50 -52
  24. data/doc/more_stuff.textile +154 -62
  25. data/doc/packaging.textile +0 -82
  26. data/doc/preface.textile +41 -15
  27. data/doc/projects.textile +0 -18
  28. data/doc/quick_start.textile +210 -0
  29. data/doc/scripts/install-linux.sh +10 -2
  30. data/doc/settings_profiles.textile +1 -33
  31. data/doc/testing.textile +6 -32
  32. data/lib/buildr.rb +2 -1
  33. data/lib/buildr/core.rb +6 -0
  34. data/lib/buildr/core/application.rb +2 -5
  35. data/lib/buildr/core/build.rb +29 -19
  36. data/lib/buildr/core/compile.rb +22 -4
  37. data/lib/buildr/core/filter.rb +2 -4
  38. data/lib/buildr/core/project.rb +5 -4
  39. data/lib/buildr/core/shell.rb +198 -0
  40. data/lib/buildr/core/test.rb +2 -0
  41. data/lib/buildr/core/transports.rb +18 -19
  42. data/lib/buildr/core/util.rb +178 -9
  43. data/lib/buildr/groovy.rb +1 -0
  44. data/lib/buildr/groovy/bdd.rb +5 -5
  45. data/lib/buildr/groovy/shell.rb +48 -0
  46. data/lib/buildr/ide/eclipse.rb +148 -36
  47. data/lib/buildr/ide/eclipse/java.rb +53 -0
  48. data/lib/buildr/ide/eclipse/plugin.rb +68 -0
  49. data/lib/buildr/ide/eclipse/scala.rb +66 -0
  50. data/lib/buildr/java/bdd.rb +16 -8
  51. data/lib/buildr/java/cobertura.rb +44 -13
  52. data/lib/buildr/java/commands.rb +5 -3
  53. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  54. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +18 -0
  55. data/lib/buildr/java/packaging.rb +2 -2
  56. data/lib/buildr/java/rjb.rb +1 -1
  57. data/lib/buildr/java/test_result.rb +48 -1
  58. data/lib/buildr/java/tests.rb +8 -5
  59. data/lib/buildr/packaging/artifact_namespace.rb +1 -1
  60. data/lib/buildr/packaging/package.rb +6 -2
  61. data/lib/buildr/packaging/zip.rb +10 -1
  62. data/lib/buildr/packaging/ziptask.rb +5 -2
  63. data/lib/buildr/scala.rb +1 -0
  64. data/lib/buildr/scala/bdd.rb +17 -8
  65. data/lib/buildr/scala/compiler.rb +66 -21
  66. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner$.class +0 -0
  67. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  68. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala +35 -0
  69. data/lib/buildr/scala/shell.rb +55 -0
  70. data/lib/buildr/scala/tests.rb +6 -5
  71. data/lib/buildr/shell.rb +180 -0
  72. data/rakelib/doc.rake +2 -3
  73. data/rakelib/jekylltask.rb +42 -32
  74. data/rakelib/package.rake +4 -2
  75. data/rakelib/release.rake +8 -8
  76. data/rakelib/rspec.rake +3 -3
  77. data/rakelib/setup.rake +7 -1
  78. data/rakelib/stage.rake +9 -2
  79. data/rakelib/stage.rake~ +213 -0
  80. data/spec/core/application_spec.rb +84 -1
  81. data/spec/core/build_spec.rb +54 -2
  82. data/spec/core/common_spec.rb +1 -1
  83. data/spec/core/compile_spec.rb +2 -1
  84. data/spec/core/extension_spec.rb +93 -0
  85. data/spec/core/test_spec.rb +2 -2
  86. data/spec/core/transport_spec.rb +1 -1
  87. data/spec/groovy/bdd_spec.rb +6 -6
  88. data/spec/groovy/compiler_spec.rb +1 -0
  89. data/spec/ide/eclipse_spec.rb +262 -72
  90. data/spec/java/{ant.rb → ant_spec.rb} +0 -0
  91. data/spec/java/bdd_spec.rb +15 -0
  92. data/spec/java/cobertura_spec.rb +9 -1
  93. data/spec/java/emma_spec.rb +1 -1
  94. data/spec/java/java_spec.rb +26 -0
  95. data/spec/java/packaging_spec.rb +9 -7
  96. data/spec/java/{test_coverage_spec.rb → test_coverage_helper.rb} +6 -4
  97. data/spec/java/tests_spec.rb +22 -0
  98. data/spec/packaging/archive_spec.rb +14 -0
  99. data/spec/packaging/artifact_spec.rb +2 -2
  100. data/spec/packaging/packaging_spec.rb +97 -2
  101. data/spec/sandbox.rb +3 -1
  102. data/spec/scala/bdd_spec.rb +17 -48
  103. data/spec/scala/compiler_spec.rb +31 -2
  104. data/spec/scala/tests_spec.rb +1 -0
  105. data/spec/spec_helpers.rb +12 -0
  106. metadata +145 -148
@@ -27,18 +27,16 @@ If it needs more attention, start a discussion over on the mailing list. We wil
27
27
 
28
28
  When reporting a bug, please tell us which version of Ruby, Buildr and Java you are using, and also which operating system you are on:
29
29
 
30
- <notextile>
31
30
  {% highlight sh %}
32
31
  $ ruby --version
33
32
  $ buildr --version
34
33
  $ java --version
35
34
  {% endhighlight %}
36
- </notextile>
37
35
 
38
36
 
39
37
  h2(#wiki). Community Wiki
40
38
 
41
- Our community Wiki is available at "http://cwiki.apache.org/confluence/display/BUILDR/Index":http://cwiki.apache.org/confluence/display/BUILDR/Index.
39
+ "Our community Wiki":http://cwiki.apache.org/confluence/display/BUILDR/Index.
42
40
 
43
41
 
44
42
  h2(#code). Contributing Code
@@ -81,19 +79,25 @@ You can also browse the "Buildr repository":http://svn.apache.org/repos/asf/buil
81
79
 
82
80
  h3(#git). Git
83
81
 
84
- Not a fan SVN? We understand. You can also grab a copy of "Buildr from GitHub":http://github.com/buildr/buildr/tree/master:
82
+ Not a fan of SVN? We understand. You can also use the "official Apache Git clone.":http://git.apache.org This clone is maintained by the ASF and kept in sync with the SVN repository (though, in practice there may be some delay in cloning recent commits). Apache's Git hosting supports both git:// and http:// protocols (you should use git:// if at all possible as it is faster than http://):
85
83
 
86
- <notextile>
87
84
  {% highlight sh %}
88
- $ git clone git://github.com/buildr/buildr.git
85
+ $ git clone git://git.apache.org/buildr.git
86
+ # or...
87
+ $ git clone http://git.apache.org/buildr.git
89
88
  {% endhighlight %}
90
- </notextile>
91
89
 
92
90
  If you want to learn more about Git, you can start by watching Scott Chacon’s "Git presentation":http://en.oreilly.com/rails2008/public/asset/attachment/2816 (PDF), or any of the "Git screencasts":http://www.gitcasts.com/. For more, there's also the "Git Internals book":http://peepcode.com/products/git-internals-pdf.
93
91
 
94
92
  And keep this "Git cheat sheet":http://ktown.kde.org/~zrusin/git/git-cheat-sheet-medium.png close at hand. Very useful.
95
93
 
96
- *Note:* The GitHub repository is maintained by contributors to this project, but is *not* an official Apache repository. To obtain Buildr from the official Apache repository, consider using @git-svn@ instead.
94
+ h4. GitHub
95
+
96
+ You are also welcome to fork or clone the "Buildr repository on GitHub":http://github.com/apache/buildr. This repository is just an exact mirror of the official Apache Git clone referenced above (updated every 30 minutes). Some of the core committers also maintain their own forks of Buildr on GitHub, often containing experimental and in-progress development slated for eventual inclusion into the SVN. For reference, they are listed below:
97
+
98
+ * "Assaf Arkin":http://github.com/assaf/buildr
99
+ * "Victor Hugo Borja":http://github.com/vic/buildr
100
+ * "Daniel Spiewak":http://github.com/djspiewak/buildr
97
101
 
98
102
  h3. Working with Source Code
99
103
 
@@ -130,12 +134,10 @@ Since Ruby Gems uses version numbers to detect new releases, if you installed Bu
130
134
 
131
135
  If you want to go back to using the RubyForge releases:
132
136
 
133
- <notextile>
134
137
  {% highlight sh %}
135
138
  gem source --remove http://people.apache.org/~assaf/buildr/snapshot/
136
139
  gem install buildr
137
140
  {% endhighlight %}
138
- </notextile>
139
141
 
140
142
 
141
143
  h2(#testing). Tested and Documented
@@ -182,17 +184,45 @@ Yes, we do make typos, spelling errors and sometimes we write things that don't
182
184
 
183
185
  For simple typos and quick fixes, just send a message to the mailing list or log an issue in JIRA.
184
186
 
185
- If you end up rewriting a significant piece of text, or add new documentation (you rock!), send a patch. Making documentation patches is fairly easy. All the documentation is generated from text files in the @doc/pages@ directory, so all you need to do is check it out from SVN, edit, and @svn diff@ to create a patch.
187
+ If you end up rewriting a significant piece of text, or add new documentation (you rock!), send a patch. Making documentation patches is fairly easy. All the documentation is generated from text files in the @doc/pages@ directory, so all you need to do is check it out from Git/SVN, edit, and @svn diff@ to create a patch.
186
188
 
187
189
  We use "Textile":http://www.textism.com/tools/textile/ as the markup language, it takes all of a few minutes to learn, it's intuitive to use, and produces clean HTML. You can learn it all in a few minutes from the "Textile Reference Manual":http://redcloth.org/textile. Also check out the "Textile Quick Reference":http://hobix.com/textile/quick.html.
188
190
 
189
- You can always check the documentation to see which conventions we use, and also a couple of extensions we have for styling source code (with syntax highlighting!) and handling footnotes. The table of contents is auto-generated form H1/H2 headers.
191
+ Syntax highlighting handled by "Pygments":http://pygments.org. Use the special @highlight@ tag to separate code sample from the rest of the text and to tell Pygments which language to use. For example:
192
+
193
+ <notextile><pre>
194
+ &#123;&#37; highlight ruby &#37;&#125;
195
+ define 'project' do
196
+ # Just a sample
197
+ end
198
+ &#123;&#37; endhighlight &#37;&#125;
199
+ </pre></notextile>
200
+
201
+ Have a look at existing documentation to see writing conventions, specifically:
202
+
203
+ * Separate paragraphs with two newlines.
204
+ * Use one newline only if you need a &lt;br&gt; tag, otherwise, no newlines inside the paragraph.
205
+ * When creating a new page, don't forget the YAML premable at the top (Jekyll needs the page title and layout).
206
+ * The layout uses H1 to render the page title; only use H2 through H4 for the page content.
207
+ * Use H2 headers for the major page sections. Give each H2 header a unique ID so the table of contents can link to it.
208
+ * Separating sentences with two spaces, just a convenience when editing in a text editor using monospaced fonts.
209
+ * If in doubt, ask.
210
+
211
+ To go from Textile to HTML we use "Jekyll":http://github.com/mojombo/jekyll. You can use the @jekyll@ rake task to transform the files under @doc@ and create a copy of the Web site in the directory @_site@. For example:
212
+
213
+ {% highlight sh %}
214
+ $ rake jekyll
215
+ $ open _site/index.html
216
+ {% endhighlight %}
190
217
 
191
- The tool we use for this is called Docter, which we developed specifically for Buildr, and use to create the Web site and printable PDF. If you want to try it out you'll need to first @gem install docter@. To generate a copy of the Web site, simple run @rake html@ .
218
+ There is no live editing, but you can run @rake jekyll auto=true@, and when you update and save a Textile page it will regenerate the corresponding HTML page.
192
219
 
193
- If you're thinking of editing the docs, and using @rake html@ to see what the HTML looks like, you may want to try something simpler. Start by running the Docter Web server with @rake docter@ and then point your browser at @http://localhost:3000@. To see your edits, simply refresh the page.
220
+ To go from HTML to PDF we use "PrinceXML":http://www.princexml.com/. The target file @buildr.pdf@ is generated by first running Jekyll and then merging the generated HTML pages into a single PDF document. For example:
194
221
 
195
- Generating the PDF is a bit more tricky, we use the HTML in combination with print media CSS stylesheets and run them through the wonderful "PrinceXML":http://www.princexml.com/, so you'll need to install PrinceXML first before you can @rake pdf@.
222
+ {% highlight sh %}
223
+ $ rake buildr.pdf
224
+ $ open buildr.pdf
225
+ {% endhighlight %}
196
226
 
197
227
 
198
228
  h2(#contributors). Contributors
@@ -201,6 +231,8 @@ Here is the list of people who are actively working and committing on Buildr:
201
231
 
202
232
  *"Assaf Arkin":http://labnotes.org* (assaf at apache.org)
203
233
 
234
+ Started working on Buildr because Maven was too much pain and Rake wasn't enough. Assaf has been hanging around Apache since 1999, as founding contributor to XML Apache, Ode and Buildr. Assaf is also co-author of "Ruby In Practice":http://manning.com/mcanally/.
235
+
204
236
  *Alex Boisvert*
205
237
 
206
238
  Came to Buildr as a refuge from the Maven Uncertainty Principle. Alex has been working mostly on the Scala integration and believes Ruby scripting is a great complement to statically typed languages.
@@ -214,3 +246,7 @@ Currently a Java Developer at "http://jwmsolutions.com":http://jwmsolutions.com,
214
246
  *Lacton* (lacton at apache.org)
215
247
 
216
248
  A test-infected developer since 2001, Lacton yearns for a development infrastructure that would shorten feedback loops so much that testing, building, refactoring and committing would feel as easy and natural as breathing air.
249
+
250
+ *"Daniel Spiewak":http://www.codecommit.com/blog* (djspiewak at apache.org)
251
+
252
+ Daniel originally came to Buildr in search of a Scala build tool which was better than Ant. He got more than he bargained for. Now, he works to advance Buildr as the absolute best tool for supporting Scala development.
@@ -79,7 +79,7 @@ blockquote {
79
79
  padding-right: 2em;
80
80
  margin-left: 0.3em;
81
81
  margin-right: 0;
82
- border-left: 1px solid #3c78b5;
82
+ font-style: italic;
83
83
  }
84
84
 
85
85
  ul {
@@ -121,14 +121,16 @@ th, thead td {
121
121
 
122
122
  #header {
123
123
  margin: 0 0 3em 18em;
124
+ position: relative;
124
125
  }
125
126
 
126
127
  #header .tagline {
127
128
  float: right;
128
- font-size: 1.5em;
129
+ font-size: 1.2em;
129
130
  font-weight: bold;
130
- position: relative;
131
- bottom: 4.5em;
131
+ position: absolute;
132
+ top: 0.6em;
133
+ right: 0;
132
134
  }
133
135
 
134
136
 
@@ -168,6 +170,11 @@ th, thead td {
168
170
  margin-top: 2em;
169
171
  padding: 0.3em 0 0.5em 0.5em;
170
172
  }
173
+ #pages ol li p {
174
+ font-weight: normal;
175
+ color: #000;
176
+ vertical-align: center;
177
+ }
171
178
 
172
179
 
173
180
  #content { /* Parent Wrapper for inside boxes */
@@ -15,34 +15,33 @@
15
15
  */
16
16
 
17
17
 
18
- @page {
19
- margin: 1in 0.75in 1in 0.75in;
20
- @top-left, @top-right {
21
- font-family: "Gill Sans";
22
- font-weight: normal;
18
+ @media print {
19
+ @page { size: letter; }
20
+ @page:first {
21
+ @top-left { content: normal }
22
+ @top-right { content: normal }
23
+ }
24
+ @page:right {
25
+ margin: 1.25in 1in 1.5in 1.5in;
26
+ font: normal 10pt "Gill Sans" !important;
27
+ @top-left { content: string(pagetitle); }
28
+ @top-right { content: counter(page); }
29
+ }
30
+ @page:left {
31
+ margin: 1.25in 1.5in 1.5in 1in;
32
+ font: normal 10pt "Gill Sans" !important;
33
+ @top-left { content: counter(page); }
34
+ @top-right { content: string(pagetitle); }
23
35
  }
24
- }
25
- @page:left {
26
- @top-left { content: counter(page); }
27
- @top-right { content: string(pagetitle); }
28
- }
29
- @page:right {
30
- @top-left { content: string(pagetitle); }
31
- @top-right { content: counter(page); }
32
- }
33
- @page:first {
34
- @top-left { content: normal }
35
- @top-right { content: normal }
36
- }
37
36
 
38
- @media print {
39
37
  title { string-set: doctitle content(); }
40
38
 
41
39
  body {
42
- font-family: "Helvetica Neue", "DejaVu Sans", "Verdana";
40
+ font-family: "Palatino";
43
41
  margin: 0;
44
42
  color: black;
45
43
  background: white;
44
+ font-size: 11pt;
46
45
  }
47
46
 
48
47
  h1 {
@@ -56,12 +55,16 @@
56
55
  pre, p, blockquote { page-break-inside: avoid; }
57
56
  pre, code {
58
57
  font-family: "Monaco", "DejaVu Sans Mono", "Courier New", "Courier";
59
- font-size: 10pt;
58
+ font-size: 9pt;
59
+ }
60
+ pre br {
61
+ display: none;
60
62
  }
61
63
  a:link, a:visited {
62
64
  background: transparent;
63
65
  text-decoration: none;
64
66
  }
67
+
65
68
 
66
69
  #header, #pages, #footer { display: none }
67
70
  #wrap, #content {
@@ -82,12 +85,17 @@
82
85
  border: none;
83
86
  }
84
87
  .title img {
85
- width: 20em;
86
- margin: 2em auto 2em auto;
88
+ display: block;
89
+ width: 80%;
90
+ margin: 2em auto 4em auto;
87
91
  }
88
92
  p.preface {
89
93
  page-break-before: always;
90
- padding-top: 2.5in;
94
+ padding-top: 1.5in;
95
+ }
96
+ div.preface.quotes {
97
+ page-break-before: always;
98
+ padding-top: 1in;
91
99
  }
92
100
 
93
101
  }
@@ -6,7 +6,7 @@ title: Download
6
6
 
7
7
  h2(#install). Installing Buildr
8
8
 
9
- *The easy way:* The "Getting Started guide":getting_started.html will show you how to install Buildr in a matter of minutes.
9
+ *The easy way:* Follow the "quick installation instructions":installing.html to get Buildr up and running in a matter of minutes.
10
10
 
11
11
 
12
12
  h2(#dists). Official & Unofficial Distributions
@@ -20,49 +20,60 @@ 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.3.4 (2009-04-21)
24
+
25
+ |_. Package |_. MD5 Checksum |_. PGP |
26
+ | "buildr-1.3.4.gem":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.gem | "34247286f910be1724f63b9e795e75ed":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.gem.asc |
27
+ | "buildr-1.3.4-java.gem":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4-java.gem | "44ed67bf835cf2abdc2b6723b5eceadb":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4-java.gem.asc |
28
+ | "buildr-1.3.4.tgz":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.tgz | "7d918b88a3bb8139f28f6ff0b39d003c":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.tgz.asc |
29
+ | "buildr-1.3.4.zip":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.zip | "8f4cf84dc6e293aac5fba7e2a9cc0776":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.4/buildr-1.3.4.zip.asc |
30
+
31
+ p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.3.4/KEYS)
32
+
33
+
23
34
  h3. buildr 1.3.3-incubating (2008-10-08)
24
35
 
25
36
  |_. Package |_. MD5 Checksum |_. PGP |
26
- | "buildr-1.3.3-incubating.gem":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem | "7192dad45441630cbf07b85af5f9069a":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem.asc |
27
- | "buildr-1.3.3-java-incubating.gem":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem | "71ad4f0f8bfa951fa129db67a06b608a":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem.asc |
28
- | "buildr-1.3.3-incubating.tgz":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz | "e5ee6fe5b86386520c91a9633d02814b":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz.asc |
29
- | "buildr-1.3.3-incubating.zip":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip | "baab601fd46a877ee8e408891d68c842":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip.asc |
37
+ | "buildr-1.3.3-incubating.gem":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem | "7192dad45441630cbf07b85af5f9069a":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.gem.asc |
38
+ | "buildr-1.3.3-java-incubating.gem":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem | "71ad4f0f8bfa951fa129db67a06b608a":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-java-incubating.gem.asc |
39
+ | "buildr-1.3.3-incubating.tgz":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz | "e5ee6fe5b86386520c91a9633d02814b":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.tgz.asc |
40
+ | "buildr-1.3.3-incubating.zip":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip | "baab601fd46a877ee8e408891d68c842":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.3-incubating/buildr-1.3.3-incubating.zip.asc |
30
41
 
31
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.3.3-incubating/KEYS)
42
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.3-incubating/KEYS)
32
43
 
33
44
 
34
45
  h3. buildr 1.3.2-incubating (2008-07-18)
35
46
 
36
47
  |_. Package |_. MD5 Checksum |_. PGP |
37
- | "buildr-1.3.2-incubating.gem":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem | "225504bc195334c4eb9d6dec814d9db1":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem.asc |
38
- | "buildr-1.3.2-java-incubating.gem":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem | "d7d8394c7aed887987be0e813e1e4cee":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem.asc |
39
- | "buildr-1.3.2-incubating.tgz":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz | "611e97df1bc76382ecbe6b60e9340f2b":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz.asc |
40
- | "buildr-1.3.2-incubating.zip":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip | "d65d20005f603338c0aedd4f17d0bc90":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip.asc |
48
+ | "buildr-1.3.2-incubating.gem":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem | "225504bc195334c4eb9d6dec814d9db1":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.gem.asc |
49
+ | "buildr-1.3.2-java-incubating.gem":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem | "d7d8394c7aed887987be0e813e1e4cee":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-java-incubating.gem.asc |
50
+ | "buildr-1.3.2-incubating.tgz":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz | "611e97df1bc76382ecbe6b60e9340f2b":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.tgz.asc |
51
+ | "buildr-1.3.2-incubating.zip":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip | "d65d20005f603338c0aedd4f17d0bc90":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.2-incubating/buildr-1.3.2-incubating.zip.asc |
41
52
 
42
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.3.2-incubating/KEYS)
53
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.2-incubating/KEYS)
43
54
 
44
55
 
45
56
 
46
57
  h3. buildr 1.3.1-incubating (2008-05-19)
47
58
 
48
59
  |_. Package |_. MD5 Checksum |_. PGP |
49
- | "buildr-1.3.1-incubating.gem":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem | "476436429b9a6c4ed178009ba17dd724":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem.asc |
50
- | "buildr-1.3.1-java-incubating.gem":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem | "7af37acc10621b18d4b870119c36d998":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem.asc |
51
- | "buildr-1.3.1-incubating.tgz":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz | "ad6694416fc2e6eb22ab1042dcc41411":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz.asc |
52
- | "buildr-1.3.1-incubating.zip":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip | "0470349978b93e645ca2e9607e304ed1":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip.asc |
60
+ | "buildr-1.3.1-incubating.gem":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem | "476436429b9a6c4ed178009ba17dd724":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.gem.asc |
61
+ | "buildr-1.3.1-java-incubating.gem":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem | "7af37acc10621b18d4b870119c36d998":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-java-incubating.gem.asc |
62
+ | "buildr-1.3.1-incubating.tgz":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz | "ad6694416fc2e6eb22ab1042dcc41411":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.tgz.asc |
63
+ | "buildr-1.3.1-incubating.zip":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip | "0470349978b93e645ca2e9607e304ed1":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.1-incubating/buildr-1.3.1-incubating.zip.asc |
53
64
 
54
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.3.1-incubating/KEYS)
65
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.1-incubating/KEYS)
55
66
 
56
67
 
57
68
  h3. buildr 1.3.0-incubating (2008-05-01)
58
69
 
59
70
  |_. Package |_. MD5 Checksum |_. PGP |
60
- | "buildr-1.3.0-incubating.gem":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem | "37758d0a8dabc570799b0a58d23d19f0":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.asc |
61
- | "buildr-1.3.0-java-incubating.gem":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem | "6a3a86740077f739c111514e0e2b9e06":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.asc |
62
- | "buildr-1.3.0-incubating.tgz":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz | "acd84ad8c5031962e65b0036f3bc2e76":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.asc |
63
- | "buildr-1.3.0-incubating.zip":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip | "d85945f05efd0e512e6d769e3dd1cc98":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.asc |
71
+ | "buildr-1.3.0-incubating.gem":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem | "37758d0a8dabc570799b0a58d23d19f0":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.asc |
72
+ | "buildr-1.3.0-java-incubating.gem":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem | "6a3a86740077f739c111514e0e2b9e06":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.asc |
73
+ | "buildr-1.3.0-incubating.tgz":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz | "acd84ad8c5031962e65b0036f3bc2e76":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.asc |
74
+ | "buildr-1.3.0-incubating.zip":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip | "d85945f05efd0e512e6d769e3dd1cc98":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.asc |
64
75
 
65
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.3.0-incubating/KEYS)
76
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.0-incubating/KEYS)
66
77
 
67
78
 
68
- 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":http://www.apache.org/dist/buildr/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.
79
+ 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":http://archive.apache.org/dist/buildr/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.
@@ -11,7 +11,6 @@ For example, we use OpenJPA in several projects. It's a very short task, but ea
11
11
 
12
12
  Compare this:
13
13
 
14
- <notextile>
15
14
  {% highlight ruby %}
16
15
  file('derby.sql') do
17
16
  REQUIRES = [
@@ -32,11 +31,9 @@ file('derby.sql') do
32
31
  end
33
32
  end
34
33
  {% endhighlight %}
35
- </notextile>
36
34
 
37
35
  To this:
38
36
 
39
- <notextile>
40
37
  {% highlight ruby %}
41
38
  file('derby.sql') do
42
39
  mapping_tool :action=>'build', :sql=>task.name,
@@ -44,16 +41,22 @@ file('derby.sql') do
44
41
  :classpath=>projects('store', 'utils')
45
42
  end
46
43
  {% endhighlight %}
47
- </notextile>
48
44
 
49
45
  I prefer the second. It's easier to look at the Buildfile and understand what it does. It's easier to maintain when you only have to look at the important information.
50
46
 
51
47
  But just using functions is not always enough. You end up with a Buildfile containing a lot of code that clearly doesn't belong there. For starters, I recommend putting it in the @tasks@ directory. Write it into a file with a @.rake@ extension and place that in the @tasks@ directory next to the Buildfile. Buildr will automatically pick it up and load it for you.
52
48
 
53
- If you want to share these pre-canned definitions between projects, you have a few more options. You can share the @tasks@ directory using SVN externals. Another mechanism with better version control is to package all these tasks, functions and modules into a "Gem":http://rubygems.org/ and require it from your Buildfile. You can run your own internal Gem server for that.
49
+ If you want to share these pre-canned definitions between projects, you have a few more options. You can share the @tasks@ directory using SVN externals, Git modules, or whichever cross-repository feature your source control system supports. Another mechanism with better version control is to package all these tasks, functions and modules into a "Gem":http://rubygems.org/ and require it from your Buildfile. You can run your own internal Gem server for that.
54
50
 
55
- For individual task files, you can also use "Sake":http://errtheblog.com/post/6069 for system-wide Rake tasks deployment.
51
+ To summarize, there are several common ways to distribute extensions:
52
+ * Put them in the same place (e.g. @~/.buildr@) and require them from your
53
+ @buildfile@
54
+ * Put them directly in the project, typically under the @tasks@ directory.
55
+ * Put them in a shared code repository, and link to them from your project's @tasks@ directory
56
+ * As Ruby gems and specify which gems are used in the settings file
56
57
 
58
+ You can also get creative and devise your own way to distribute extensions.
59
+ "Sake":http://errtheblog.com/post/6069 is a good example of such initiative that lets you deploy Rake tasks on a system-wide basis.
57
60
 
58
61
  h2(#extensions). Creating Extensions
59
62
 
@@ -61,23 +64,19 @@ The basic mechanism for extending projects in Buildr are Ruby modules. In fact,
61
64
 
62
65
  A module defines instance methods that are then mixed into the project and become instance methods of the project. There are two general ways for extending projects. You can extend all projects by including the module in Project:
63
66
 
64
- <notextile>
65
67
  {% highlight ruby %}
66
68
  class Project
67
69
  include MyExtension
68
70
  end
69
71
  {% endhighlight %}
70
- </notextile>
71
72
 
72
73
  You can also extend a given project instance and only that instance by extending it with the module:
73
74
 
74
- <notextile>
75
75
  {% highlight ruby %}
76
76
  define 'foo' do
77
77
  extend MyExtension
78
78
  end
79
79
  {% endhighlight %}
80
- </notextile>
81
80
 
82
81
  Some extensions require tighter integration with the project, specifically for setting up tasks and properties, or for configuring tasks based on the project definition. You can do that by adding callbacks to the process.
83
82
 
@@ -90,7 +89,6 @@ The easiest way to add callbacks is by incorporating the Extension module in you
90
89
 
91
90
  This example illustrates how to write a simple extension:
92
91
 
93
- <notextile>
94
92
  {% highlight ruby %}
95
93
  module LinesOfCode
96
94
  include Extension
@@ -127,8 +125,8 @@ class Buildr::Project
127
125
  include LinesOfCode
128
126
  end
129
127
  {% endhighlight %}
130
- </notextile>
131
128
 
129
+ You may find interesting that this Extension API is used pervasively inside Buildr itself. Many of the standard tasks such as @compile@, @test@, @package@ are extensions to a very small core.
132
130
 
133
131
  h2(#layouts). Using Alternative Layouts
134
132
 
@@ -136,32 +134,26 @@ Buildr follows a common convention for project layouts: Java source files appear
136
134
 
137
135
  The default layout is available in @Layout.default@, and all projects inherit it. You can set @Layout.default@ to your own layout, or define a project with a given layout (recommended) by setting the @:layout@ property. Projects inherit the layout from their parent projects. For example:
138
136
 
139
- <notextile>
140
137
  {% highlight ruby %}
141
138
  define 'foo', :layout=>my_layout do
142
139
  ...
143
140
  end
144
141
  {% endhighlight %}
145
- </notextile>
146
142
 
147
143
  A layout is an object that implements the @expand@ method. The easiest way to define a custom layout is to create a new @Layout@ object and specify mapping between names used by Buildr and actual paths within the project. For example:
148
144
 
149
- <notextile>
150
145
  {% highlight ruby %}
151
146
  my_layout = Layout.new
152
147
  my_layout[:source, :main, :java] = 'java'
153
148
  my_layout[:source, :main, :resources] = 'resources'
154
149
  {% endhighlight %}
155
- </notextile>
156
150
 
157
151
  Partial expansion also works, so you can specify the above layout using:
158
152
 
159
- <notextile>
160
153
  {% highlight ruby %}
161
154
  my_layout = Layout.new
162
155
  my_layout[:source, :main] = ''
163
156
  {% endhighlight %}
164
- </notextile>
165
157
 
166
158
  If you need anything more complex, you can always subclass @Layout@ and add special handling in the @expand@ method, you'll find one such example in the API documentation.
167
159
 
@@ -177,7 +169,6 @@ The built-in tasks expand lists of symbols into relative paths, using the follow
177
169
 
178
170
  All tasks are encouraged to use the same convention, and whenever possible, we recommend using the project's @path_to@ method to expand a list of symbols into a path, or use the appropriate path when available. For example:
179
171
 
180
- <notextile>
181
172
  {% highlight ruby %}
182
173
  define 'bad' do
183
174
  # This may not be the real target.
@@ -193,4 +184,3 @@ define 'good' do
193
184
  package(:jar).include path_to(:source, :main, :etc, '*')
194
185
  end
195
186
  {% endhighlight %}
196
- </notextile>