vic-buildr 1.3.1 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/CHANGELOG +90 -8
  2. data/{README → README.rdoc} +29 -16
  3. data/Rakefile +17 -19
  4. data/_buildr +50 -0
  5. data/addon/buildr/cobertura.rb +47 -44
  6. data/addon/buildr/emma.rb +237 -0
  7. data/addon/buildr/jetty.rb +1 -1
  8. data/addon/buildr/nailgun.rb +581 -661
  9. data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail$Main.class +0 -0
  10. data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail.class +0 -0
  11. data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail.java +0 -0
  12. data/addon/buildr/xmlbeans.rb +1 -1
  13. data/bin/buildr +9 -2
  14. data/buildr.buildfile +53 -0
  15. data/buildr.gemspec +23 -15
  16. data/doc/css/default.css +51 -48
  17. data/doc/css/print.css +60 -55
  18. data/doc/css/syntax.css +40 -31
  19. data/doc/images/growl-icon.tiff +0 -0
  20. data/doc/images/project-structure.png +0 -0
  21. data/doc/pages/artifacts.textile +46 -156
  22. data/doc/pages/building.textile +63 -324
  23. data/doc/pages/contributing.textile +116 -88
  24. data/doc/pages/download.textile +20 -15
  25. data/doc/pages/extending.textile +27 -81
  26. data/doc/pages/getting_started.textile +47 -111
  27. data/doc/pages/index.textile +19 -37
  28. data/doc/pages/languages.textile +407 -0
  29. data/doc/pages/more_stuff.textile +92 -173
  30. data/doc/pages/packaging.textile +72 -237
  31. data/doc/pages/projects.textile +58 -233
  32. data/doc/pages/recipes.textile +19 -43
  33. data/doc/pages/settings_profiles.textile +39 -104
  34. data/doc/pages/testing.textile +41 -304
  35. data/doc/pages/troubleshooting.textile +29 -47
  36. data/doc/pages/whats_new.textile +66 -157
  37. data/doc/print.haml +0 -1
  38. data/doc/print.toc.yaml +1 -0
  39. data/doc/scripts/buildr-git.rb +1 -1
  40. data/doc/scripts/install-jruby.sh +1 -1
  41. data/doc/scripts/install-linux.sh +4 -4
  42. data/doc/site.toc.yaml +8 -5
  43. data/{KEYS → etc/KEYS} +0 -0
  44. data/etc/git-svn-authors +16 -0
  45. data/lib/buildr.rb +2 -13
  46. data/lib/buildr/core/application.rb +200 -95
  47. data/lib/buildr/core/application_cli.rb +6 -1
  48. data/lib/buildr/core/build.rb +140 -91
  49. data/lib/buildr/core/checks.rb +5 -5
  50. data/lib/buildr/core/common.rb +1 -1
  51. data/lib/buildr/core/compile.rb +14 -12
  52. data/lib/buildr/core/filter.rb +151 -46
  53. data/lib/buildr/core/generate.rb +9 -7
  54. data/lib/buildr/core/progressbar.rb +1 -1
  55. data/lib/buildr/core/project.rb +8 -7
  56. data/lib/buildr/core/test.rb +54 -29
  57. data/lib/buildr/core/transports.rb +25 -20
  58. data/lib/buildr/core/util.rb +80 -26
  59. data/lib/buildr/groovy.rb +18 -0
  60. data/lib/buildr/groovy/bdd.rb +105 -0
  61. data/lib/buildr/groovy/compiler.rb +138 -0
  62. data/lib/buildr/ide/eclipse.rb +102 -71
  63. data/lib/buildr/ide/idea.rb +7 -12
  64. data/lib/buildr/ide/idea7x.rb +20 -20
  65. data/lib/buildr/java.rb +4 -7
  66. data/lib/buildr/java/ant.rb +26 -5
  67. data/lib/buildr/java/bdd.rb +447 -0
  68. data/lib/buildr/java/commands.rb +8 -9
  69. data/lib/buildr/java/{compilers.rb → compiler.rb} +8 -90
  70. data/lib/buildr/java/jruby.rb +29 -11
  71. data/lib/buildr/java/jtestr_runner.rb.erb +114 -0
  72. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  73. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +4 -1
  74. data/lib/buildr/java/packaging.rb +23 -16
  75. data/lib/buildr/java/pom.rb +1 -1
  76. data/lib/buildr/java/rjb.rb +21 -8
  77. data/lib/buildr/java/test_result.rb +277 -0
  78. data/lib/buildr/java/{test_frameworks.rb → tests.rb} +121 -88
  79. data/lib/buildr/packaging/artifact.rb +12 -11
  80. data/lib/buildr/packaging/artifact_namespace.rb +7 -4
  81. data/lib/buildr/packaging/gems.rb +3 -3
  82. data/lib/buildr/packaging/zip.rb +13 -10
  83. data/lib/buildr/resources/buildr.icns +0 -0
  84. data/lib/buildr/scala.rb +19 -0
  85. data/lib/buildr/scala/compiler.rb +109 -0
  86. data/lib/buildr/scala/tests.rb +203 -0
  87. data/rakelib/apache.rake +31 -41
  88. data/rakelib/doc.rake +2 -2
  89. data/rakelib/package.rake +31 -2
  90. data/rakelib/rspec.rake +22 -20
  91. data/rakelib/rubyforge.rake +1 -0
  92. data/rakelib/setup.rake +34 -9
  93. data/spec/addon/cobertura_spec.rb +77 -0
  94. data/spec/addon/emma_spec.rb +120 -0
  95. data/spec/addon/test_coverage_spec.rb +249 -0
  96. data/spec/{application_spec.rb → core/application_spec.rb} +82 -4
  97. data/spec/{artifact_namespace_spec.rb → core/artifact_namespace_spec.rb} +12 -1
  98. data/spec/core/build_spec.rb +415 -0
  99. data/spec/{checks_spec.rb → core/checks_spec.rb} +1 -1
  100. data/spec/{common_spec.rb → core/common_spec.rb} +119 -30
  101. data/spec/{compile_spec.rb → core/compile_spec.rb} +17 -13
  102. data/spec/{project_spec.rb → core/project_spec.rb} +9 -6
  103. data/spec/{test_spec.rb → core/test_spec.rb} +226 -32
  104. data/spec/{transport_spec.rb → core/transport_spec.rb} +35 -23
  105. data/spec/groovy/bdd_spec.rb +80 -0
  106. data/spec/{groovy_compilers_spec.rb → groovy/compiler_spec.rb} +1 -1
  107. data/spec/ide/eclipse_spec.rb +243 -0
  108. data/spec/{java_spec.rb → java/ant.rb} +7 -17
  109. data/spec/java/bdd_spec.rb +358 -0
  110. data/spec/{java_compilers_spec.rb → java/compiler_spec.rb} +1 -1
  111. data/spec/java/java_spec.rb +88 -0
  112. data/spec/{java_packaging_spec.rb → java/packaging_spec.rb} +65 -4
  113. data/spec/{java_test_frameworks_spec.rb → java/tests_spec.rb} +50 -10
  114. data/spec/{archive_spec.rb → packaging/archive_spec.rb} +12 -2
  115. data/spec/{artifact_spec.rb → packaging/artifact_spec.rb} +10 -3
  116. data/spec/{packaging_helper.rb → packaging/packaging_helper.rb} +0 -0
  117. data/spec/{packaging_spec.rb → packaging/packaging_spec.rb} +1 -1
  118. data/spec/sandbox.rb +25 -4
  119. data/spec/{scala_compilers_spec.rb → scala/compiler_spec.rb} +1 -1
  120. data/spec/scala/tests_spec.rb +215 -0
  121. data/spec/spec_helpers.rb +38 -17
  122. metadata +119 -69
  123. data/lib/buildr/java/bdd_frameworks.rb +0 -265
  124. data/lib/buildr/java/groovyc.rb +0 -137
  125. data/spec/build_spec.rb +0 -193
  126. data/spec/java_bdd_frameworks_spec.rb +0 -238
  127. data/spec/spec.opts +0 -6
