buildr 1.3.5-x86-mswin32 → 1.4.0-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/CHANGELOG +153 -8
  2. data/README.rdoc +1 -1
  3. data/addon/buildr/antlr.rb +5 -5
  4. data/addon/buildr/drb.rb +18 -18
  5. data/addon/buildr/hibernate.rb +18 -14
  6. data/addon/buildr/javacc.rb +4 -4
  7. data/addon/buildr/jetty.rb +5 -5
  8. data/addon/buildr/nailgun.rb +23 -23
  9. data/addon/buildr/openjpa.rb +1 -1
  10. data/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
  11. data/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
  12. data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
  13. data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
  14. data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
  15. data/addon/buildr/protobuf.rb +75 -0
  16. data/addon/buildr/xmlbeans.rb +5 -5
  17. data/buildr.buildfile +2 -2
  18. data/buildr.gemspec +8 -7
  19. data/doc/_layouts/default.html +2 -2
  20. data/doc/artifacts.textile +4 -4
  21. data/doc/building.textile +35 -3
  22. data/doc/contributing.textile +5 -0
  23. data/doc/download.textile +16 -5
  24. data/doc/extending.textile +38 -12
  25. data/doc/installing.textile +6 -5
  26. data/doc/languages.textile +182 -42
  27. data/doc/more_stuff.textile +2 -2
  28. data/doc/packaging.textile +14 -15
  29. data/doc/projects.textile +7 -2
  30. data/doc/quick_start.textile +4 -4
  31. data/doc/scripts/buildr-git.rb +63 -63
  32. data/doc/scripts/gitflow.rb +21 -21
  33. data/doc/settings_profiles.textile +9 -2
  34. data/doc/testing.textile +16 -5
  35. data/etc/KEYS +38 -0
  36. data/lib/buildr.rb +1 -1
  37. data/lib/buildr/core.rb +1 -0
  38. data/lib/buildr/core/application.rb +33 -27
  39. data/lib/buildr/core/build.rb +41 -28
  40. data/lib/buildr/core/cc.rb +172 -0
  41. data/lib/buildr/core/checks.rb +1 -1
  42. data/lib/buildr/core/common.rb +7 -6
  43. data/lib/buildr/core/compile.rb +7 -8
  44. data/lib/buildr/core/doc.rb +263 -0
  45. data/lib/buildr/core/environment.rb +6 -6
  46. data/lib/buildr/core/filter.rb +77 -35
  47. data/lib/buildr/core/generate.rb +7 -7
  48. data/lib/buildr/core/help.rb +1 -1
  49. data/lib/buildr/core/osx.rb +6 -6
  50. data/lib/buildr/core/progressbar.rb +4 -4
  51. data/lib/buildr/core/project.rb +144 -36
  52. data/lib/buildr/core/shell.rb +34 -34
  53. data/lib/buildr/core/test.rb +89 -20
  54. data/lib/buildr/core/transports.rb +8 -7
  55. data/lib/buildr/core/util.rb +77 -23
  56. data/lib/buildr/groovy/bdd.rb +5 -5
  57. data/lib/buildr/groovy/compiler.rb +19 -15
  58. data/lib/buildr/groovy/shell.rb +6 -6
  59. data/lib/buildr/ide/eclipse.rb +148 -75
  60. data/lib/buildr/ide/eclipse/java.rb +3 -3
  61. data/lib/buildr/ide/eclipse/plugin.rb +8 -5
  62. data/lib/buildr/ide/eclipse/scala.rb +4 -2
  63. data/lib/buildr/ide/idea.rb +2 -2
  64. data/lib/buildr/ide/idea7x.rb +23 -4
  65. data/lib/buildr/java.rb +1 -0
  66. data/lib/buildr/java/ant.rb +4 -4
  67. data/lib/buildr/java/bdd.rb +51 -54
  68. data/lib/buildr/java/cobertura.rb +57 -35
  69. data/lib/buildr/java/commands.rb +14 -5
  70. data/lib/buildr/java/compiler.rb +3 -217
  71. data/lib/buildr/java/deprecated.rb +4 -4
  72. data/lib/buildr/java/doc.rb +70 -0
  73. data/lib/buildr/java/emma.rb +22 -22
  74. data/lib/buildr/java/jruby.rb +4 -4
  75. data/lib/buildr/java/jtestr_runner.rb.erb +27 -25
  76. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  77. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +8 -3
  78. data/lib/buildr/java/packaging.rb +30 -29
  79. data/lib/buildr/java/pom.rb +4 -4
  80. data/lib/buildr/java/rjb.rb +6 -6
  81. data/lib/buildr/java/test_result.rb +61 -85
  82. data/lib/buildr/java/tests.rb +44 -27
  83. data/lib/buildr/java/version_requirement.rb +8 -8
  84. data/lib/buildr/packaging/archive.rb +55 -22
  85. data/lib/buildr/packaging/artifact.rb +75 -36
  86. data/lib/buildr/packaging/artifact_namespace.rb +90 -78
  87. data/lib/buildr/packaging/artifact_search.rb +5 -5
  88. data/lib/buildr/packaging/gems.rb +11 -7
  89. data/lib/buildr/packaging/package.rb +10 -7
  90. data/lib/buildr/packaging/tar.rb +14 -14
  91. data/lib/buildr/packaging/version_requirement.rb +30 -10
  92. data/lib/buildr/packaging/ziptask.rb +51 -13
  93. data/lib/buildr/scala.rb +1 -0
  94. data/lib/buildr/scala/bdd.rb +25 -20
  95. data/lib/buildr/scala/compiler.rb +87 -40
  96. data/lib/buildr/scala/doc.rb +106 -0
  97. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  98. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.java +57 -0
  99. data/lib/buildr/scala/shell.rb +14 -9
  100. data/lib/buildr/scala/tests.rb +33 -26
  101. data/lib/buildr/shell.rb +33 -33
  102. data/rakelib/all-in-one.rake +113 -0
  103. data/rakelib/checks.rake +1 -1
  104. data/rakelib/doc.rake +7 -0
  105. data/rakelib/package.rake +1 -1
  106. data/rakelib/release.rake +9 -6
  107. data/rakelib/rspec.rake +26 -7
  108. data/rakelib/setup.rake +15 -3
  109. data/rakelib/stage.rake +18 -11
  110. data/spec/addon/drb_spec.rb +25 -25
  111. data/spec/core/application_spec.rb +111 -21
  112. data/spec/core/build_spec.rb +16 -15
  113. data/spec/core/cc_spec.rb +174 -0
  114. data/spec/core/checks_spec.rb +34 -34
  115. data/spec/core/common_spec.rb +51 -5
  116. data/spec/core/compile_spec.rb +89 -14
  117. data/spec/core/extension_spec.rb +127 -19
  118. data/spec/core/generate_spec.rb +2 -2
  119. data/spec/core/project_spec.rb +10 -10
  120. data/spec/core/test_spec.rb +144 -35
  121. data/spec/core/transport_spec.rb +8 -8
  122. data/spec/core/util_spec.rb +63 -5
  123. data/spec/groovy/bdd_spec.rb +5 -5
  124. data/spec/groovy/compiler_spec.rb +29 -18
  125. data/spec/ide/eclipse_spec.rb +185 -9
  126. data/spec/ide/idea7x_spec.rb +22 -10
  127. data/spec/java/ant_spec.rb +9 -5
  128. data/spec/java/bdd_spec.rb +29 -37
  129. data/spec/java/cobertura_spec.rb +12 -12
  130. data/spec/java/commands_spec.rb +34 -0
  131. data/spec/java/compiler_spec.rb +53 -53
  132. data/spec/java/emma_spec.rb +11 -11
  133. data/spec/java/java_spec.rb +10 -10
  134. data/spec/java/packaging_spec.rb +67 -20
  135. data/spec/java/test_coverage_helper.rb +18 -18
  136. data/spec/java/tests_spec.rb +13 -9
  137. data/spec/packaging/archive_spec.rb +187 -20
  138. data/spec/packaging/artifact_namespace_spec.rb +172 -83
  139. data/spec/packaging/artifact_spec.rb +83 -18
  140. data/spec/packaging/packaging_spec.rb +41 -14
  141. data/spec/sandbox.rb +23 -12
  142. data/spec/scala/bdd_spec.rb +13 -8
  143. data/spec/scala/compiler_spec.rb +18 -13
  144. data/spec/scala/scala.rb +3 -3
  145. data/spec/scala/tests_spec.rb +46 -24
  146. data/spec/spec_helpers.rb +28 -10
  147. data/spec/version_requirement_spec.rb +25 -11
  148. metadata +149 -133
  149. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner$.class +0 -0
  150. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala +0 -35
  151. data/rakelib/stage.rake~ +0 -213
