buildr 1.4.2-x86-mswin32 → 1.4.3-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/CHANGELOG +29 -3
  2. data/LICENSE +0 -0
  3. data/NOTICE +0 -0
  4. data/_jbuildr +2 -0
  5. data/addon/buildr/antlr.rb +0 -0
  6. data/addon/buildr/cobertura.rb +0 -0
  7. data/addon/buildr/drb.rb +0 -0
  8. data/addon/buildr/emma.rb +0 -0
  9. data/addon/buildr/javacc.rb +0 -0
  10. data/addon/buildr/jdepend.rb +0 -0
  11. data/addon/buildr/jetty.rb +0 -0
  12. data/addon/buildr/jibx.rb +0 -0
  13. data/addon/buildr/nailgun.rb +0 -0
  14. data/addon/buildr/org/apache/buildr/BuildrNail.java +0 -0
  15. data/addon/buildr/org/apache/buildr/JettyWrapper.java +0 -0
  16. data/addon/buildr/xmlbeans.rb +0 -0
  17. data/buildr.gemspec +1 -1
  18. data/doc/_config.yml +0 -0
  19. data/doc/_layouts/preface.html +0 -0
  20. data/doc/css/syntax.css +0 -0
  21. data/doc/extending.textile +0 -0
  22. data/doc/images/asf-logo.gif +0 -0
  23. data/doc/images/buildr-hires.png +0 -0
  24. data/doc/images/buildr.png +0 -0
  25. data/doc/images/favicon.png +0 -0
  26. data/doc/images/growl-icon.tiff +0 -0
  27. data/doc/images/note.png +0 -0
  28. data/doc/images/project-structure.png +0 -0
  29. data/doc/images/tip.png +0 -0
  30. data/doc/images/zbuildr.png +0 -0
  31. data/doc/images/zbuildr.tif +0 -0
  32. data/doc/index.textile +14 -15
  33. data/doc/mailing_lists.textile +0 -0
  34. data/doc/more_stuff.textile +54 -1
  35. data/doc/releasing.textile +17 -16
  36. data/doc/settings_profiles.textile +13 -13
  37. data/lib/buildr.rb +1 -0
  38. data/lib/buildr/core.rb +1 -0
  39. data/lib/buildr/core/application.rb +8 -3
  40. data/lib/buildr/core/checks.rb +0 -0
  41. data/lib/buildr/core/doc.rb +15 -4
  42. data/lib/buildr/core/environment.rb +0 -0
  43. data/lib/buildr/core/generate.rb +0 -0
  44. data/lib/buildr/core/help.rb +0 -0
  45. data/lib/buildr/core/progressbar.rb +0 -0
  46. data/lib/buildr/core/run.rb +43 -0
  47. data/lib/buildr/core/util.rb +21 -3
  48. data/lib/buildr/ide.rb +0 -0
  49. data/lib/buildr/ide/idea.ipr.template +0 -0
  50. data/lib/buildr/ide/idea.rb +0 -0
  51. data/lib/buildr/ide/idea7x.ipr.template +0 -0
  52. data/lib/buildr/java/doc.rb +16 -0
  53. data/lib/buildr/java/packaging.rb +9 -4
  54. data/lib/buildr/packaging.rb +0 -0
  55. data/lib/buildr/packaging/archive.rb +4 -4
  56. data/lib/buildr/packaging/artifact.rb +16 -15
  57. data/lib/buildr/packaging/artifact_search.rb +0 -0
  58. data/lib/buildr/packaging/gems.rb +0 -0
  59. data/lib/buildr/packaging/package.rb +1 -1
  60. data/lib/buildr/packaging/version_requirement.rb +0 -0
  61. data/lib/buildr/packaging/ziptask.rb +6 -4
  62. data/lib/buildr/resources/buildr.icns +0 -0
  63. data/lib/buildr/run.rb +202 -0
  64. data/lib/buildr/scala/doc.rb +18 -0
  65. data/lib/buildr/scala/tests.rb +3 -0
  66. data/lib/buildr/shell.rb +1 -1
  67. data/lib/buildr/version.rb +1 -1
  68. data/rakelib/doc.rake +23 -5
  69. data/rakelib/release.rake +0 -0
  70. data/rakelib/setup.rake +2 -2
  71. data/rakelib/stage.rake +3 -3
  72. data/spec/addon/drb_spec.rb +0 -0
  73. data/spec/core/application_spec.rb +65 -27
  74. data/spec/core/doc_spec.rb +195 -0
  75. data/spec/core/run_spec.rb +92 -0
  76. data/spec/java/compiler_spec.rb +0 -194
  77. data/spec/java/doc_spec.rb +56 -0
  78. data/spec/java/packaging_spec.rb +30 -14
  79. data/spec/java/run_spec.rb +78 -0
  80. data/spec/packaging/archive_spec.rb +20 -5
  81. data/spec/packaging/artifact_spec.rb +23 -14
  82. data/spec/packaging/packaging_helper.rb +0 -0
  83. data/spec/scala/doc_spec.rb +68 -0
  84. metadata +151 -143