@@ -5,18 +5,14 @@ Common troubleshooting tips collected from the mailing list.
5
5
 
6
6
  h2. Running out of heap space
7
7
 
8
- You can give the JVM more heap space by setting the @JAVA_OPTS@ environment
9
- variables. This environment variable provides arguments for staring the JVM.
10
- For example, to set the heap space to 1GB:
8
+ You can give the JVM more heap space by setting the @JAVA_OPTS@ environment variables. This environment variable provides arguments for staring the JVM. For example, to set the heap space to 1GB:
11
9
 
12
10
  {{{!sh
13
11
  $ export "JAVA_OPTS=-Xms1g -Xmx1g"
14
12
  $ buildr compile
15
13
  }}}
16
14
 
17
- If you're sharing the build with other developers, you'll want to specify these
18
- options in the Buildfile itself. You can set the environment variable within
19
- the Buildfile, but make sure to do so at the very top of the Buildfile.
15
+ If you're sharing the build with other developers, you'll want to specify these options in the Buildfile itself. You can set the environment variable within the Buildfile, but make sure to do so at the very top of the Buildfile.
20
16
 
21
17
  For example:
22
18
 
@@ -27,13 +23,9 @@ ENV['JAVA_OPTS'] = '-Xms1g -Xmx1g'
27
23
 
28
24
  h2. RJB fails to compile
29
25
 
30
- On Linux, BSD and Cygwin, RJB locates the JDK headers files -- which it uses to
31
- compile a native C extension -- based on the @JAVA_HOME@ environment variable.
32
- Make sure @JAVA_HOME@ points to the JDK, not JRE.
26
+ On Linux, BSD and Cygwin, RJB locates the JDK headers files -- which it uses to compile a native C extension -- based on the @JAVA_HOME@ environment variable. Make sure @JAVA_HOME@ points to the JDK, not JRE.
33
27
 