data/CHANGELOG CHANGED
@@ -1,3 +1,148 @@
1
+ 1.4.0 (2010-06-18)
2
+ * Added: BUILDR-405 Enhance the idea7x extension to supply a task to delete generated files
3
+ (Peter Donald)
4
+ * Added: Support for regexps in include and exclude patterns (BUILDR-406)
5
+ * Added: Support for Scala 2.8 compiler-level change detection and dependency
6
+ tracking
7
+ * Added: Continuous compilation
8
+ * Added: Generic documentation framework (using the `doc` task). Replaces
9
+ `javadoc` task
10
+ * Added: New "test:failed" task to execute only tests that failed during last
11
+ run (Antoine Toulme)
12
+ * Added: Project extensions (before/after_define) now support dependency ordering
13
+ similar to Rake (e.g. before_define(:my_setup => :compile)
14
+ * Added: BUILDR-328 Detect Eclipse plugin project with META-INF/MANIFEST.MF
15
+ and Bundle-SymbolicName: entry
16
+ * Added: Support for Eclipse classpath variables to avoid absolute pathnames in
17
+ generated .classpath using:
18
+ eclipse.classpath_variables { :VAR => '/path/to/libraries' }
19
+ * Added: Support for excluding libraries from Eclipse classpath using:
20
+ eclipse.exclude_libs += ['/path/to/some/library.jar']
21
+ * Added: Environment variable IGNORE_BUILDFILE can be set to "yes" or
22
+ "true" to ignore changes in Buildfile when running tests.
23
+ * Added: "buildr test=only" will only run tests explicitly specified on the
24
+ command line (and ignore transitive test dependencies)
25
+ * Added: ArtifactNamespace.{keys,clear} methods
26
+ * Added: BUILDR-326 Support unzipping tar.gz files (Antoine Toulme)
27
+ * Added: BUILDR-368 Support protocol buffer code generation
28
+ (Pepijn Van Eeckhoudt)
29
+ * Added: BUILDR-375 Buildr now recognizes buildfile.rb and Buildfile.rb
30
+ (Kerry Wilson)
31
+ * Added: BUILDR-390 Buildr::group() should accept :classifier argument
32
+ * Added: BUILDR-407 Exclude and include patterns should support lambdas or procs
33
+ * Added: BUILDR-408 Filter include() and exclude() should accept Rake tasks
34
+ * Added: BUILDR-409 archive.include() should convert arguments to artifact
35
+ if applicable
36
+ * Added: BUILDR-453 Provide a ci task that uses the ci_reporter gem (Pepijn Van Eeckhoudt)
37
+ * Added: ScalaTest now generates JUnit XML reports in addition to text files.
38
+ * Change: Updated to Ant 1.8.0
39
+ * Change: Updated to Cobertura 1.9.4.1
40
+ * Change: Updated to Groovy 1.7.1
41
+ * Change: Updated to JRuby 1.5.1
42
+ * Change: Updated to JtestR 0.5
43
+ * Change: Updated to JUnit 4.7
44
+ * Change: Updated to JMock 2.5.1 (Antoine Toulme)
45
+ * Change: Updated to RJB 1.2.5
46
+ * Change: Updated to Scala Specs 1.6.2.1
47
+ * Change: Updated to ScalaCheck 1.6
48
+ * Change: Updated to ScalaTest 1.0.1
49
+ * Change: Updated to json_pure 1.4.0
50
+ * Change: Load buildr.rb from $HOME/.buildr instead of $HOME
51
+ ($HOME/buildr.rb is still loaded with deprecation warning)
52
+ * Change: BUILDR-400 Don't forbid projects to use their own compiler after one has been guessed
53
+ * Change: BUILDR-401 Don't set compiler to output warnings if verbose
54
+ * Change: Buildr.settings.build['scala.version'] now overrides SCALA_HOME to
55
+ determine which Scala libraries used for compiling. If both are
56
+ are provided and reference the same Scala version, then local
57
+ jars from SCALA_HOME are used.
58
+ * Change: Tagline changed from "The build system that doesn't suck" to "Build like you code"
59
+ * Change: BUILDR-355 Use Rake for defining tasks to do the Buildr distro over JRuby (Izzet Mustafa oglu)
60
+ * Change: BUILDR-448 Don't use sudo by default for rake setup
61
+ * Change: BUILDR-450 Update .gitignore to exclude idea project files and files generated during spec tests (Peter Donald)
62
+ * Fixed: BUILDR-208 ansi control characters are printed on Windows (Pepijn Van Eeckhoudt)
63
+ * Fixed: BUILDR-348 Buildr fails on windows with jruby and ODE 1.X
64
+ * Fixed: BUILDR-183 Can't define root artifact namespace outside of project
65
+ (Ittay Dror)
66
+ * Fixed: BUILDR-223 Release Task: customizable commit message (Alexis Midon)
67
+ * Fixed: BUILDR-232 buildr should print the class of an exception, not just
68
+ its message (Antoine Toulme)
69
+ * Fixed: BUILDR-233 Can't specify version in artifact namespace
70
+ * Fixed: BUILDR-267 Skipping tests is only done after they are compiled
71
+ (Antoine Toulme)
72
+ * Fixed: BUILDR-281 Application#initialize fails if home dir isn't writable
73
+ * Fixed: BUILDR-327 Specifying :plugin eclipse nature explicitly fails
74
+ * Fixed: BUILDR-330 Install task should re-install artifact even if they
75
+ already exist (Alexis Midon)
76
+ * Fixed: BUILDR-334 Eclipse .classpath files use absolute paths for library
77
+ entries (Stefan Wasilewski)
78
+ * Fixed: BUILDR-336 Java::Commands.java Prints Command Without --trace
79
+ (Antoine Toulme)
80
+ * Fixed: BUILDR-341 jruby -S extract is no longer supported by jruby
81
+ (Antoine Toulme)
82
+ * Fixed: BUILDR-344 Buildr::TestFramework::TestResult::YamlFormatter uses
83
+ deprecated form of example_pending (Rhett Sutphin)
84
+ * Fixed: BUILDR-345 Improve project documentation (Peter Schröder)
85
+ * Fixed: BUILDR-346 Test classpath can not be set (Peter Schröder)
86
+ * Fixed: BUILDR-347 Compile.from does not work correctly with FileTask when
87
+ no compiler is set (Peter Schröder)
88
+ * Fixed: BUILDR-349 resources.filter should use defaults from profile.yaml
89
+ even if mapping is provided
90
+ * Fixed: BUILDR-360 Reintroduce tag_name instance method for Git release task for
91
+ backward compatibility (Antoine Toulme)
92
+ * Fixed: BUILDR-361 Generate Eclipse .project file even if project has no
93
+ nature. Also prevent generation of .project if project has
94
+ children. (Antoine Toulme)
95
+ * Fixed: BUILDR-364 Package spec should be set to a Symbol when :file is
96
+ used (Klaas Prause)
97
+ * Fixed: BUILDR-365 test task should use test compile dependencies
98
+ * Fixed: BUILDR-366 Scala dependencies should be lazily loaded into
99
+ Java.classpath
100
+ * Fixed: BUILDR-373 Package type specific implementations of install,
101
+ uninstall and upload are not invoked (Antoine Toulme)
102
+ * Fixed: BUILDR-374 upload tasks can attempt to upload artifacts multiple times (Pepijn Van Eeckhoudt)
103
+ * Fixed: BUILDR-379 Ant sql task abruptly terminates buildr
104
+ * Fixed: BUILDR-380 GitRelease: recursive search for root '/' does not work
105
+ under Windows (Antoine Toulme)
106
+ * Fixed: BUILDR-381 JUnit tests on Groovy project fail with
107
+ NoClassDefFoundError: junit/framework/TestCase
108
+ * Fixed: BUILDR-382 Packages with default spec are not always created correctly
109
+ * Fixed: BUILDR-383 artifact().from(task_dependency) should not trigger
110
+ task_dependency if artifact exists
111
+ * Fixed: BUILDR-384 Buildr fails with rubygems 1.3.6
112
+ * Fixed: BUILDR-386 Display JRuby version in buildr -V (Antoine Toulme)
113
+ * Fixed: BUILDR-388 Continuous Compilation Support for Sub-Projects
114
+ * Fixed: BUILDR-391 resources task does not detect changes
115
+ * Fixed: BUILDR-392 Array values not flattened in (one version) of eclipse
116
+ task properties (Antoine Toulme, Peter Dettman)
117
+ * Fixed: BUILDR-306 Cobertura extension does not handle dependencies
118
+ correctly (Pepijn Van Eeckhoudt)
119
+ * Fixed: BUILDR-398 FileUtils#sh does not work correctly on Windows
120
+ (Pepijn Van Eeckhoudt)
121
+ * Fixed: BUILDR-399 invoke_with_call_chain does not restore call chain
122
+ correctly (Pepijn Van Eeckhoudt)
123
+ * Fixed: BUILDR-418 jruby exception: `ffi_libraries': no library specified
124
+ * Fixed: BUILDR-442 Errors while running the specs with jruby 1.5
125
+ * Fixed: BUILDR-449 Fix failing specs on Windows (Pepijn Van Eeckhoudt)
126
+ * Fixed: buildr test=all didn't run all tests as expected
127
+ * Fixed: Fail-fast if package.with() or include() called with nil values
128
+ * Fixed: Failures not reported correctly for ScalaTest (Alex Eagle)
129
+ * Fixed: Test dependencies should include test compile dependencies
130
+ * Fixed: Classpath correctly passed to Scala shell
131
+ * Fixed: Removed redundant tracing of command arguments
132
+ * Fixed: filter.using(hash) now correctly substitutes mappings with boolean
133
+ "false" value
134
+ * Fixed: BUILDR-404 buildr -V causes exception on JRuby
135
+ * Fixed: BUILDR-411 fix for RDoc generation
136
+ * Fixed: BUILDR-417 package_as_javadoc calls deprecated method
137
+ (Pepijn Van Eeckhoudt)
138
+ * Fixed: BUILDR-412 Gemspec dependencies don't add up - to the point it's not possible to release
139
+ * Fixed: BUILDR-414 Provide tag_name method on GitRelease as part of API
140
+ * Fixed: BUILDR-419 Exclusion patterns only work if they contain a wildcard
141
+ * Fixed: BUILDR-421 The MANIFEST.MF file packaged by Buildr as permissions set to 600
142
+ * Fixed: BUILDR-423 MANIFEST.MF files are not closed, leading to open files leak.
143
+ * Fixed: BUILDR-447 Path object do not include empty dirs in base directory (Peter Donald)
144
+ * Fixed: BUILDR-457 package(:jar) adds . entry to the jar
145
+
1
146
  1.3.5 (2009-10-05)
2
147
  * Added: Interactive shell (REPL) support
3
148
  * Added: BeanShell as default shell for java projects, bsh is small and it's
@@ -27,7 +172,7 @@
27
172
  * Fixed: BUILDR-315 Fix Eclipse .classpath for local libraries (Mat Schaffer)
28
173
  * Fixed: BUILDR-304 Referencing an existing package task using the package
29
174
  method fails if the package has a custom filename (Rhett Sutphin)
30
- * Fixed: BUILDR-322 When specifying files (instead of directories) as sources for compile task,
175
+ * Fixed: BUILDR-322 When specifying files (instead of directories) as sources for compile task,
31
176
  Buildr uses target directory timestamp only (not compiled output timestamp)
32
177
  * Fixed: BUILDR-324: Regression - baseDir system property is not set when executing tests [Alexis Midon]
33
178
  * Fixed: BUILDR-325: Overriding package spec with classifer doesn't work (Antoine Toulme)
@@ -41,7 +186,7 @@
41
186
  for artifact jars.
42
187
  * Added: BUILDR-222 Support Git as a version control system
43
188
  * Added BUILDR-223 Release Task: customizable commit message
44
- * Added: BUILDR-242 Include Scala-Tools Repository by Default.
189
+ * Added: BUILDR-242 Include Scala-Tools Repository by Default.
45
190
  * Added: BUILDR-268 Allow proxying for https connections (Joel Muzzerall).
46
191
  * Added: Info message "Packaging filename.ext" now displayed for packaging tasks
47
192
  * Added: Added Scala.version and Scala.version_str
@@ -55,13 +200,13 @@
55
200
  * Change: Upgraded to use JRuby 1.1.6 (when auto-installing).
56
201
  * Change: Buildr, no longer in incubation (hurray!): new site, mailing list, SVN, Git.
57
202
  * Change: BUILDR-171 Eclipse task generates meta-data files for projects with
58
- test source code but no main source code.
203
+ test source code but no main source code.
59
204
  * Change: BUILDR-177 Moved cobertura and emma extensions to lib directory.
60
205
  * Change: BUILDR-187 Source code attachment for Eclipse .classpath.
61
206
  * Change: BUILDR-188 Source code attachment for IDEA .iml file (Marko Sibakov).
62
207
  * Change: BUILDR-209 Scala Specs Should Use src/specs/scala/
63
208
  * Change: BUILDR-237 Use MacPorts Scala on OS X.
64
- * Change: BUILDR-260 Upgrade to Scala 2.7.3 compatible dependencies:
209
+ * Change: BUILDR-260 Upgrade to Scala 2.7.3 compatible dependencies:
65
210
  ScalaSpecs 1.4.3, ScalaCheck 1.5 and ScalaTest 0.9.5
66
211
  * Change: Buildr now uses Jekyll to generate Web site/documentation:
67
212
  http://github.com/mojombo/jekyll/ This replaces Docter so less code to
@@ -149,7 +294,7 @@ no longer running with the rake command.
149
294
  like java.util.Properties (Lacton).
150
295
  * Fixed: BUILDR-116: TestTask should include the main compile target in its
151
296
  dependencies, even when using non standard directories (Lacton).
152
- * Fixed: BUILDR-117 Shared directory for both code and resources produces
297
+ * Fixed: BUILDR-117 Shared directory for both code and resources produces
153
298
  duplicate Eclipse classpath entries (Nathan Hamblen)
154
299
  * Fixed: BUILDR-119 Eclipse task does not accept test resource folders
155
300
  (Lacton)
@@ -166,7 +311,7 @@ no longer running with the rake command.
166
311
  * Fixed: BUILDR-138 ScalaTest premature use of Buildr::Repositories
167
312
  inconsistent with customizing locations.
168
313
  * Fixed: BUILDR-152 Project.task fails when task name starts with a colon.
169
- * Fixed: BUILDR-157 Tasks library not loaded from a submodule.
314
+ * Fixed: BUILDR-157 Tasks library not loaded from a submodule.
170
315
  * Docs: BUILDR-111 Troubleshoot tip when Buildr's bin directory shows up in
171
316
  RUBYLIB (Geoffrey Ruscoe).
172
317
 
@@ -225,7 +370,7 @@ JRuby.
225
370
  * Added: Cobertura tasks can be invoked for a single project using project
226
371
  name as prefix to cobetura tasks.
227
372
  * Added: Cobertura can exclude specified classes from instrumentation.
228
- * Added: ArchiveTask#clean can be used to remove content from a package.
373
+ * Added: ArchiveTask#clean can be used to remove content from a package.
229
374
  * Added: Groovy compiler.
230
375
  * Added: Mechanism to simplify creating extensions (see Extension module).
231
376
  * Added: To run all test cases 'rake spec'. Test coverage reports will show
@@ -236,7 +381,7 @@ places where paths were used instead of path names.
236
381
  * Added: EAR packaging (Victor Hugo Borja).
237
382
  * Added: Profiles(.yaml), based on the code provided by Yanko Ivanov.
238
383
  * Added: Resources task picks the default mapping from the filter element of
239
- the current profile (if specified).
384
+ the current profile (if specified).
240
385
  * Added: Consolidated API for RJB and JRuby, replacing the now deprecated
241
386
  JavaWrapper.
242
387
  * Added: JRuby 1.1 support (Victor Hugo Borja, Nick Sieger).
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Buildr
2
2
 
3
- This is Buildr, the build system that doesn't suck.
3
+ This is Buildr, the build system that lets you build like you code.
4
4
 
5
5
  http://buildr.apache.org/
6
6
 
@@ -33,8 +33,8 @@ module Buildr
33
33
  args = ["-o", options[:output]] + args if options[:output]
34
34
  if options[:token]
35
35
  # antlr expects the token directory to exist when it starts
36
- mkdir_p options[:token]
37
- args = ["-lib", options[:token]] + args
36
+ mkdir_p options[:token]
37
+ args = ["-lib", options[:token]] + args
38
38
  end
39
39
  Java.load
40
40
  #Java.org.antlr.Tool.new_with_sig("[Ljava.lang.String;", args).process
@@ -44,7 +44,7 @@ module Buildr
44
44
 
45
45
  def antlr(*args)
46
46
  if Hash === args.last
47
- options = args.pop
47
+ options = args.pop
48
48
  in_package = options[:in_package].split(".")
49
49
  token = options[:token].split(".") if options[:token]
50
50
  else
@@ -54,11 +54,11 @@ module Buildr
54
54
  args = {:output=>File.join(task.name, in_package)}
55
55
  args.merge!({:token=>File.join(task.name, token)}) if token
56
56
  ANTLR.antlr task.prerequisites, args
57
- end
57
+ end
58
58
  end
59
59
 
60
60
  end
61
-
61
+
62
62
  class Project
63
63
  include ANTLR
64
64
  end
data/addon/buildr/drb.rb CHANGED
@@ -23,13 +23,13 @@ module Buildr
23
23
  # This addon allows you start a DRb server hosting a buildfile, so that
24
24
  # you can later invoke tasks on it without having to load
25
25
  # the complete buildr runtime again.
26
- #
26
+ #
27
27
  # Usage:
28
- #
28
+ #
29
29
  # buildr -r buildr/drb drb:start
30
30
  #
31
31
  # Once the server has been started you can invoke tasks using a simple script:
32
- #
32
+ #
33
33
  # #!/usr/bin/env ruby
34
34
  # require 'rubygems'
35
35
  # require 'buildr/drb'
@@ -48,18 +48,18 @@ module Buildr
48
48
  # without having to incur JVM startup time.
49
49
  # See the documentation for buildr/nailgun.
50
50
  module DRbApplication
51
-
51
+
52
52
  port = ENV['DRB_PORT'] || 2111
53
53
  PORT = port.to_i
54
54
 
55
55
  class SavedTask #:nodoc:
56
-
56
+
57
57
  def initialize(original)
58
58
  @original = original.clone
59
59
  @prerequisites = original.prerequisites.clone if original.respond_to?(:prerequisites)
60
60
  @actions = original.actions.clone if original.respond_to?(:actions)
61
61
  end
62
-
62
+
63
63
  def name
64
64
  @original.name
65
65
  end
@@ -71,7 +71,7 @@ module Buildr
71
71
  def prerequisites
72
72
  @prerequisites ||= []
73
73
  end
74
-
74
+
75
75
  def define!
76
76
  @original.class.send(:define_task, @original.name => prerequisites).tap do |task|
77
77
  task.comment = @original.comment
@@ -81,9 +81,9 @@ module Buildr
81
81
  end # SavedTask
82
82
 
83
83
  class Snapshot #:nodoc:
84
-
84
+
85
85
  attr_accessor :projects, :tasks, :rules, :layout, :options
86
-
86
+
87
87
  # save the tasks,rules,layout defined by buildr
88
88
  def initialize
89
89
  @rules = Buildr.application.instance_eval { @rules || [] }.clone
@@ -98,11 +98,11 @@ module Buildr
98
98
  hash
99
99
  end
100
100
  end
101
-
101
+
102
102
  end # Snapshot
103
103
 
104
104
  class << self
105
-
105
+
106
106
  attr_accessor :original, :snapshot
107
107
 
108
108
  def run
@@ -139,7 +139,7 @@ module Buildr
139
139
  def server_uri
140
140
  "druby://:#{PORT}"
141
141
  end
142
-
142
+
143
143
  def connect
144
144
  buildr = DRbObject.new(nil, server_uri)
145
145
  uri = buildr.client_uri # obtain our uri from the server
@@ -159,7 +159,7 @@ module Buildr
159
159
 
160
160
  # Lazily load buildr the first time it's needed
161
161
  require 'buildr'
162
-
162
+
163
163
  # Save the tasks,rules,layout defined by buildr
164
164
  # before loading any project
165
165
  @original = self::Snapshot.new
@@ -191,7 +191,7 @@ module Buildr
191
191
  $stdout = SimpleDelegator.new($stdout)
192
192
  $stderr = SimpleDelegator.new($stderr)
193
193
  end
194
-
194
+
195
195
  def with_config(remote)
196
196
  @invoked = true
197
197
  set = lambda do |env|
@@ -201,8 +201,8 @@ module Buildr
201
201
  $stderr.__setobj__(env[:err])
202
202
  Buildr.application.instance_variable_set :@original_dir, env[:dir]
203
203
  end
204
- original = {
205
- :dir => Buildr.application.instance_variable_get(:@original_dir),
204
+ original = {
205
+ :dir => Buildr.application.instance_variable_get(:@original_dir),
206
206
  :argv => ARGV,
207
207
  :in => $stdin.__getobj__,
208
208
  :out => $stdout.__getobj__,
@@ -238,7 +238,7 @@ module Buildr
238
238
  end
239
239
 
240
240
  private
241
-
241
+
242
242
  def buildfile_needs_reload?
243
243
  !@last_loaded || @last_loaded < buildfile.timestamp
244
244
  end
@@ -274,7 +274,7 @@ module Buildr
274
274
  end
275
275
 
276
276
  task('drb:start') { run_server! } if Buildr.respond_to?(:application)
277
-
277
+
278
278
  end # DRbApplication
279
279
 
280
280
  end
@@ -21,7 +21,7 @@ module Buildr
21
21
 
22
22
  # Provides Hibernate Doclet and schema export tasks. Require explicitly using <code>require "buildr/hibernate"</code>.
23
23
  module Hibernate
24
-
24
+
25
25
  REQUIRES = Buildr.struct(
26
26
  :collections => "commons-collections:commons-collections:jar:3.1",
27
27
  :logging => "commons-logging:commons-logging:jar:1.0.3",
@@ -49,7 +49,7 @@ module Buildr
49
49
  def doclet(options)
50
50
  options[:sources].each { |src| file(src).invoke }
51
51
  ant "hibernatedoclet" do |ant|
52
- ant.taskdef :name=>"hibernatedoclet", :classname=>"xdoclet.modules.hibernate.HibernateDocletTask", :classpath=>requires
52
+ ant.taskdef :name=>"hibernatedoclet", :classname=>"xdoclet.modules.hibernate.HibernateDocletTask", :classpath=>options[:classpath]
53
53
  ant.hibernatedoclet :destdir=>options[:target].to_s, :excludedtags=>options[:excludedtags], :force=>"true" do
54
54
  ant.hibernate :version=>"3.0"
55
55
  options[:sources].map(&:to_s).each do |source|
@@ -67,22 +67,19 @@ module Buildr
67
67
  # :drop=>"no", :create=>"yes", :output=>target) do
68
68
  # fileset :dir=>source.to_s, :includes=>"**/*.hbm.xml"
69
69
  # end
70
- def schemaexport(options = nil)
70
+ def schemaexport(classpath, options = nil)
71
71
  ant "schemaexport" do |ant|
72
- ant.taskdef :name=>"schemaexport", :classname=>"org.hibernate.tool.hbm2ddl.SchemaExportTask", :classpath=>requires
72
+ ant.taskdef :name=>"schemaexport", :classname=>"org.hibernate.tool.hbm2ddl.SchemaExportTask", :classpath=>classpath
73
73
  ant.schemaexport(options) { yield ant if block_given? } if options
74
74
  end
75
75
  end
76
76
 
77
- protected
78
-
79
- # This will download all the required artifacts before returning a classpath, and we want to do this only once.
80
- def requires()
81
- @requires ||= Buildr.artifacts(REQUIRES.to_a).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
82
- end
83
-
84
77
  end
85
78
 
79
+ def hibernate_requires()
80
+ @requires ||= REQUIRES.dup
81
+ end
82
+
86
83
  # :call-seq:
87
84
  # hibernate_doclet(options?) => task
88
85
  #
@@ -99,7 +96,7 @@ module Buildr
99
96
  depends = compile.sources.map { |src| FileList[File.join(src.to_s, "**/*.java")] }.flatten
100
97
  end
101
98
  file("target/hbm.timestamp"=>depends) do |task|
102
- Hibernate.doclet({ :sources=>compile.sources, :target=>compile.target }.merge(options))
99
+ Hibernate.doclet({ :sources=>compile.sources, :target=>compile.target, :classpath => hib_resolve_classpath }.merge(options))
103
100
  write task.name
104
101
  end
105
102
  end
@@ -120,11 +117,11 @@ module Buildr
120
117
  # fileset(:dir=>compile.sources.first) { include :name=>"**/*.hbm.xml" } }
121
118
  # end
122
119
  # end
123
- def hibernate_schemaexport(args, &block)
120
+ def hibernate_schemaexport(args)
124
121
  path, arg_names, deps = Rake.application.resolve_args([args])
125
122
  unless Rake::Task.task_defined?(path)
126
123
  class << file(path) ; attr_accessor :ant ; end
127
- file(path).enhance { |task| task.ant = Hibernate.schemaexport }
124
+ file(path).enhance { |task| task.ant = Hibernate.schemaexport(hib_resolve_classpath) }
128
125
  end
129
126
  if block
130
127
  file(path).enhance(deps) { |task| block.call task, task.ant }
@@ -132,6 +129,13 @@ module Buildr
132
129
  file(path).enhance deps
133
130
  end
134
131
  end
132
+
133
+ protected
134
+
135
+ # This will download all the required artifacts before returning a classpath, and we want to do this only once.
136
+ def hib_resolve_classpath
137
+ Buildr.artifacts(hibernate_requires.to_a).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
138
+ end
135
139
 
136
140
  end
137
141