buildr-gemjar 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. data/.braids +8 -0
  2. data/.gitignore +5 -0
  3. data/.rvmrc +1 -0
  4. data/CHANGELOG.md +4 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +20 -0
  7. data/README.md +98 -0
  8. data/Rakefile +8 -0
  9. data/buildr-gemjar.gemspec +42 -0
  10. data/lib/buildr-gemjar.rb +162 -0
  11. data/lib/buildr-gemjar/version.rb +3 -0
  12. data/meta.rakefile +30 -0
  13. data/spec/buildr-gemjar/version_spec.rb +11 -0
  14. data/spec/buildr-gemjar_spec.rb +179 -0
  15. data/spec/repo_builder.rb +59 -0
  16. data/spec/spec_helper.rb +44 -0
  17. data/vendor/buildr/.gitignore +17 -0
  18. data/vendor/buildr/CHANGELOG +1283 -0
  19. data/vendor/buildr/Gemfile +4 -0
  20. data/vendor/buildr/LICENSE +176 -0
  21. data/vendor/buildr/NOTICE +26 -0
  22. data/vendor/buildr/README.rdoc +134 -0
  23. data/vendor/buildr/Rakefile +44 -0
  24. data/vendor/buildr/_buildr +35 -0
  25. data/vendor/buildr/_jbuildr +35 -0
  26. data/vendor/buildr/addon/buildr/antlr.rb +65 -0
  27. data/vendor/buildr/addon/buildr/bnd.rb +147 -0
  28. data/vendor/buildr/addon/buildr/cobertura.rb +22 -0
  29. data/vendor/buildr/addon/buildr/drb.rb +281 -0
  30. data/vendor/buildr/addon/buildr/emma.rb +22 -0
  31. data/vendor/buildr/addon/buildr/hibernate.rb +149 -0
  32. data/vendor/buildr/addon/buildr/javacc.rb +85 -0
  33. data/vendor/buildr/addon/buildr/jaxb_xjc.rb +72 -0
  34. data/vendor/buildr/addon/buildr/jdepend.rb +60 -0
  35. data/vendor/buildr/addon/buildr/jetty.rb +248 -0
  36. data/vendor/buildr/addon/buildr/jibx.rb +86 -0
  37. data/vendor/buildr/addon/buildr/nailgun.rb +221 -0
  38. data/vendor/buildr/addon/buildr/openjpa.rb +88 -0
  39. data/vendor/buildr/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
  40. data/vendor/buildr/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
  41. data/vendor/buildr/addon/buildr/org/apache/buildr/BuildrNail.java +41 -0
  42. data/vendor/buildr/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
  43. data/vendor/buildr/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
  44. data/vendor/buildr/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
  45. data/vendor/buildr/addon/buildr/org/apache/buildr/JettyWrapper.java +144 -0
  46. data/vendor/buildr/addon/buildr/protobuf.rb +88 -0
  47. data/vendor/buildr/addon/buildr/xmlbeans.rb +93 -0
  48. data/vendor/buildr/all-in-one/_buildr +19 -0
  49. data/vendor/buildr/all-in-one/buildr +368 -0
  50. data/vendor/buildr/all-in-one/buildr.cmd +1 -0
  51. data/vendor/buildr/bin/buildr +19 -0
  52. data/vendor/buildr/buildr.buildfile +58 -0
  53. data/vendor/buildr/buildr.gemspec +74 -0
  54. data/vendor/buildr/doc/_config.yml +1 -0
  55. data/vendor/buildr/doc/_layouts/default.html +90 -0
  56. data/vendor/buildr/doc/_layouts/preface.html +22 -0
  57. data/vendor/buildr/doc/artifacts.textile +217 -0
  58. data/vendor/buildr/doc/building.textile +276 -0
  59. data/vendor/buildr/doc/contributing.textile +268 -0
  60. data/vendor/buildr/doc/css/default.css +236 -0
  61. data/vendor/buildr/doc/css/print.css +101 -0
  62. data/vendor/buildr/doc/css/syntax.css +23 -0
  63. data/vendor/buildr/doc/download.textile +138 -0
  64. data/vendor/buildr/doc/extending.textile +212 -0
  65. data/vendor/buildr/doc/images/1442160941-frontcover.jpg +0 -0
  66. data/vendor/buildr/doc/images/asf-logo.gif +0 -0
  67. data/vendor/buildr/doc/images/asf-logo.png +0 -0
  68. data/vendor/buildr/doc/images/buildr-hires.png +0 -0
  69. data/vendor/buildr/doc/images/buildr.png +0 -0
  70. data/vendor/buildr/doc/images/favicon.png +0 -0
  71. data/vendor/buildr/doc/images/growl-icon.tiff +0 -0
  72. data/vendor/buildr/doc/images/note.png +0 -0
  73. data/vendor/buildr/doc/images/project-structure.png +0 -0
  74. data/vendor/buildr/doc/images/tip.png +0 -0
  75. data/vendor/buildr/doc/images/zbuildr.png +0 -0
  76. data/vendor/buildr/doc/images/zbuildr.tif +0 -0
  77. data/vendor/buildr/doc/index.textile +69 -0
  78. data/vendor/buildr/doc/installing.textile +284 -0
  79. data/vendor/buildr/doc/languages.textile +599 -0
  80. data/vendor/buildr/doc/mailing_lists.textile +29 -0
  81. data/vendor/buildr/doc/more_stuff.textile +845 -0
  82. data/vendor/buildr/doc/packaging.textile +618 -0
  83. data/vendor/buildr/doc/preface.textile +54 -0
  84. data/vendor/buildr/doc/projects.textile +276 -0
  85. data/vendor/buildr/doc/quick_start.textile +210 -0
  86. data/vendor/buildr/doc/releasing.textile +117 -0
  87. data/vendor/buildr/doc/scripts/buildr-git.rb +512 -0
  88. data/vendor/buildr/doc/scripts/gitflow.rb +296 -0
  89. data/vendor/buildr/doc/scripts/install-jruby.sh +44 -0
  90. data/vendor/buildr/doc/scripts/install-linux.sh +73 -0
  91. data/vendor/buildr/doc/scripts/install-osx.sh +52 -0
  92. data/vendor/buildr/doc/settings_profiles.textile +287 -0
  93. data/vendor/buildr/doc/testing.textile +247 -0
  94. data/vendor/buildr/etc/KEYS +189 -0
  95. data/vendor/buildr/lib/buildr.rb +44 -0
  96. data/vendor/buildr/lib/buildr/clojure.rb +34 -0
  97. data/vendor/buildr/lib/buildr/clojure/shell.rb +52 -0
  98. data/vendor/buildr/lib/buildr/core.rb +34 -0
  99. data/vendor/buildr/lib/buildr/core/application.rb +700 -0
  100. data/vendor/buildr/lib/buildr/core/build.rb +516 -0
  101. data/vendor/buildr/lib/buildr/core/cc.rb +166 -0
  102. data/vendor/buildr/lib/buildr/core/checks.rb +253 -0
  103. data/vendor/buildr/lib/buildr/core/common.rb +151 -0
  104. data/vendor/buildr/lib/buildr/core/compile.rb +622 -0
  105. data/vendor/buildr/lib/buildr/core/doc.rb +276 -0
  106. data/vendor/buildr/lib/buildr/core/environment.rb +129 -0
  107. data/vendor/buildr/lib/buildr/core/filter.rb +404 -0
  108. data/vendor/buildr/lib/buildr/core/generate.rb +197 -0
  109. data/vendor/buildr/lib/buildr/core/help.rb +119 -0
  110. data/vendor/buildr/lib/buildr/core/jrebel.rb +42 -0
  111. data/vendor/buildr/lib/buildr/core/linux.rb +30 -0
  112. data/vendor/buildr/lib/buildr/core/osx.rb +46 -0
  113. data/vendor/buildr/lib/buildr/core/progressbar.rb +161 -0
  114. data/vendor/buildr/lib/buildr/core/project.rb +975 -0
  115. data/vendor/buildr/lib/buildr/core/run.rb +43 -0
  116. data/vendor/buildr/lib/buildr/core/shell.rb +137 -0
  117. data/vendor/buildr/lib/buildr/core/test.rb +843 -0
  118. data/vendor/buildr/lib/buildr/core/transports.rb +565 -0
  119. data/vendor/buildr/lib/buildr/core/util.rb +537 -0
  120. data/vendor/buildr/lib/buildr/groovy.rb +20 -0
  121. data/vendor/buildr/lib/buildr/groovy/bdd.rb +106 -0
  122. data/vendor/buildr/lib/buildr/groovy/compiler.rb +153 -0
  123. data/vendor/buildr/lib/buildr/groovy/doc.rb +76 -0
  124. data/vendor/buildr/lib/buildr/groovy/shell.rb +57 -0
  125. data/vendor/buildr/lib/buildr/ide.rb +19 -0
  126. data/vendor/buildr/lib/buildr/ide/eclipse.rb +427 -0
  127. data/vendor/buildr/lib/buildr/ide/eclipse/java.rb +53 -0
  128. data/vendor/buildr/lib/buildr/ide/eclipse/plugin.rb +71 -0
  129. data/vendor/buildr/lib/buildr/ide/eclipse/scala.rb +68 -0
  130. data/vendor/buildr/lib/buildr/ide/idea.rb +576 -0
  131. data/vendor/buildr/lib/buildr/java.rb +25 -0
  132. data/vendor/buildr/lib/buildr/java/ant.rb +94 -0
  133. data/vendor/buildr/lib/buildr/java/bdd.rb +460 -0
  134. data/vendor/buildr/lib/buildr/java/cobertura.rb +297 -0
  135. data/vendor/buildr/lib/buildr/java/commands.rb +223 -0
  136. data/vendor/buildr/lib/buildr/java/compiler.rb +135 -0
  137. data/vendor/buildr/lib/buildr/java/deprecated.rb +141 -0
  138. data/vendor/buildr/lib/buildr/java/doc.rb +86 -0
  139. data/vendor/buildr/lib/buildr/java/ecj.rb +69 -0
  140. data/vendor/buildr/lib/buildr/java/emma.rb +244 -0
  141. data/vendor/buildr/lib/buildr/java/external.rb +73 -0
  142. data/vendor/buildr/lib/buildr/java/jruby.rb +122 -0
  143. data/vendor/buildr/lib/buildr/java/jtestr_result.rb +295 -0
  144. data/vendor/buildr/lib/buildr/java/jtestr_runner.rb.erb +116 -0
  145. data/vendor/buildr/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  146. data/vendor/buildr/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +142 -0
  147. data/vendor/buildr/lib/buildr/java/packaging.rb +734 -0
  148. data/vendor/buildr/lib/buildr/java/pom.rb +178 -0
  149. data/vendor/buildr/lib/buildr/java/rjb.rb +154 -0
  150. data/vendor/buildr/lib/buildr/java/test_result.rb +101 -0
  151. data/vendor/buildr/lib/buildr/java/tests.rb +362 -0
  152. data/vendor/buildr/lib/buildr/java/version_requirement.rb +172 -0
  153. data/vendor/buildr/lib/buildr/packaging.rb +25 -0
  154. data/vendor/buildr/lib/buildr/packaging/archive.rb +535 -0
  155. data/vendor/buildr/lib/buildr/packaging/artifact.rb +903 -0
  156. data/vendor/buildr/lib/buildr/packaging/artifact_namespace.rb +984 -0
  157. data/vendor/buildr/lib/buildr/packaging/artifact_search.rb +140 -0
  158. data/vendor/buildr/lib/buildr/packaging/gems.rb +105 -0
  159. data/vendor/buildr/lib/buildr/packaging/package.rb +249 -0
  160. data/vendor/buildr/lib/buildr/packaging/tar.rb +189 -0
  161. data/vendor/buildr/lib/buildr/packaging/version_requirement.rb +192 -0
  162. data/vendor/buildr/lib/buildr/packaging/zip.rb +178 -0
  163. data/vendor/buildr/lib/buildr/packaging/ziptask.rb +356 -0
  164. data/vendor/buildr/lib/buildr/resources/buildr.icns +0 -0
  165. data/vendor/buildr/lib/buildr/resources/completed.png +0 -0
  166. data/vendor/buildr/lib/buildr/resources/failed.png +0 -0
  167. data/vendor/buildr/lib/buildr/resources/icons-license.txt +17 -0
  168. data/vendor/buildr/lib/buildr/run.rb +195 -0
  169. data/vendor/buildr/lib/buildr/scala.rb +26 -0
  170. data/vendor/buildr/lib/buildr/scala/bdd.rb +118 -0
  171. data/vendor/buildr/lib/buildr/scala/compiler.rb +242 -0
  172. data/vendor/buildr/lib/buildr/scala/doc.rb +142 -0
  173. data/vendor/buildr/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  174. data/vendor/buildr/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.java +57 -0
  175. data/vendor/buildr/lib/buildr/scala/shell.rb +52 -0
  176. data/vendor/buildr/lib/buildr/scala/tests.rb +171 -0
  177. data/vendor/buildr/lib/buildr/shell.rb +185 -0
  178. data/vendor/buildr/lib/buildr/version.rb +18 -0
  179. data/vendor/buildr/rakelib/all-in-one.rake +113 -0
  180. data/vendor/buildr/rakelib/checks.rake +57 -0
  181. data/vendor/buildr/rakelib/doc.rake +137 -0
  182. data/vendor/buildr/rakelib/metrics.rake +39 -0
  183. data/vendor/buildr/rakelib/package.rake +73 -0
  184. data/vendor/buildr/rakelib/release.rake +161 -0
  185. data/vendor/buildr/rakelib/rspec.rake +101 -0
  186. data/vendor/buildr/rakelib/setup.rake +66 -0
  187. data/vendor/buildr/rakelib/stage.rake +220 -0
  188. data/vendor/buildr/spec/addon/bnd_spec.rb +330 -0
  189. data/vendor/buildr/spec/addon/drb_spec.rb +328 -0
  190. data/vendor/buildr/spec/addon/jaxb_xjc_spec.rb +125 -0
  191. data/vendor/buildr/spec/core/application_spec.rb +631 -0
  192. data/vendor/buildr/spec/core/build_spec.rb +837 -0
  193. data/vendor/buildr/spec/core/cc_spec.rb +224 -0
  194. data/vendor/buildr/spec/core/checks_spec.rb +519 -0
  195. data/vendor/buildr/spec/core/common_spec.rb +725 -0
  196. data/vendor/buildr/spec/core/compile_spec.rb +658 -0
  197. data/vendor/buildr/spec/core/doc_spec.rb +195 -0
  198. data/vendor/buildr/spec/core/extension_spec.rb +201 -0
  199. data/vendor/buildr/spec/core/generate_spec.rb +33 -0
  200. data/vendor/buildr/spec/core/project_spec.rb +772 -0
  201. data/vendor/buildr/spec/core/run_spec.rb +93 -0
  202. data/vendor/buildr/spec/core/shell_spec.rb +146 -0
  203. data/vendor/buildr/spec/core/test_spec.rb +1320 -0
  204. data/vendor/buildr/spec/core/transport_spec.rb +544 -0
  205. data/vendor/buildr/spec/core/util_spec.rb +141 -0
  206. data/vendor/buildr/spec/groovy/bdd_spec.rb +80 -0
  207. data/vendor/buildr/spec/groovy/compiler_spec.rb +251 -0
  208. data/vendor/buildr/spec/groovy/doc_spec.rb +65 -0
  209. data/vendor/buildr/spec/ide/eclipse_spec.rb +739 -0
  210. data/vendor/buildr/spec/ide/idea_spec.rb +1144 -0
  211. data/vendor/buildr/spec/java/ant_spec.rb +37 -0
  212. data/vendor/buildr/spec/java/bdd_spec.rb +374 -0
  213. data/vendor/buildr/spec/java/cobertura_spec.rb +112 -0
  214. data/vendor/buildr/spec/java/commands_spec.rb +93 -0
  215. data/vendor/buildr/spec/java/compiler_spec.rb +252 -0
  216. data/vendor/buildr/spec/java/doc_spec.rb +56 -0
  217. data/vendor/buildr/spec/java/ecj_spec.rb +115 -0
  218. data/vendor/buildr/spec/java/emma_spec.rb +121 -0
  219. data/vendor/buildr/spec/java/external_spec.rb +56 -0
  220. data/vendor/buildr/spec/java/java_spec.rb +132 -0
  221. data/vendor/buildr/spec/java/packaging_spec.rb +1270 -0
  222. data/vendor/buildr/spec/java/run_spec.rb +78 -0
  223. data/vendor/buildr/spec/java/test_coverage_helper.rb +257 -0
  224. data/vendor/buildr/spec/java/tests_spec.rb +497 -0
  225. data/vendor/buildr/spec/packaging/archive_spec.rb +775 -0
  226. data/vendor/buildr/spec/packaging/artifact_namespace_spec.rb +743 -0
  227. data/vendor/buildr/spec/packaging/artifact_spec.rb +1066 -0
  228. data/vendor/buildr/spec/packaging/packaging_helper.rb +63 -0
  229. data/vendor/buildr/spec/packaging/packaging_spec.rb +719 -0
  230. data/vendor/buildr/spec/sandbox.rb +165 -0
  231. data/vendor/buildr/spec/scala/bdd_spec.rb +124 -0
  232. data/vendor/buildr/spec/scala/compiler_spec.rb +289 -0
  233. data/vendor/buildr/spec/scala/doc_spec.rb +88 -0
  234. data/vendor/buildr/spec/scala/scala.rb +38 -0
  235. data/vendor/buildr/spec/scala/tests_spec.rb +283 -0
  236. data/vendor/buildr/spec/spec_helpers.rb +369 -0
  237. data/vendor/buildr/spec/version_requirement_spec.rb +143 -0
  238. data/vendor/buildr/spec/xpath_matchers.rb +121 -0
  239. data/vendor/buildr/tests/BUILDR-320/Buildfile +29 -0
  240. data/vendor/buildr/tests/JavaSystemProperty/Buildfile +18 -0
  241. data/vendor/buildr/tests/JavaSystemProperty/src/test/java/FooTest.java +24 -0
  242. data/vendor/buildr/tests/compile_with_parent/Buildfile +18 -0
  243. data/vendor/buildr/tests/compile_with_parent/child/src/main/java/Foo.java +23 -0
  244. data/vendor/buildr/tests/helloWorld/Buildfile +20 -0
  245. data/vendor/buildr/tests/helloWorld/src/main/java/HelloWorld.java +23 -0
  246. data/vendor/buildr/tests/integration_testing.rb +56 -0
  247. data/vendor/buildr/tests/junit3/Buildfile +9 -0
  248. data/vendor/buildr/tests/junit3/src/main/java/Foo.java +23 -0
  249. data/vendor/buildr/tests/junit3/src/test/java/FooTest.java +28 -0
  250. data/vendor/buildr/tests/package_war_as_jar/Buildfile +15 -0
  251. data/vendor/buildr/tests/package_war_as_jar/src/main/java/Foo.java +19 -0
  252. metadata +524 -0