34
- If you are using @sudo gem install@, note that some environments do not pass
35
- the @JAVA_HOME@ environment variable over to @sudo@. To get around this, run
36
- @gem@ with the @env JAVA_HOME=$JAVA_HOME@ option:
28
+ If you are using @sudo gem install@, note that some environments do not pass the @JAVA_HOME@ environment variable over to @sudo@. To get around this, run @gem@ with the @env JAVA_HOME=$JAVA_HOME@ option:
37
29
 
38
30
  {{{!sh
39
31
  $ sudo env JAVA_HOME=$JAVA_HOME gem install buildr
@@ -42,13 +34,9 @@ $ sudo env JAVA_HOME=$JAVA_HOME gem install buildr
42
34
 
43
35
  h2. Segmentation Fault when running Java code
44
36
 
45
- This is most likely a JVM inconsistency, for example, when part of the RJB
46
- library uses JDK 1.6, the other part uses JDK 1.5.
37
+ This is most likely a JVM inconsistency, for example, when part of the RJB library uses JDK 1.6, the other part uses JDK 1.5.
47
38
 
48
- During installation RJB builds a native C extension using header files supplied by
49
- the JVM, and compiles a Java bridge class using the Javac. It is possible for RJB
50
- to use two different versions of the JVM, for example, if @JAVA_HOME@ points to
51
- JDK 1.5, but @/usr/bin/javac@ points to JDK 1.6.
39
+ During installation RJB builds a native C extension using header files supplied by the JVM, and compiles a Java bridge class using the Javac. It is possible for RJB to use two different versions of the JVM, for example, if @JAVA_HOME@ points to JDK 1.5, but @/usr/bin/javac@ points to JDK 1.6.
52
40
 
53
41
  Make sure @JAVA_HOME@ and @/usr/bin/javac@ both point to the same JDK:
54
42
 
@@ -57,54 +45,34 @@ echo $JAVA_HOME
57
45
  ls -l /usr/bin/javac
58
46
  }}}
59
47
 
60
- *Note:* It seems that RJB works with Java 6, except when it doesn't, and for a
61
- few people it doesn't. In that case, either switch to Java 1.5, or simply run
62
- Buildr on JRuby using Java 6.
48
+ *Note:* It seems that RJB works with Java 6, except when it doesn't, and for a few people it doesn't. In that case, either switch to Java 1.5, or simply run Buildr on JRuby using Java 6.
63
49
 
64
50
 
65
51
  h2. Bugs resulting from a dangling comma or period
66
52
 
67
- Ruby statements don't need a delimiter and can span multiple lines, which can
68
- lead to bugs resulting from dangling commas and periods left at the end of the
69
- line. For example:
53
+ Ruby statements don't need a delimiter and can span multiple lines, which can lead to bugs resulting from dangling commas and periods left at the end of the line. For example:
70
54
 
71
55
  {{{!ruby
72
56
  compile.with 'org.apache.axis2:axis2:jar:1.2',
73
57
  test.with 'log4j:log4j:jar:1.1'
74
58
  }}}
75
59
 
76
- This is actually a single method call with two arguments, separated by a comma.
77
- The second argument is the result of calling @test.with@, and makes the test
78
- task a pre-requisite of the compile task, leading to a circular dependency.
60
+ This is actually a single method call with two arguments, separated by a comma. The second argument is the result of calling @test.with@, and makes the test task a pre-requisite of the compile task, leading to a circular dependency.
79
61
 
80
- As you can imagine this happens usually after editing, specifically for commas
81
- and periods which are small enough that you won't notice them from a cursory
82
- glance at the code, so if all else fails, search for lines that end with one of
83
- these characters.
62
+ As you can imagine this happens usually after editing, specifically for commas and periods which are small enough that you won't notice them from a cursory glance at the code, so if all else fails, search for lines that end with one of these characters.
84
63
 
85
64
 
86
65
  h2. Missing POM breaks transitive dependencies
87
66
 
88
- Occasionally, artifacts are deployed to remote repositories with missing or
89
- broken POMs. Buildr will fail when attempting to resolve transitive
90
- dependencies with broken or missing POMs.
67
+ Occasionally, artifacts are deployed to remote repositories with missing or broken POMs. Buildr will fail when attempting to resolve transitive dependencies with broken or missing POMs.
91
68
 
92
- In this particular case, failing is doing the right thing. There's no way for
93
- Buildr to tell whether the POM is nowhere to be found, or just a temporary
94
- problem accessing the remote server.
69
+ In this particular case, failing is doing the right thing. There's no way for Buildr to tell whether the POM is nowhere to be found, or just a temporary problem accessing the remote server.
95
70
 
96
- If you can determine that the POM file is missing you can work around the
97
- problem in three ways. If you published the artifact, make the release again,
98
- getting it to upload the missing files.
71
+ If you can determine that the POM file is missing you can work around the problem in three ways. If you published the artifact, make the release again, getting it to upload the missing files.
99
72
 