data/CHANGELOG CHANGED
@@ -1,3 +1,29 @@
1
+ 1.4.3 (2010-10-13)
2
+ * Added: BUILDR-514 New 'run' local task. http://buildr.apache.org/more_stuff.html#run
3
+ * Added: BUILDR-518 Load _buildr.rb or .buildr.rb from same directory as Buildfile
4
+ if they exist (Peter Donald)
5
+ * Added: BUILDR-519 Load repositories.release_to from build settings (Peter Donald)
6
+ * Fixed: BUILDR-520 Scaladoc 2.8 no longer support -windowtitle, use -doc-title instead.
7
+ * Fixed: BUILDR-512 Buildr::Util.ruby invokes non existent method (Peter Donald)
8
+ * Fixed: BUILDR-513 --trace fails with NoMethodError : undefined method
9
+ `include?' for nil:NilClass
10
+ * Fixed: BUILDR-515 -update-snapshot doesn't work as expected
11
+ * Fixed: BUILDR-517 package(:jar).include(directory, :as=>"foo") produces a corrupted jar
12
+ * Fixed: BUILDR-524 Optimized and more robust reading of jar MANIFEST.MF (Hugues Malphettes)
13
+ * Fixed: BUILDR-525 Documentation refers to repositories.upload_to rather than
14
+ repositories.release_to (Peter Donald)
15
+ * Fixed: BUILDR-526 Gracefully handle h2 sections with no id in documentation (Peter Donald)
16
+ * Fixed: BUILDR-527 package(:war) if libs passed are files (instead of artifacts)
17
+ * Fixed: BUILDR-528 Stop using deprecated method Gem::Dependency.version_requirements correctly (Peter Donald)
18
+ * Fixed: BUILDR-529 Stop using gem name "foo" in tests as it is the name of an actual gem (Peter Donald)
19
+ * Fixed: BUILDR-531 Improve error message when build requires gem that can't be found in local/remote
20
+ gem repositories (Peter Donald)
21
+ * Fixed: BUILDR-532 package_as_source does not package resources (Tammo van Lessen)
22
+ * Fixed: BUILDR-534 package_with_sources does not package source artifacts if no sources but resources exist.
23
+ (Tammo Van Lessen)
24
+ * Fixed: BUILDR-535 Failing "checks" produce no meaningful errors on JRuby
25
+ * Fixed: JavaRebel was previously not correctly detected.
26
+
1
27
  1.4.2 (2010-09-18)
2
28
  * Added: BUILDR-415 Ability to exclude tests from command line
3
29
  * Added: BUILDR-495 Document twitter on Buildr's homepage
@@ -42,10 +68,10 @@
42
68
  * Fixed: BUILDR-482 Javadoc : cannot load class java.com.sun.tools.javadoc.Main
43
69
  * Fixed: BUILDR-488 artifact poms not reinstalled
44
70
  * Fixed: BUILDR-491 sftp download goes into infinite loop
45
- * Fixed: BUILDR-498 Artifact download fails with "negative argument" if
71
+ * Fixed: BUILDR-498 Artifact download fails with "negative argument" if
46
72
  terminal capabilities are undefined
47
- * Fixed: BUILDR-499 Java package caching through constants
48
- e.g. (Java.java.lang.String cached as Java::Lang::String)
73
+ * Fixed: BUILDR-499 Java package caching through constants
74
+ e.g. (Java.java.lang.String cached as Java::Lang::String)
49
75
  can shadow Ruby modules
50
76
  * Fixed: BUILDR-501 Fix buildr label when listing tasks (Peter Donald)
51
77
  * Fixed: BUILDR-503 Include with as includes directories as files when the directory has the same name as the path
data/LICENSE CHANGED
File without changes
data/NOTICE CHANGED
File without changes
data/_jbuildr CHANGED
@@ -19,6 +19,8 @@
19
19
 
20
20
  require 'rubygems'
21
21
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') << File.join(File.dirname(__FILE__), 'addon')
22
+
23
+ require 'buildr/version'
22
24
  spec = Gem::Specification.load(File.join(File.dirname(__FILE__), 'buildr.gemspec'))
23
25
  # To avoid a warning about the version_requirements deprecation, we use this method inline.
24
26
  def version_required(gem_def)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -68,7 +68,7 @@ for those one-off tasks, with a language that's a joy to use.
68
68
  spec.add_dependency 'jruby-openssl', '>= 0.7' if spec.platform.to_s == 'java'
69
69
  spec.add_development_dependency 'jekyll', '~> 0.6.2' unless spec.platform.to_s == 'java'
70
70
  spec.add_development_dependency 'sdoc'
71
- spec.add_development_dependency 'rcov', '~>0.8' unless spec.platform.to_s == 'java'
71
+ spec.add_development_dependency 'rcov', '0.9.9' unless spec.platform.to_s == 'java'
72
72
  spec.add_development_dependency 'win32console' if spec.platform.to_s == 'x86-mswin32'
73
73
  spec.add_development_dependency 'jekylltask', '>= 1.0.2' unless spec.platform.to_s == 'java'
74
74
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -46,21 +46,20 @@ So let's get started. You can "read the documentation online":quick_start.html,
46
46
 
47
47
  h2(#news). What's New
48
48
 
49
- New in Buildr 1.4.0:
50
-
51
- * Support for Scala 2.8 compiler-level change detection and dependency tracking
52
- * Continuous compilation
53
- * Support for Eclipse classpath variables to avoid absolute pathnames in generated .classpath
54
- * "buildr test=only" will only run tests explicitly specified on the command line (and ignore transitive test dependencies)
55
- * Generic documentation framework (we do doc, not just javadoc)
56
- * New "test:failed" task to execute only tests that failed during last run
57
- * Project extensions (before/after_define) now support dependency ordering similar to Rake
58
- * Support unzipping tar.gz files
59
- * ScalaTest now generates JUnit XML reports in addition to text files.
60
- * Support protocol buffer code generation
61
- * Tested against Windows and Ubuntu on JRuby and MRI (and experimenting with Rubinius)
62
- * Dependency upgrades such as Ant 1.8.0, JUnit 4.7, JMock 2.5.1, Cobertura 1.9.4.1, Scala Specs 1.6.2.1, ScalaCheck 1.6, ScalaTest 1.0.1
63
- * And 60+ bug fixes !
49
+ New in Buildr 1.4.2:
50
+
51
+ * Added: BUILDR-212 Update support for SNAPSHOT artifacts
52
+ * Added: BUILDR-465 Eclipse project names should be customizable
53
+ * Added: BUILDR-493 Eclipse task should generate javadocpath
54
+ * Added: BUILDR-509 Option to generate non-prefixed Eclipse project names
55
+ * Added: BUILDR-510 Add support for trace categories: --trace=foo,bar
56
+ * Change: BUILDR-484 Upgrade to Scala 2.8.0 (final) and associated dependencies (ScalaCheck 1.7, ScalaTest 1.2, Specs 1.6.5)
57
+ * Change: BUILDR-487 package :sources should default to using .jar extension (instead of .zip)
58
+ * Fixed: BUILDR-143 Upload to a file:// path needs ability to specify permissions
59
+ * Fixed: BUILDR-144 Filter does not preserve file permissions
60
+ * Fixed: BUILDR-203 Compiler guessing parses the source files.
61
+ * Fixed: BUILDR-317 Contribution of the integration with the ecj compiler
62
+ * And 50+ bug fixes !
64
63
 
65
64
  See the "CHANGELOG":CHANGELOG for full details.
66
65
 
File without changes
@@ -108,7 +108,7 @@ If you don't know which tracing category you need to enable or if you want a ful
108
108
  $ buildr --trace=all
109
109
  {% endhighlight %}
110
110
 
111
- h3. JavaRebel Integration
111
+ h3(#javarebel). JavaRebel Integration
112
112
 
113
113
  "JavaRebel":http://www.zeroturnaround.com/javarebel is a live bytecode reloading solution by Zero Turnaround. It's a lot like the hot code reload feature found in many Java IDE debuggers (like Eclipse and IntelliJ), but capable of handling things like member addition or removal and new class definition. The tool itself is commercial and works with any JVM language, but they do offer a free license for use with Scala classes only.
114
114
 
@@ -146,6 +146,59 @@ scala> </pre>
146
146
 
147
147
  Note that Buildr does *not* check to make sure that you have a valid JavaRebel license, so you may end up launching with JavaRebel configured but without the ability to use it (in which case, JavaRebel will print a notification).
148
148
 
149
+ h2(#run). Running Your Application
150
+
151
+ The @run@ task lets you easily run programs from your buildfile, such as launching your own application.
152
+
153
+ In its simplest form, you simply define the main class of your Java application,
154
+
155
+ {% highlight ruby %}
156
+ define 'my-project' do
157
+ compile.with COMMONS_IO, HTTPCLIENT
158
+ run.using :main => "org.example.Main"
159
+ end
160
+ {% endhighlight %}
161
+
162
+ And then run,
163
+
164
+ {% highlight ruby %}
165
+ ~/my-project$ buildr run
166
+ {% endhighlight %}
167
+
168
+ which would launch your application using the project's compile classpath.
169
+
170
+ It's also possible to pass arguments to the JVM using the @:java_args@ option:
171
+
172
+ {% highlight ruby %}
173
+ run.using :main => "org.example.Main",
174
+ :java_args => ["-server"]
175
+ {% endhighlight %}
176
+
177
+ If your application requires arguments, you can pass in an array of values for the @:main@ option, or provide a set of system properties using @:properties@.
178
+
179
+ {% highlight ruby %}
180
+ run.using :main => ["org.example.Main", "-t", "input.txt"],
181
+ :properties => { :debug => "true" }
182
+ {% endhighlight %}
183
+
184
+ The @run@ task is a local task, which means that Buildr will automatically pick the @run@ task matching the project in the current directory. Executing the following command:
185
+
186
+ {% highlight ruby %}
187
+ ~/my-project/subproject$ buildr run
188
+ {% endhighlight %}
189
+
190
+ will run the @my-project:subproject:run@ task, assuming @my-project@ is your top-level project.
191
+
192
+ Here is a summary of @run.using@ options,
193
+
194
+ |_. Option |_. Description ... |
195
+ | @:main@ | The java main class, e.g. "com.example.Main". Can also be an array if the main class requires arguments. |
196
+ | @:properties@ | A hash of system properties to be passed to java. |
197
+ | @:java_args@ | An array of additional parameters to pass to java |
198
+ | @:classpath@ | An array of additional classpath elements (i.e. artifacts, files, etc.). By default, the @run@ task automatically uses the @compile.dependencies@, @test.dependencies@ and @test.compile.target@ of your project. |
199
+
200
+ p(note). The @run@ task also detects and uses JavaRebel if it's available. See the "JavaRebel":#javarebel section for details.
201
+
149
202
  h2(#gems). Using Gems
150
203
 
151
204
  The purpose of the buildfile is to define your projects, and the various tasks and functions used for building them. Some of these are specific to your projects, others are more general in nature, and you may want to share them across projects.
@@ -1,12 +1,11 @@
1
1
  ---
2
2
  layout: default
3
- title: Releasing
3
+ title: Releasing
4
4
  ---
5
5
 
6
- Now that we built and test awesome software, let's the world know and release it.
6
+ Now that we built and tested our awesome software, let's tell the world and release it.
7
7
 
8
-
9
- Each buildile can specify the current version with a constant named VERSION_NUMBER or THIS_VERSION.
8
+ Each buildfile can specify the current version with a constant named @VERSION_NUMBER@ or @THIS_VERSION@.
10
9
 
11
10
  {% highlight ruby %}
12
11
  THIS_VERSION = "1.0.0-SNAPSHOT"
@@ -22,14 +21,14 @@ end
22
21
 
23
22
  h2(#default). What does a release do?
24
23
 
25
- The default behavior of the Release task is the following:
24
+ The default behavior of the @Release@ task is the following:
26
25
  # Check that the version to be released and the next version are different
27
26
  # Check that the project is being tracked by Git or Subversion
28
- # Package, test and deploy the artifacts using THIS_VERSION value minus the '-SNAPSHOT' suffix (if any)
27
+ # Package, test and deploy the artifacts using @THIS_VERSION@ value minus the @-SNAPSHOT@ suffix (if any)
29
28
  # Tag the repository with the released version number
30
- # Update the value of THIS_VERSION in the buildfile with the next version number
29
+ # Update the value of @THIS_VERSION@ in the buildfile with the next version number
31
30
 
32
- Buildr will increment the last digit of the 3-digit versioni number if THIS_VERSION contains '-SNAPSHOT'.
31
+ Buildr will increment the last digit of the 3-digit versioni number if @THIS_VERSION@ ends with @-SNAPSHOT@.
33
32
  So, at the end of a release, the buildfile now looks like this:
34
33
 
35
34
  {% highlight ruby %}
@@ -55,11 +54,11 @@ dd35015 (tag: 1.0.0) Changed version number to 1.0.0
55
54
 
56
55
  h2(#custom_version). How to specify my own version number scheme?
57
56
 
58
- If THIS_VERSION does not contain '-SNAPSHOT', Buildr delegates the resolution of the next version number to the user which has 2 differents ways to express her wishes: Release.next_version or the environment variable NEXT_VERSION.
57
+ If @THIS_VERSION@ does not contain @-SNAPSHOT@, Buildr delegates the resolution of the next version number to the user which has 2 differents ways to express her wishes: @Release.next_version@ or the environment variable @NEXT_VERSION@.
59
58
 
60
59
  h3(#next_version_proc). Using Release.next_version
61
60
 
62
- The Release class can receive the next version of the buildfile. This could be a string or a proc that would receive the current version and return the next version.
61
+ The @Release@ class can receive the next version of the buildfile. This could be a string or a proc that would receive the current version and return the next version.
63
62
 
64
63
  {% highlight ruby %}
65
64
  THIS_VERSION = "1.0.0-SNAPSHOT"
@@ -69,7 +68,7 @@ Release.next_version = "2.0.0-SNAPSHOT"
69
68
 
70
69
  # or a proc
71
70
  Release.next_version = lambda do |this_version| # 1.0.0-SNAPSHOT
72
- new_version = this_version.split(/\./)
71
+ new_version = @THIS_VERSION@.split(/\./)
73
72
  new_version[0] = new_version[0] + 1
74
73
  new_version
75
74
  end
@@ -85,17 +84,20 @@ end
85
84
 
86
85
  h3(#next_version_envvar). Using the environment variable NEXT_VERSION
87
86
 
88
- If the environment variable NEXT_VERSION is set, Buildr will use this value to update THIS_VERSION at the end of the release.
87
+ If the environment variable @NEXT_VERSION@ is set, Buildr will use this value to update @THIS_VERSION@ at the end of the release.
89
88
 
90
89
  For conveniency, this variable is case insensitive.
91
90
 
92
- So, all 3 following commands would generate the buildfile below:
91
+ So, all 3 following commands will run a release with a custom new version:
92
+
93
93
  {% highlight sh %}
94
94
  $ buildr release next_version="1.0.0-rc1"
95
95
  $ env next_version="1.0.0-rc1" buildr release
96
96
  $ env NEXT_VERSION="1.0.0-rc1" buildr release
97
97
  {% endhighlight %}
98
98
 
99
+ Those commands will generate the Buildfile below:
100
+
99
101
  {% highlight ruby %}
100
102
  THIS_VERSION = "1.0.0-rc1"
101
103
 
@@ -107,10 +109,9 @@ define 'killer-app' do
107
109
  end
108
110
  {% endhighlight %}
109
111
 
110
- The environment variable NEXT_VERSION has precedence over Release.next_version.
111
-
112
+ The environment variable @NEXT_VERSION@ has precedence over Release.next_version.
112
113
 
113
114
  h2(#custom_tag_and_msg). How to specify my own tag name and commit message?
114
115
 
115
- As explained earlier, Buildr will create two new commits and a new tag in the version control system. Similarly to Release.next_version, the commit message and the tag name can be customized with Release.message and Release.tag_name. Both could be strings or procs that would receive the released version i.i THIS_VERSION without '-SNAPSHOT'.
116
+ As explained earlier, Buildr will create two new commits and a new tag in the version control system. Similarly to @Release.next_version@, the commit message and the tag name can be customized with @Release.message@ and @Release.tag_name@. Both could be strings or procs that would receive the released version @THIS_VERSION@ without @-SNAPSHOT@.
116
117
 
@@ -54,8 +54,8 @@ p(note). Buildr does not check any of the arguments in @JAVA_OPTS@. A common mi
54
54
  Some extensions may use additional environment variables, and of course, you can always add your own. This example uses two environment variables for specifying the username and password:
55
55
 
56
56
  {% highlight ruby %}
57
- repositories.upload_to[:username] = ENV['USERNAME']
58
- repositories.upload_to[:password] = ENV['PASSWORD']
57
+ repositories.release_to[:username] = ENV['USERNAME']
58
+ repositories.release_to[:password] = ENV['PASSWORD']
59
59
  {% endhighlight %}
60
60
 
61
61
 
@@ -77,7 +77,7 @@ repositories:
77
77
  local: some/path/to/my_repo
78
78
 
79
79
  # prefer the local or nearest mirrors
80
- remote:
80
+ remote:
81
81
  - https://intra.net/maven2
82
82
  - http://example.com
83
83
 
@@ -86,8 +86,8 @@ repositories:
86
86
  username: john
87
87
  password: secret
88
88
 
89
- # You can place settings of your own, and reference them
90
- # on buildfiles.
89
+ # You can place settings of your own, and reference them
90
+ # on buildfiles.
91
91
  im:
92
92
  server: jabber.company.com
93
93
  usr: notifier@company-jabber.com
@@ -113,7 +113,7 @@ They help keep the buildfile and build.yaml file simple and readable, working to
113
113
 
114
114
  {% highlight yaml %}
115
115
  # This project requires the following ruby gems, buildr addons
116
- gems:
116
+ gems:
117
117
  # Suppose we want to notify developers when testcases fail.
118
118
  - buildr-twitter-notifier-addon >=1
119
119
  # we test with ruby mock objects
@@ -132,11 +132,11 @@ twitter:
132
132
  notify:
133
133
  test_failure: unless-modified
134
134
  compile_failure: never
135
- developers:
135
+ developers:
136
136
  - joe
137
137
  - jane
138
138
 
139
- jira:
139
+ jira:
140
140
  uri: https://jira.corp.org
141
141
  {% endhighlight %}
142
142
 
@@ -145,7 +145,7 @@ When buildr is loaded, required ruby gems will be installed if needed, thus addi
145
145
  Artifacts defined on @build.yaml@ can be referenced on your buildfile by supplying the ruby symbol to the @Buildr.artifact@ and @Buildr.artifacts@ methods. The @compile.with@, @test.with@ methods can also be given these names.
146
146
 
147
147
  {% highlight ruby %}
148
- define 'my_project' do
148
+ define 'my_project' do
149
149
  compile.with artifacts(:log4j, :j2ee)
150
150
  test.with :spring, :j2ee
151
151
  end
@@ -154,7 +154,7 @@ end
154
154
  Build settings can be retreived using the @Buildr.settings.build@ accessor.
155
155
 
156
156
  {% highlight ruby %}
157
- task 'create_patch' do
157
+ task 'create_patch' do
158
158
  patch = Git.create_patch :interactive => true
159
159
  if patch && agree("Would you like to request inclusion of #{patch}")
160
160
  jira = Jira.new( Buildr.settings.build['jira']['uri'] ) # submit a patch
@@ -174,8 +174,8 @@ Here's an example @buildr.rb@:
174
174
 
175
175
  {% highlight ruby %}
176
176
  # Only I should know that
177
- repositories.upload_to[:username] = 'assaf'
178
- repositories.upload_to[:password] = 'supersecret'
177
+ repositories.release_to[:username] = 'assaf'
178
+ repositories.release_to[:password] = 'supersecret'
179
179
  # Search here first, it's faster
180
180
  repositories.remote << 'http://inside-the-firewall'
181
181
  {% endhighlight %}
@@ -212,7 +212,7 @@ Here's a simple example for handling different environments within the Buildfile
212
212
 
213
213
  {% highlight ruby %}
214
214
  project 'db-module' do
215
- db = (environment == 'production' ? 'oracle' : 'hsql')
215
+ db = (Buildr.environment == 'production' ? 'oracle' : 'hsql')
216
216
  resources.from(_("src/main/#{db}"))
217
217
  end
218
218
  {% endhighlight %}
@@ -22,6 +22,7 @@ require 'buildr/packaging'
22
22
  require 'buildr/java'
23
23
  require 'buildr/ide'
24
24
  require 'buildr/shell'
25
+ require 'buildr/run'
25
26
 
26
27
  # Methods defined in Buildr are both instance methods (e.g. when included in Project)
27
28
  # and class methods when invoked like Buildr.artifacts().
@@ -23,6 +23,7 @@ require 'buildr/core/filter'
23
23
  require 'buildr/core/compile'
24
24
  require 'buildr/core/test'
25
25
  require 'buildr/core/shell'
26
+ require 'buildr/core/run'
26
27
  require 'buildr/core/checks'
27
28
  require 'buildr/core/transports'
28
29
  require 'buildr/core/generate'
@@ -346,9 +346,7 @@ module Buildr
346
346
  ['--trace', '-t [CATEGORIES]', "Turn on invoke/execute tracing, enable full backtrace.",
347
347
  lambda { |value|
348
348
  options.trace = true
349
- if value
350
- options.trace_categories = value.split(',').map { |v| v.downcase.to_sym }
351
- end
349
+ options.trace_categories = value ? value.split(',').map { |v| v.downcase.to_sym } : []
352
350
  options.trace_all = options.trace_categories.include? :all
353
351
  verbose(true)
354
352
  }
@@ -469,12 +467,19 @@ module Buildr
469
467
  if File.exist?(old) && !File.exist?(new)
470
468
  warn "Deprecated: Please move buildr.rb from your home directory to the .buildr directory in your home directory"
471
469
  end
470
+
472
471
  # Load home/.buildr/buildr.rb in preference
473
472
  files = [ File.exist?(new) ? new : old, 'buildr.rb' ].select { |file| File.exist?(file) }
474
473
  files += [ File.expand_path('buildr.rake', ENV['HOME']), File.expand_path('buildr.rake') ].
475
474
  select { |file| File.exist?(file) }.each { |file| warn "Please use '#{file.ext('rb')}' instead of '#{file}'" }
476
475
  files += (options.rakelib || []).collect { |rlib| Dir["#{rlib}/*.rake"] }.flatten
477
476
 
477
+ # Load .buildr/_buildr.rb same directory as buildfile
478
+ %w{.buildr.rb _buildr.rb}.each do |f|
479
+ local_buildr = File.expand_path("#{File.dirname(Buildr.application.buildfile.to_s)}/#{f}")
480
+ files << local_buildr if File.exist?( local_buildr )
481
+ end
482
+
478
483
  files.each do |file|
479
484
  unless $LOADED_FEATURES.include?(file)
480
485
  load file