@@ -0,0 +1 @@
1
+ @%~dp0\_buildr.exe %*
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with this
4
+ # work for additional information regarding copyright ownership. The ASF
5
+ # licenses this file to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ # License for the specific language governing permissions and limitations under
15
+ # the License.
16
+
17
+ require 'rubygems'
18
+ require 'buildr'
19
+ Buildr.application.run
@@ -0,0 +1,58 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+ $LOADED_FEATURES << 'jruby' unless RUBY_PLATFORM =~ /java/ # Pretend to have JRuby, keeps Nailgun happy.
17
+ require 'buildr/jetty'
18
+ require 'buildr/nailgun'
19
+ require 'buildr/scala'
20
+ repositories.remote << 'http://repo1.maven.org/maven2'
21
+ repositories.remote << 'http://scala-tools.org/repo-releases/'
22
+
23
+
24
+ define 'buildr' do
25
+ compile.using :source=>'1.5', :target=>'1.5', :debug=>false
26
+
27
+ define 'java' do
28
+ compile.using(:javac).from(FileList['lib/buildr/java/**/*.java']).into('lib/buildr/java')
29
+ end
30
+
31
+ define 'scala' do
32
+ compile.using(:javac).from(FileList['lib/buildr/scala/**/*.java']).into('lib/buildr/scala')
33
+ end
34
+
35
+ desc 'Buildr extra packages (Antlr, Cobertura, Hibernate, Javacc, JDepend, Jetty, OpenJPA, XmlBeans)'
36
+ define 'extra', :version=>'1.0' do
37
+ compile.using(:javac).from(FileList['addon/buildr/**/*.java']).into('addon/buildr').with(Buildr::Jetty::REQUIRES, Buildr::Nailgun::ARTIFACT_SPEC)
38
+ # Legals included in source code and show in RDoc.
39
+ legal = 'LICENSE', 'NOTICE'
40
+ package(:gem).include(legal).path('lib').include('addon/buildr')
41
+ package(:gem).spec do |spec|
42
+ spec.author = 'Apache Buildr'
43
+ spec.email = 'users@buildr.apache.org'
44
+ spec.homepage = "http://buildr.apache.org"
45
+ spec.rubyforge_project = 'buildr'
46
+ spec.extra_rdoc_files = legal
47
+ spec.rdoc_options << '--webcvs' << 'http://svn.apache.org/repos/asf/buildr/trunk/'
48
+ spec.add_dependency 'buildr', '~> 1.3'
49
+ end
50
+
51
+ install do
52
+ addon package(:gem)
53
+ end
54
+
55
+ upload do
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,74 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+ unless defined?(Buildr::VERSION)
17
+ require File.join(File.dirname(__FILE__), 'lib', 'buildr', 'version.rb')
18
+ end
19
+
20
+ Gem::Specification.new do |spec|
21
+ spec.name = 'buildr'
22
+ spec.version = Buildr::VERSION.dup
23
+ spec.author = 'Apache Buildr'
24
+ spec.email = "users@buildr.apache.org"
25
+ spec.homepage = "http://buildr.apache.org/"
26
+ spec.summary = "Build like you code"
27
+ spec.description = <<-TEXT
28
+ Apache Buildr is a build system for Java-based applications, including support
29
+ for Scala, Groovy and a growing number of JVM languages and tools. We wanted
30
+ something that's simple and intuitive to use, so we only need to tell it what
31
+ to do, and it takes care of the rest. But also something we can easily extend
32
+ for those one-off tasks, with a language that's a joy to use.
33
+ TEXT
34
+ spec.rubyforge_project = 'buildr'
35
+
36
+ # Rakefile needs to create spec for both platforms (ruby and java), using the
37
+ # $platform global variable. In all other cases, we figure it out from RUBY_PLATFORM.
38
+ spec.platform = $platform || RUBY_PLATFORM[/java/] || 'ruby'
39
+
40
+ spec.files = Dir['{addon,bin,doc,etc,lib,rakelib,spec}/**/*', '*.{gemspec,buildfile}'] +
41
+ ['LICENSE', 'NOTICE', 'CHANGELOG', 'README.rdoc', 'Rakefile', '_buildr', '_jbuildr']
42
+ spec.require_paths = 'lib', 'addon'
43
+ spec.bindir = 'bin' # Use these for applications.
44
+ spec.executable = 'buildr'
45
+
46
+ spec.has_rdoc = true
47
+ spec.extra_rdoc_files = 'README.rdoc', 'CHANGELOG', 'LICENSE', 'NOTICE'
48
+ spec.rdoc_options = '--title', 'Buildr', '--main', 'README.rdoc',
49
+ '--webcvs', 'http://svn.apache.org/repos/asf/buildr/trunk/'
50
+ spec.post_install_message = "To get started run buildr --help"
51
+
52
+ # Tested against these dependencies.
53
+ spec.add_dependency 'rake', '0.8.7'
54
+ spec.add_dependency 'builder', '2.1.2'
55
+ spec.add_dependency 'net-ssh', '2.0.23'
56
+ spec.add_dependency 'net-sftp', '2.0.4'
57
+ spec.add_dependency 'rubyzip', '0.9.4'
58
+ spec.add_dependency 'highline', '1.5.1'
59
+ spec.add_dependency 'json_pure', '1.4.3'
60
+ spec.add_dependency 'rubyforge', '2.0.3'
61
+ spec.add_dependency 'hoe', '2.3.3'
62
+ spec.add_dependency 'rjb', '1.3.3' if spec.platform.to_s == 'ruby'
63
+ spec.add_dependency 'rjb', '1.3.2' if spec.platform.to_s == 'x86-mswin32'
64
+ spec.add_dependency 'atoulme-Antwrap', '0.7.1'
65
+ spec.add_dependency 'rspec', '~> 2.1.0'
66
+ spec.add_dependency 'xml-simple', '1.0.12'
67
+ spec.add_dependency 'minitar', '0.5.3'
68
+ spec.add_dependency 'jruby-openssl', '>= 0.7' if spec.platform.to_s == 'java'
69
+ spec.add_development_dependency 'jekyll', '~> 0.6.2' unless spec.platform.to_s == 'java'
70
+ spec.add_development_dependency 'sdoc'
71
+ spec.add_development_dependency 'rcov', '0.9.9' unless spec.platform.to_s == 'java'
72
+ spec.add_development_dependency 'win32console' if spec.platform.to_s == 'x86-mswin32'
73
+ spec.add_development_dependency 'jekylltask', '>= 1.0.2' unless spec.platform.to_s == 'java'
74
+ end
@@ -0,0 +1 @@
1
+ pygments: true
@@ -0,0 +1,90 @@
1
+ <html>
2
+ <head>
3
+ <meta content='text/html;charset=UTF-8' http-equiv='Content-Type'>
4
+ <title>buildr &mdash; {{ page.title }}</title>
5
+ <style type='text/css'>
6
+ @import 'css/default.css';
7
+ @import 'css/syntax.css';
8
+ </style>
9
+ <style media='print' type='text/css'>
10
+ @import 'css/print.css';
11
+ </style>
12
+ <meta content='Official Buildr documentation from the people in the know' name='subject'>
13
+ <link href='images/favicon.png' rel='shortcut icon'>
14
+ </head>
15
+ <body>
16
+ <div id='wrap'>
17
+ <div id='header'>
18
+ <a href='http://buildr.apache.org/' title="Build like you code"><img alt='buildr' src='images/buildr.png'></a>
19
+ <div class='tagline'>Build like you code</div>
20
+ </div>
21
+ <div id='pages'>
22
+ <ol class='toc'>
23
+ <li>Start Here
24
+ <ol class="toc">
25
+ <li><a href='index.html'>Welcome</a></li>
26
+ <li><a href='quick_start.html'>Quick Start</a></li>
27
+ <li><a href='installing.html'>Installing & Running</a></li>
28
+ <li><a href='http://cwiki.apache.org/confluence/display/BUILDR/Index'>Community Wiki</a></li>
29
+ </ol>
30
+ </li>
31
+ <li>Using Buildr
32
+ <ol class="toc">
33
+ <li><a href='buildr.pdf'>This Guide (PDF)</a></li>
34
+ <li><a href='projects.html'>Projects</a></li>
35
+ <li><a href='building.html'>Building</a></li>
36
+ <li><a href='artifacts.html'>Artifacts</a></li>
37
+ <li><a href='packaging.html'>Packaging</a></li>
38
+ <li><a href='testing.html'>Testing</a></li>
39
+ <li><a href='releasing.html'>Releasing</a></li>
40
+ <li><a href='settings_profiles.html'>Settings/Profiles</a></li>
41
+ <li><a href='languages.html'>Languages</a></li>
42
+ <li><a href='more_stuff.html'>More Stuff</a></li>
43
+ <li><a href='extending.html'>Extending Buildr</a></li>
44
+ <li><a href='http://cwiki.apache.org/confluence/display/BUILDR/Buildr+HowTos'>How-Tos</a></li>
45
+ </ol>
46
+ </li>
47
+ <li>Reference
48
+ <ol class="toc">
49
+ <li><a href='rdoc'>API</a></li>
50
+ <li><a href='http://docs.rubyrake.org'>Rake</a></li>
51
+ <li><a href='http://antwrap.rubyforge.org'>Antwrap</a></li>
52
+ <li><a href='http://cwiki.apache.org/confluence/display/BUILDR/Common+Problems+and+Solutions'>Troubleshooting</a></li>
53
+ </ol>
54
+ </li>
55
+ <li>Get Involved
56
+ <ol class="toc">
57
+ <li><a href='download.html'>Download</a></li>
58
+ <li><a href='mailing_lists.html'>Mailing Lists</a></li>
59
+ <li><a href='http://www.twitter.com/buildr'>Twitter</a></li>
60
+ <li><a href='http://issues.apache.org/jira/browse/Buildr'>Issues/Bugs</a></li>
61
+ <li><a href='contributing.html'>Contributing</a></li>
62
+ <li><a href='specs.html'>Specs</a></li>
63
+ <li><a href='coverage/index.html'>Coverage</a></li>
64
+ </ol>
65
+ </li>
66
+ <li>
67
+ <form action='http://www.google.com/cse' id='searchbox_003673095760649043902:ogcgrzu0l2y'>
68
+ <input name='cx' type='hidden' value='003673095760649043902:ogcgrzu0l2y'>
69
+ <input name='cof' type='hidden' value='FORID:0'>
70
+ <input name='q' size='20' type='text'>
71
+ <input name='sa' type='submit' value='Search'>
72
+ <img alt='Google Custom Search' src='http://www.google.com/coop/images/google_custom_search_smnar.gif'>
73
+ </form>
74
+ </li>
75
+ <li>The Buildr Book
76
+ <p><a href='http://www.amazon.com/Buildr/dp/1442160942/'><img src='images/1442160941-frontcover.jpg' style='width:120px'></a></p>
77
+ <p>Based on the Buildr documentation, available from <a href='http://www.amazon.com/Buildr/dp/1442160942/'>Amazon</a> and
78
+ <a href='http://www.createspace.com/3382199'>CreateSpace</a></p>
79
+ </li>
80
+ </ol>
81
+ </div>
82
+ <div id='content'>
83
+ <h1 id='{{ page.title | downcase | replace(' ', '_') }}'>{{ page.title }}</h1>
84
+ {{ content | toc }}
85
+ {{ content }}
86
+ </div>
87
+ <div id='footer'>Copyright &copy; 2007-2010 The Apache Software Foundation</div>
88
+ </div>
89
+ </body>
90
+ </html>
@@ -0,0 +1,22 @@
1
+ <html>
2
+ <head>
3
+ <meta content='text/html;charset=UTF-8' http-equiv='Content-Type' />
4
+ <title>buildr</title>
5
+ <style type='text/css'>
6
+ @import 'css/default.css';
7
+ @import 'css/syntax.css';
8
+ </style>
9
+ <style media='print' type='text/css'>
10
+ @import 'css/print.css';
11
+ </style>
12
+ <meta content='Official Buildr documentation from the people in the know' name='subject' />
13
+ <link href='images/favicon.png' rel='shortcut icon' />
14
+ </head>
15
+ <body>
16
+ <div id='wrap'>
17
+ <div id='content'>
18
+ {{ content }}
19
+ </div>
20
+ </div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,217 @@
1
+ ---
2
+ layout: default
3
+ title: Artifacts
4
+ ---
5
+
6
+
7
+ In Buildr, almost everything is a file or a file task. You compile source files that come from the file system using dependencies found on the file system, generating even more files. But how do you get these dependencies to start with, and how do you share them with others?
8
+
9
+ Artifacts. We designed Buildr to work as a drop-in replacement for Maven 2.0, and share artifacts through the same local and remote repositories. Artifact tasks know how to download a file from one of the remote repositories, and install it in the local repository, where Buildr can find it. Packages know how to create files and upload them to remote repositories.
10
+
11
+ We'll get into all of that in a second, but first, let's introduce the artifact specification. It's a simple string that takes one of two forms:
12
+
13
+ {% highlight text %}
14
+ group:id:type:version
15
+ group:id:type:classifier:version
16
+ {% endhighlight %}
17
+
18
+ For example, @'org.apache.axis2:axis2:jar:1.2'@ refers to an artifact with group identifier org.apache.axis2, artifact identifier axis2, a JAR file with version 1.2. Classifiers are typically used to distinguish between similar file types, for example, a source distribution and a binary distribution that otherwise have the same identifier and are both ZIP files.
19
+
20
+
21
+ h2(#specifying). Specifying Artifacts
22
+
23
+ If your Buildfile spells out @'org.apache.axis2:axis2:jar:1.2'@ more than once, you're doing something wrong. Repeating the same string over and over will make your code harder to maintain. You'll know that when you upgrade to a new version in one place, forget to do it in another, and end up with a mismatch.
24
+
25
+ You can use Ruby's syntax to do simple string substitution, for example:
26
+
27
+ {% highlight ruby %}
28
+ AXIS_VERSION = '1.2'
29
+
30
+ compile.with "org.apache.axis2:axis2:jar:#{AXIS_VERSION}"
31
+ {% endhighlight %}
32
+
33
+ Better yet, you can define all your artifacts at the top of the Buildfile and use constants to reference them in your project definition. For example:
34
+
35
+ {% highlight ruby %}
36
+ AXIS2 = 'org.apache.axis2:axis2:jar:1.2'
37
+
38
+ compile.with AXIS2
39
+ {% endhighlight %}
40
+
41
+ Note that we're not using a separate constant for the version number. In our experience, it's unnecessary. The version number intentionally appears at the end of the string, where it stands out easily.
42
+
43
+ If you have a set of artifacts that belong to the same group and version, and that's quite common, you can use the @group@ shortcut:
44
+
45
+ {% highlight ruby %}
46
+ AXIOM = group('axiom-api', 'axiom-impl', 'axiom-dom',
47
+ :under=>'org.apache.ws.commons.axiom', :version=>'1.2.4')
48
+ {% endhighlight %}
49
+
50
+ p(note). Buildr projects also define a @group@ attribute which can lead to some confusion. If you want to define an artifact group within a project definition, you should use the explicit qualifier @Buildr::group@.
51
+
52
+ If you have several artifacts you always use together, consider placing them in an array. Methods that accept lists of artifacts also accept arrays. For example:
53
+
54
+ {% highlight ruby %}
55
+ OPENJPA = ['org.apache.openjpa:openjpa:jar:1.2.1',
56
+ 'net.sourceforge.serp:serp:jar:1.12.0']
57
+ AXIS_OF_WS = [AXIS2, AXIOM]
58
+
59
+ compile.with OPENJPA, AXIS_OF_WS
60
+ {% endhighlight %}
61
+
62
+ Another way to group related artifacts together and access them individually is using the @struct@ shortcut. For example:
63
+
64
+ {% highlight ruby %}
65
+ JAVAX = struct(
66
+ :activation =>'javax.activation:activation:jar:1.1',
67
+ :persistence =>'javax.persistence:persistence-api:jar:1.0',
68
+ :stream =>'stax:stax-api:jar:1.0.1',
69
+ )
70
+
71
+ compile.with JAVAX.persistence, OPENJPA
72
+ {% endhighlight %}
73
+
74
+ In our experience, using constants in this manner makes your Buildfile much easier to write and maintain.
75
+
76
+ And, of course, you can always place your artifact specifications in a separate file and require it into your Buildfile. For example, if you're working on several different projects that all share the same artifacts:
77
+
78
+ {% highlight ruby %}
79
+ require '../shared/artifacts'
80
+ {% endhighlight %}
81
+
82
+ When you use @require@, Ruby always looks for a filename with the @.rb@ extension, so in this case it expects to find @artifacts.rb@ in the @shared@ directory.
83
+
84
+ One last thing. You can also treat artifact specifications as hashes. For example:
85
+
86
+ {% highlight ruby %}
87
+ AXIS = { :group=>'org.apache.axis2', :id=>'axis2', :version=>'1.2' }
88
+ compile.with AXIS
89
+ puts compile.dependencies.first.to_hash
90
+ => { :group=>'org.apache.axis2', :id=>'axis2',
91
+ :version=>'1.2', :type=>:jar }
92
+ {% endhighlight %}
93
+
94
+
95
+ h2(#repositories). Specifying Repositories
96
+
97
+ Buildr can download artifacts for you, but only if you tell it where to find them. You need to specify at least one remote repository, from which to download these artifacts.
98
+
99
+ When you call @repositories.remote@, you get an array of URLs for the various remote repositories. Initially, it's an empty array, to which you can add new repositories. For example:
100
+
101
+ {% highlight ruby %}
102
+ repositories.remote << 'http://www.ibiblio.org/maven2/'
103
+ {% endhighlight %}
104
+
105
+ If your repository requires HTTP authentication, you can write,
106
+
107
+ {% highlight ruby %}
108
+ repositories.remote << URI.parse("http://user:password@repository.example.com")
109
+ {% endhighlight %}
110
+
111
+ If you need to use a proxy server to access remote repositories, you can set the environment variable @HTTP_PROXY@ to the proxy server URL (use @HTTPS_PROXY@ for proxying HTTPS connections). You can also work without a proxy for certain hosts by specifying the @NO_PROXY@ environment variable. For example:
112
+
113
+ {% highlight sh %}
114
+ $ export HTTP_PROXY = 'http://myproxy:8080'
115
+ $ export NO_PROXY = '*.mycompany.com,localhost,special:800'
116
+ {% endhighlight %}
117
+
118
+ Alternatively you can use the Buildr options @proxy.http@ and @proxy.exclude@:
119
+
120
+ {% highlight ruby %}
121
+ options.proxy.http = 'http://myproxy:8080'
122
+ options.proxy.exclude << '*.mycompany.com'
123
+ options.proxy.exclude << 'localhost'
124
+ {% endhighlight %}
125
+
126
+ All the artifacts download into the local repository. Since all your projects share the same local repository, you only need to download each artifact once. Buildr was designed to be used alongside Maven 2.0, for example, when migrating projects from Maven 2.0 over to Buildr. By default it will share the same local repository, expecting the repository to be the @.m2/repository@ directory inside your home directory.
127
+
128
+ You can choose to relocate the local repository by giving it a different path, for example:
129
+
130
+ {% highlight ruby %}
131
+ repositories.local = '/usr/local/maven/repository'
132
+ {% endhighlight %}
133
+
134
+ That's one change you don't want to commit into the Buildfile, so the best place to do it is in the @buildr.rb@ file in the @.buildr@ directory under your home directory.
135
+
136
+ Buildr downloads artifacts when it needs to use them, for example, to compile a project. You don't need to download artifacts directly. Except when you do, for example, if you want to download all the latest artifacts and then go off-line. It's as simple as:
137
+
138
+ {% highlight sh %}
139
+ $ buildr artifacts
140
+ {% endhighlight %}
141
+
142
+
143
+ h2(#downloading). Downloading Artifacts
144
+
145
+ Within your buildfile you can download artifacts directly by invoking them, for example:
146
+
147
+ {% highlight ruby %}
148
+ artifact('org.apache.openjpa:openjpa:jar:1.2.1').invoke
149
+ artifacts(OPENJPA).each(&:invoke)
150
+ {% endhighlight %}
151
+
152
+ When you let Buildr download artifacts for you, or by invoking the artifact task yourself, it scans through the remote repositories assuming each repository follows the Maven 2 structure. Starting from the root repository URL, it will look for each artifact using the path @group/id/version/id-version.type@ (or ...@/id-version-classifier.type@). The group identifier becomes a path by turning periods (@.@) into slashes (@/@). So to find @org.apache.axis2:axis2:jar:1.2@, we're going to look for @org/apache/axis2/axis2/1.2/axis2-1.2.jar@.
153
+
154
+ You'll find a lot of open source Java libraries in public repositories that support this structure (for example, the "Ibiblio Maven":http://www.ibiblio.org/maven2/ repository). And, of course, every remote repository you setup for your projects.
155
+
156
+ But there are exceptions to the rule. Say we want to download the Dojo widget library and use it in our project. It's available from the Dojo Web site, but that site doesn't follow the Maven repository conventions, so our feeble attempt to use existing remote repositories will fail.
157
+
158
+ We can still treat Dojo as an artifact, by telling Buildr where to download it from:
159
+
160
+ {% highlight ruby %}
161
+ DOJO = '0.2.2'
162
+
163
+ url = "http://download.dojotoolkit.org/release-#{DOJO}/dojo-#{DOJO}-widget.zip"
164
+ download(artifact("dojo:dojo:zip:widget:#{DOJO}")=>url)
165
+ {% endhighlight %}
166
+
167
+ Explaining how it works is tricky, skip if you don't care for the details. On the other hand, it will give you a better understanding of Buildr/Rake, so if not now, come back and read it later.
168
+
169
+ We use the @artifact@ method to create an @Artifact@ task that references the Dojo widget in our local repository. The @Artifact@ task is a file task with some additional behavior added by Buildr. When you call @compile.with@, that's exactly what it does internally, turning each of your artifact specifications into an @Artifact@ task.
170
+
171
+ But the @Artifact@ task doesn't know how to download the Dojo widget, only how to handle conventional repositories. So we're going to create a download task as well. We use the @download@ method to create a file task that downloads the file from a remote URL. (Of course, it will only download the file if it doesn't already exist.)
172
+
173
+ But which task gets used when? We could have defined these tasks separately and used some glue code to make one use the other. Instead, we call @download@ with the results of @artifact@. Essentially, we're telling @download@ to use the same file path as @artifact@. So now we have two file tasks that point to the very same file. We wired them together.
174
+
175
+ You can't have more than one task pointing to the same file. Rake's rule of the road. What Rake does is merge the tasks together, creating a single file task for @artifact@, and then enhancing it with another action from @download@. One task, two actions. Statistically, we've doubled the odds that at least one of these actions will manage to download the Dojo widget and install it in the local repository.
176
+
177
+ Since we ordered the calls to @artifact@ first and @download@ second, we know the actions will execute in that order. But @artifact@ is slightly devilish: when its action runs, it adds another action to the end of the list. So the @artifact@ action runs first, adds an action at the end, the @download@ action runs second, and downloads the Dojo widget for us. The second @artifact@ action runs last, but checks that the file already exist and doesn't try to download it again.
178
+
179
+ Magic.
180
+
181
+
182
+ h2(#install_upload). Install and Upload
183
+
184
+ Generally you use artifacts that download from remote repositories into the local repository, or artifacts packaged by the project itself (see "Packaging":packaging.html), which are then installed into the local repository and uploaded to the release server.
185
+
186
+ Some artifacts do not fall into either category. In this example we're going to download a ZIP file, extract a JAR file from it, and use that JAR file as an artifact. We would then expect to install this JAR in the local repository and upload it to the release server, where it can be shared with other projects.
187
+
188
+ So let's start by creating a task that downloads the ZIP, and another one to extract it and create the JAR file:
189
+
190
+ {% highlight ruby %}
191
+ app_zip = download('target/app.zip'=>url)
192
+ bean_jar = file('target/app/bean.jar'=>unzip('target/app'=>app_zip))
193
+ {% endhighlight %}
194
+
195
+ When you call @artifact@, it returns an @Artifact@ task that points to the artifact file in the local repository, downloading the file if it doesn't already exist. You can override this behavior by enhancing the task and creating the file yourself (you may also want to create a POM file). Or much simpler, call the @from@ method on the artifact and tell it where to find the source file.
196
+
197
+ So the next step is to specify the artifact and tell it to use the extracted JAR file:
198
+
199
+ {% highlight ruby %}
200
+ bean = artifact('example.com:beans:jar:1.0').from(bean_jar)
201
+ {% endhighlight %}
202
+
203
+ The artifact still points to the local repository, but when we invoke the task it copies the source file over to the local repository, instead of attempting a download.
204
+
205
+ Use the @install@ method if you want the artifact and its POM installed in the local repository when you run the @install@ task. Likewise, use the @upload@ method if you want the artifact uploaded to the release server when you run the @upload@ task. You do not need to do this on artifacts downloaded from a remote server, or created with the @package@ method, the later are automatically added to the list of installed/uploaded artifacts.
206
+
207
+ Our example ends by including the artifact in the @install@ and @upload@ tasks:
208
+
209
+ {% highlight ruby %}
210
+ install bean
211
+ upload bean
212
+ {% endhighlight %}
213
+
214
+ p(tip). Calling the @install@ (and likewise @upload@) method on an artifact run @buildr install@. If you need to download and install an artifact, invoke the task directly with @install(<artifact>).invoke@.
215
+
216
+
217
+ We'll talk more about installing and uploading in the next chapter, but right now we're going to "package some artifacts":packaging.html.