100
- If the source repository is not under your control, but you are also using your
101
- own repository for the project, you can always create a dummy POM in your own
102
- repository. Buildr will attempt to download the file from either repository,
103
- using the first file it finds.
73
+ If the source repository is not under your control, but you are also using your own repository for the project, you can always create a dummy POM in your own repository. Buildr will attempt to download the file from either repository, using the first file it finds.
104
74
 
105
- Alternatively, you can make Buildr create a dummy POM file in the local
106
- repository, instead of downloading it from a remote repository. This example
107
- creates a dummy POM for Axis JAX-RPC:
75
+ Alternatively, you can make Buildr create a dummy POM file in the local repository, instead of downloading it from a remote repository. This example creates a dummy POM for Axis JAX-RPC:
108
76
 
109
77
  {{{!ruby
110
78
  artifact 'axis:axis-jaxrpc:pom:1.3' do |task|
@@ -119,3 +87,17 @@ artifact 'axis:axis-jaxrpc:pom:1.3' do |task|
119
87
  end
120
88
  }}}
121
89
 
90
+
91
+ h2. Buildr fails to run after install with a "stack level too deep (SystemStackError)" error
92
+
93
+ A particular quirk of an existing Ruby setup can cause problems when running Buildr. If a system already has several Ruby directories that are in the @PATH@, it is often nice (appropriate?) to have them in @RUBYLIB@ as well (to be able to require them). If there are several of them a user may decide that @RUBYLIB=$PATH@ is a good way to handle this (or some less automated method that has the same effect).
94
+
95
+ The culprit is having the Gem's binary directory show up in @RUBYLIB@. For example, Buildr's @bin/buildr@ includes this line:
96
+
97
+ {{{!sh
98
+ require 'buildr'
99
+ }}}
100
+
101
+ Under normal circumstances, this tells RubyGems to load @buildr.rb@ from the Gem's library directory. When @RUBYLIB@ points to the Gem's @bin@ directory, it ends up loading itself repeatedly.
102
+
103
+ To solve this, remove Buildr's @bin@ directory from @RUBYLIB@. Removing all directories that you don't actually need is better (other Gems may have the same problem).
@@ -1,100 +1,78 @@
1
1
  h1. What's New
2
2
 
3
+ h2. Buildr 1.3.2
4
+
5
+ * New @--prereqs@ command line argument lists all the tasks and their dependencies. You can also filter specific tasks by following with a regular expression, for example, @--prereqs foo@.
6
+ * Upgraded to latest release of Net::SSH, Net::SFTP, RubyForge and RubyGems.
7
+ * Upgraded to JUnit 4.4 and fixed case where abstract classes extending TestCase would lead to tests failing.
8
+ * The target/test/class and /resources directories now come first in the classpath, ahead of any code compiled code and resources copied over from src/main.
9
+ * Fixed: BUILDR-90 Installing from source doesn't work with JRuby.
10
+ * Fixed: BUILDR-91 When doing a release, buildr should spawn the same version of buildr
11
+ * Fixed: BUILDR-92 IDEA 7x: add resources directories to classpath.
12
+ * Fixed: BUILDR-95: Only download Scala test framework artifacts when required
13
+ * Fixed: BUILDR-100 Directory structure documentation needs updating.
14
+ * Fixed: Installation instructions updated for RubyGems 1.2.0.
15
+
3
16
  h2. Buildr 1.3.1
4
17
 
5
18
  * Fixed to specific Gem dependencies, so should install cleanly on Windows.
6
- * Buildr now supports publishing files to HTTP server for remote repositories
7
- that support HTTP uploads (PUT).
8
- * Buildr now supports reading files from SFTP server and upgrades to
9
- Net::SSH 2.0 and Net::SFTP 2.0.
19
+ * Buildr now supports publishing files to HTTP server for remote repositories that support HTTP uploads (PUT).
20
+ * Buildr now supports reading files from SFTP server and upgrades to Net::SSH 2.0 and Net::SFTP 2.0.
10
21
  * HTTP downloads now accept URLs with query parameters (Tommy Knowlton).
11
- * On OS X if you are not using the default JDK, you can set the JAVA_HOME
12
- environment variable to point to any other JDK (Nathan Hamblen).
13
- * JUnit properly passes options[:environment] as environment variables to the
14
- test case. In addition options[:java_args] are now passed as arguments to
15
- the JVM, for example to set heap size, only applicable when forking (the
16
- default mode when running JUnit).
17
- * Fixed BUILDR-75: Filter now runs if there's a target directory, even if
18
- there are no source files to copy over, and creates an empty target
19
- directory. The previous behavior caused some problems with code that checked
20
- if resource.target was nil, but didn't check if there are any
21
- resource.sources to process.
22
- * Added the jibx_bind method to use JiBX for Java<=>XML binding (by David
23
- Peterson).
22
+ * On OS X if you are not using the default JDK, you can set the JAVA_HOME environment variable to point to any other JDK (Nathan Hamblen).
23
+ * JUnit properly passes options[:environment] as environment variables to the test case. In addition options[:java_args] are now passed as arguments to the JVM, for example to set heap size, only applicable when forking (the default mode when running JUnit).
24
+ * Fixed BUILDR-75: Filter now runs if there's a target directory, even if there are no source files to copy over, and creates an empty target directory. The previous behavior caused some problems with code that checked if resource.target was nil, but didn't check if there are any resource.sources to process.
25
+ * Added the jibx_bind method to use JiBX for Java<=>XML binding (by David Peterson).
24
26
 
25
27
 
26
28
  h2. Buildr 1.3
27
29
 
28
30
  h3. Multiple Languages
29
31
 
30
- The main focus of this release is supporting multiple languages for compiling
31
- and testing.
32
+ The main focus of this release is supporting multiple languages for compiling and testing.
32
33
 
33
- For each project, Buildr will attempt to infer which compiler to use based on
34
- the source files it finds, for example, if it finds @.java@ files in the
35
- @src/main/java@ directory, it will switch to the javac compiler, if it finds
36
- @.scala@ files in the @src/main/scala@ directory, to the scalac compiler and so
37
- forth.
34
+ For each project, Buildr will attempt to infer which compiler to use based on the source files it finds, for example, if it finds @.java@ files in the @src/main/java@ directory, it will switch to the javac compiler, if it finds @.scala@ files in the @src/main/scala@ directory, to the scalac compiler and so forth.
38
35
 
39
- Different compilers may use different target directory, @target/classes@ is
40
- picked for JVM compilers (Java, Scala, Groovy, etc), so resources are not copied to
41
- their own directory, @target/resources@. The prepare task has been removed.
36
+ Different compilers may use different target directory, @target/classes@ is picked for JVM compilers (Java, Scala, Groovy, etc), so resources are not copied to their own directory, @target/resources@. The prepare task has been removed.
42
37
 
43
- Not all languages have classpaths, so @compile.classpath@ is now known as
44
- @compile.dependencies@, but the old attribute still exists for backward
45
- compatibility.
38
+ Not all languages have classpaths, so @compile.classpath@ is now known as @compile.dependencies@, but the old attribute still exists for backward compatibility.
46
39
 
47
- Also, for consistency, the test target directories have changed to
48
- @target/test/classes@ and @target/test/resources@, respectively.
40
+ Also, for consistency, the test target directories have changed to @target/test/classes@ and @target/test/resources@, respectively.
49
41
 
50
- Speaking of tests, you can compile code in one language and use a different
51
- language to test it, say, if you're interested in compiling Java code and
52
- testing it with Ruby, or compiling Flash and running a Java test suite.
42
+ Speaking of tests, you can compile code in one language and use a different language to test it, say, if you're interested in compiling Java code and testing it with Ruby, or compiling Flash and running a Java test suite.
53
43
 
54
- As before, you can pick the test framework by calling
55
- @test.using(<framework>)@. Buildr will attempt to pick one by default, for
56
- example, if the tests are written in Java, it will default to JUnit.
44
+ As before, you can pick the test framework by calling @test.using(<framework>)@. Buildr will attempt to pick one by default, for example, if the tests are written in Java, it will default to JUnit.
57
45
 
58
- And, since not all languages package to JARs, the default packaging is either
59
- inferred from the compiler (so @:jar@ when compiling Java code), otherwise to
60
- @:zip@. All this defaulting means that @package()@ with no arguments does the
61
- right thing in more cases, and most probably won't break anyone's buildfiles.
46
+ And, since not all languages package to JARs, the default packaging is either inferred from the compiler (so @:jar@ when compiling Java code), otherwise to @:zip@. All this defaulting means that @package()@ with no arguments does the right thing in more cases, and most probably won't break anyone's buildfiles.
62
47
 
63
- I've tried to keep the compiler API as simple as possible, making it easy to
64
- add new compilers; however, I had to change the test framework API to
65
- accommodate the new features, so old test frameworks will not work on 1.3.
48
+ I've tried to keep the compiler API as simple as possible, making it easy to add new compilers; however, I had to change the test framework API to accommodate the new features, so old test frameworks will not work on 1.3.
66
49
 
67
50
 
68
51
  h3. Scala Support
69
52
 
70
- Buildr now supports Scala, using both native and fast Scala compiler.
53
+ Buildr now supports "Scala":http://www.scala-lang.org/, using both native and fast Scala compiler.
71
54
 
72
- Read more about "using Scala":building.html#compiling_scala.
55
+ Read more about "using Scala":languages.html#scala.
73
56
 
74
57
 
75
58
  h3. Groovy Support
76
59
 
77
60
  Buildr now supports Groovy, using the Groovyc Ant task.
78
61
 
79
- Read more about "using Groovy":building.html#compiling_groovy.
62
+ Read more about "using Groovy":languages.html#groovy.
80
63
 
81
64
 
82
65
  h3. Packaging Files
83
66
 
84
- The @package@ method is convenient enough that you can now use it to generate
85
- artifacts, an in addition to generate regular file tasks, specifying the file
86
- name using the @:file@ attribute. For example:
67
+ The @package@ method is convenient enough that you can now use it to generate artifacts, an in addition to generate regular file tasks, specifying the file name using the @:file@ attribute. For example:
87
68
 
88
69
  {{{!ruby
89
70
  package :zip, :file=>_('target/interesting.zip')
90
71
  }}}
91
72
 
92
- Since this package is not an artifact and does not have a specification, it
93
- will not automatically install itself in the local repository or upload to a
94
- remote repository. For these, use the @package@ method as before.
73
+ Since this package is not an artifact and does not have a specification, it will not automatically install itself in the local repository or upload to a remote repository. For these, use the @package@ method as before.
95
74
 
96
- Read more about "the package
97
- method":packaging.html#specifying_and_referencing_packages.
75
+ Read more about "the package method":packaging.html#specifying_and_referencing_packages.
98
76
 
99
77
 
100
78
  h3. Packaging EARs
@@ -114,44 +92,29 @@ package(:ear) << project('coolWebService').package(:war)
114
92
  package(:ear).add project('commonLib') # By default, the JAR package
115
93
  }}}
116
94
 
117
- EAR packages include an @application.xml@ file in the @META-INF@ directory that
118
- describes the application and its component. This file is created for you
119
- during packaging, by referencing all the components added to the EAR. There
120
- are a couple of things you will typically want to change.
95
+ EAR packages include an @application.xml@ file in the @META-INF@ directory that describes the application and its component. This file is created for you during packaging, by referencing all the components added to the EAR. There are a couple of things you will typically want to change.
121
96
 
122
- * *display-name* -- The application's display name defaults to the project's
123
- identifier. You can change that by setting the @display_name@ attribute.
97
+ * *display-name* -- The application's display name defaults to the project's identifier. You can change that by setting the @display_name@ attribute.
124
98
 
125
- * *context-root* -- WAR components specify a context root, based on the package
126
- identifier, for example, "cool-web-1.0.war" will have the context root
127
- "cool-web". To specify a different context root, add the WAR package with the
128
- @context_root@ option.
99
+ * *context-root* -- WAR components specify a context root, based on the package identifier, for example, "cool-web-1.0.war" will have the context root "cool-web". To specify a different context root, add the WAR package with the @context_root@ option.
129
100
 
130
101
  "Read more ...":packaging.html#packaging_ears
131
102
 
132
103
 
133
104
  h3. JRuby Support
134
105
 
135
- We now offer two versions of Buildr, one for Ruby and one for JRuby. They're
136
- exactly the same, except the Ruby version will also install RJB (Ruby Java
137
- Bridge), the JRuby version obviously can do well without it.
106
+ We now offer two versions of Buildr, one for Ruby and one for JRuby. They're exactly the same, except the Ruby version will also install RJB (Ruby Java Bridge), the JRuby version obviously can do well without it.
138
107
 
139
108
  "Read more ...":download.html#jruby
140
109
 
141
- Buildr provides a "Nailgun":http://www.martiansoftware.com/nailgun/index.html
142
- server when running on JRuby. Using the integrated BuildrServer allows for
143
- faster task execution and avoid frequent JVM startup overhead.
110
+ Buildr provides a "Nailgun":http://www.martiansoftware.com/nailgun/index.html server when running on JRuby. Using the integrated BuildrServer allows for faster task execution and avoid frequent JVM startup overhead.
144
111
 
145
112
  "Read more ...":more_stuff.html#nailgun
146
113
 
147
114
 
148
115
  h3. Behaviour-Driven Development
149
116
 
150
- Given that many languages are now supported by Buildr, the same is true for
151
- testing, the convention is to store BDD files under the @src/spec/{lang}@
152
- directory.
153
- The following table shows the framework's name you can use to select them
154
- for your projects. Buildr follows each framework's naming convention.
117
+ Given that many languages are now supported by Buildr, the same is true for testing, the convention is to store BDD files under the @src/spec/{lang}@ directory. The following table shows the framework's name you can use to select them for your projects. Buildr follows each framework's naming convention.
155
118
 
156
119
  |_. test.using |_. Test file name convention |
157
120
  | @:jbehave@ | @src/spec/java/**/*Behaviour.java@ |
@@ -163,12 +126,9 @@ for your projects. Buildr follows each framework's naming convention.
163
126
 
164
127
  h3. Profiles
165
128
 
166
- Different environments may require different configurations, some you will want
167
- to control with code, others you will want to specify in the profiles file.
129
+ Different environments may require different configurations, some you will want to control with code, others you will want to specify in the profiles file.
168
130
 
169
- The profiles file is a YAML file called @profiles.yaml@ that you place in the
170
- same directory as the Buildfile. We selected YAML because it's easier to read
171
- and edit than XML.
131
+ The profiles file is a YAML file called @profiles.yaml@ that you place in the same directory as the Buildfile. We selected YAML because it's easier to read and edit than XML.
172
132
 
173
133
  For example, to support three different database configurations, we could write:
174
134
 
@@ -189,20 +149,16 @@ production:
189
149
  jdbc: oracle:thin:@bigstrong:1521:mighty
190
150
  }}}
191
151
 
192
- You can also use profiles to specify default filters for the "@resources@
193
- task":building.html#resources.
152
+ You can also use profiles to specify default filters for the "@resources@ task":building.html#resources.
194
153
 
195
154
  "Read more ...":settings_profiles.html#profiles
196
155
 
197
156
 
198
157
  h3. Settings and build YAML files
199
158
 
200
- In addition to profiles, we also allow you to specify personal and build
201
- settings using two YAML files.
159
+ In addition to profiles, we also allow you to specify personal and build settings using two YAML files.
202
160
 
203
- Personal settings are placed in the @.buildr/settings.yaml@ file under your
204
- home directory. Settings stored there will be applied the same across all
205
- builds.
161
+ Personal settings are placed in the @.buildr/settings.yaml@ file under your home directory. Settings stored there will be applied the same across all builds.
206
162
 
207
163
  For example:
208
164
 
@@ -228,10 +184,7 @@ im:
228
184
 
229
185
  "Read more ...":settings_profiles.html#personal_settings
230
186
 
231
- Build settings are placed in the @build.yaml@ file located in the same
232
- directory that the @buildfile@. Normally this file would be managed by the
233
- project revision control system, so settings here are shared between
234
- developers.
187
+ Build settings are placed in the @build.yaml@ file located in the same directory that the @buildfile@. Normally this file would be managed by the project revision control system, so settings here are shared between developers.
235
188
 
236
189
  For example:
237
190
 
@@ -261,23 +214,11 @@ jira:
261
214
 
262
215
  h3. Using Gems for extensions and 3rd party libraries
263
216
 
264
- "RubyGems":http://rubygems.rubyforge.org provides the @gem@ command line tool
265
- that you can use to search, install, upgrade, package and distribute gems. It
266
- installs all gems into a local repository that is shared across your builds and
267
- all other Ruby applications you may have running. You can install a gem from a
268
- local file, or download and install it from any number of remote repositories.
217
+ "RubyGems":http://rubygems.rubyforge.org provides the @gem@ command line tool that you can use to search, install, upgrade, package and distribute gems. It installs all gems into a local repository that is shared across your builds and all other Ruby applications you may have running. You can install a gem from a local file, or download and install it from any number of remote repositories.
269
218
 
270
- If your build depends on other gems, you will want to specify these
271
- dependencies as part of your build and check that configuration into source
272
- control. That way you can have a specific environment that will guarantee
273
- repeatable builds, whether you're building a particular version, moving between
274
- branches, or joining an existing project. Buildr will take care of installing
275
- all the necessary dependencies, which you can then manage with the @gem@
276
- command.
219
+ If your build depends on other gems, you will want to specify these dependencies as part of your build and check that configuration into source control. That way you can have a specific environment that will guarantee repeatable builds, whether you're building a particular version, moving between branches, or joining an existing project. Buildr will take care of installing all the necessary dependencies, which you can then manage with the @gem@ command.
277
220
 
278
- Use the @build.yaml@ file to specify these dependencies (see "Build
279
- Settings":settings_profiles.html#build_settings for more information), for
280
- example:
221
+ Use the @build.yaml@ file to specify these dependencies (see "Build Settings":settings_profiles.html#build_settings for more information), for example:
281
222
 
282
223
  {{{!yaml
283
224
  # This project requires the following gems
@@ -305,9 +246,7 @@ Java.java.lang.String.isInstance(str)
305
246
  Java.com.sun.tools.javac.Main.compile(args)
306
247
  }}}
307
248
 
308
- The @classpath@ attribute allows Buildr to add JARs and directories to the
309
- classpath, for example, we use it to load Ant and various Ant tasks, code
310
- generators, test frameworks, and so forth.
249
+ The @classpath@ attribute allows Buildr to add JARs and directories to the classpath, for example, we use it to load Ant and various Ant tasks, code generators, test frameworks, and so forth.
311
250
 
312
251
  For example, Ant is loaded as follows:
313
252
 
@@ -315,21 +254,14 @@ For example, Ant is loaded as follows:
315
254
  Java.classpath << 'org.apache.ant:ant:jar:1.7.0'
316
255
  }}}
317
256
 
318
- Artifacts can only be downloaded after the Buildfile has loaded, giving it a
319
- chance to specify which remote repositories to use, so adding to classpath does
320
- not by itself load any libraries. You must call @Java.load@ before accessing any
321
- Java classes to give Buildr a chance to load the libraries specified in the
322
- classpath.
257
+ Artifacts can only be downloaded after the Buildfile has loaded, giving it a chance to specify which remote repositories to use, so adding to classpath does not by itself load any libraries. You must call @Java.load@ before accessing any Java classes to give Buildr a chance to load the libraries specified in the classpath.
323
258
 
324
259
  "Read more ...":more_stuff.html#using_java_libraries
325
260
 
326
261
 
327
262
  h3. Creating Extensions
328
263
 
329
- A module defines instance methods that are then mixed into the project and
330
- become instance methods of the project. There are two general ways for
331
- extending projects. You can extend all projects by including the module in
332
- Project:
264
+ 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:
333
265
 
334
266
  {{{!ruby
335
267
  class Project
@@ -337,8 +269,7 @@ class Project
337
269
  end
338
270
  }}}
339
271
 
340
- You can also extend a given project instance and only that instance by
341
- extending it with the module:
272
+ You can also extend a given project instance and only that instance by extending it with the module:
342
273
 
343
274
  {{{!ruby
344
275
  define 'foo' do
@@ -346,57 +277,35 @@ define 'foo' do
346
277
  end
347
278
  }}}
348
279
 
349
- Some extensions require tighter integration with the project, specifically for
350
- setting up tasks and properties, or for configuring tasks based on the project
351
- definition. You can do that by adding callbacks to the process.
280
+ 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.
352
281
 
353
282
  "Read more ...":extending.html#creating_extensions
354
283
 
355
284
 
356
285
  h3. Using Alternative Layouts
357
286
 
358
- Buildr follows a common convention for project layouts: Java source files
359
- appear in @src/main/java@ and compile to @target/classes@, resources are
360
- copied over from @src/main/resources@ and so forth. Not all projects follow
361
- this convention, so it's now possible to specify an alternative project
362
- layout.
287
+ Buildr follows a common convention for project layouts: Java source files appear in @src/main/java@ and compile to @target/classes@, resources are copied over from @src/main/resources@ and so forth. Not all projects follow this convention, so it's now possible to specify an alternative project layout.
363
288
 
364
- A layout is an object that implements the @expand@ method. The easiest way to
365
- define a custom layout is to create a new @Layout@ object and specify mapping
366
- between names used by Buildr and actual paths within the project.
289
+ 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.
367
290
 
368
291
  "Read more ...":extending.html#using_alternative_layouts
369
292
 
370
293
 
371
294
  h3. Other
372
295
 
373
- * Buildr 1.3 upgrades to Rake 0.8, RSpec 1.1, RJB 1.1 and OpenJPA
374
- 1.0.1. Buildr no longer includes or uses Facets.
375
- * JUnit tests now operate on all compiled test classes that extend
376
- @junit.framework.TestCase@ or use the @Test@ annotation; TestNG test cases are
377
- filtered by annotation. Test cases no longer have to use a specific file name.
296
+ * Buildr 1.3 upgrades to Rake 0.8, RSpec 1.1, RJB 1.1 and OpenJPA 1.0.1. Buildr no longer includes or uses Facets.
297
+ * JUnit tests now operate on all compiled test classes that extend @junit.framework.TestCase@ or use the @Test@ annotation; TestNG test cases are filtered by annotation. Test cases no longer have to use a specific file name.
378
298
  * Remote repositories now support HTTP Basic Authentication.
379
- * The prepare task has been removed, if you need to, simply add a prerequisite
380
- to the compile task.
299
+ * The prepare task has been removed, if you need to, simply add a prerequisite to the compile task.
381
300
 
382
301
 
383
302
  h3. Documentation
384
303
 
385
- * The "What's new?":whats_new.html page (this one, actually), summarizes all
386
- the important new features and changes in each release.
387
- * The "Recipes":recipes.html page (also available in the PDF) lists recipes for
388
- using Buildr, collected from the mailing list. Feel free to contribute tips,
389
- tricks and techniques.
390
- * The "Troubleshooting":troubleshooting.html page (also available in the PDF)
391
- collects troubleshooting ideas from the mailing list.
392
- * The "Getting Started":getting_started.html has been rewritten to cover all
393
- you need to know about downloading and installing Buildr on Linux, OS/X,
394
- Windows and with JRuby (1.1 or later).
395
- * A new "Contributing":contributing.html page has more details on how to file
396
- bugs, policy for submitting patches, running Buildr test cases, and helping
397
- with the documentation.
304
+ * The "What's new?":whats_new.html page (this one, actually), summarizes all the important new features and changes in each release.
305
+ * The "Recipes":recipes.html page (also available in the PDF) lists recipes for using Buildr, collected from the mailing list. Feel free to contribute tips, tricks and techniques.
306
+ * The "Troubleshooting":troubleshooting.html page (also available in the PDF) collects troubleshooting ideas from the mailing list.
307
+ * The "Getting Started":getting_started.html has been rewritten to cover all you need to know about downloading and installing Buildr on Linux, OS X, Windows and with JRuby (1.1 or later).
308
+ * A new "Contributing":contributing.html page has more details on how to file bugs, policy for submitting patches, running Buildr test cases, and helping with the documentation.
398
309
  * A new page for "Settings and Profiles":settings_profiles.html.
399
- * The "Extending Buildr":extending.html page that deals with writing your own
400
- tasks, creating extensions and specifying alternative layouts.
401
- * The site also includes "RSpec report":specs.html which provides the official
402
- specification against which we test each release.
310
+ * The "Extending Buildr":extending.html page that deals with writing your own tasks, creating extensions and specifying alternative layouts.
311
+ * The site also includes "RSpec report":specs.html which provides the official specification against which we test each release.