buildr-examples 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/LICENSE +176 -0
  2. data/README.rdoc +35 -0
  3. data/examples/artifacts/install_upload/app.zip +0 -0
  4. data/examples/artifacts/install_upload/buildfile +29 -0
  5. data/examples/artifacts/install_upload/src/main/java/HelloWorld.java +5 -0
  6. data/examples/artifacts/shared/artifacts.rb +5 -0
  7. data/examples/artifacts/simple/buildfile +75 -0
  8. data/examples/artifacts/simple/src/main/java/HelloWorld.java +5 -0
  9. data/examples/building/apt/buildfile +8 -0
  10. data/examples/building/apt/run.sh +3 -0
  11. data/examples/building/apt/src/main/java/Example.java +9 -0
  12. data/examples/building/chaining/buildfile +13 -0
  13. data/examples/building/chaining/run.sh +2 -0
  14. data/examples/building/chaining/src/main/java/Example.java +5 -0
  15. data/examples/building/chaining/srcs/HelloWorld.java +5 -0
  16. data/examples/building/compiler/buildfile +42 -0
  17. data/examples/building/compiler/groovyproject/src/main/groovy/HelloWorld.groovy +9 -0
  18. data/examples/building/compiler/javaproject/src/main/java/HelloWorld.java +5 -0
  19. data/examples/building/compiler/run.sh +10 -0
  20. data/examples/building/compiler/scalaproject/src/main/scala/HelloWorld.scala +5 -0
  21. data/examples/building/extending_tasks/buildfile +24 -0
  22. data/examples/building/extending_tasks/run.sh +4 -0
  23. data/examples/building/extending_tasks/src/main/java/HelloWorld.java +5 -0
  24. data/examples/building/jjtree/buildfile +10 -0
  25. data/examples/building/jjtree/run.sh +3 -0
  26. data/examples/building/jjtree/src/main/jjtree/com/acme/Example.java +7 -0
  27. data/examples/building/resources/buildfile +23 -0
  28. data/examples/building/resources/profiles.yaml +12 -0
  29. data/examples/building/resources/run.sh +6 -0
  30. data/examples/building/resources/src/main/property-style/ant.txt +1 -0
  31. data/examples/building/resources/src/main/property-style/erb.txt +1 -0
  32. data/examples/building/resources/src/main/property-style/maven.txt +1 -0
  33. data/examples/building/resources/src/main/property-style/regex.txt +1 -0
  34. data/examples/building/resources/src/main/property-style/ruby.txt +1 -0
  35. data/examples/building/resources/src/main/resources/filter.txt +1 -0
  36. data/examples/installing/buildfile +7 -0
  37. data/examples/installing/run.sh +16 -0
  38. data/examples/ivy4r/simple/ant-scripts/ivysettings.xml +9 -0
  39. data/examples/ivy4r/simple/buildfile +10 -0
  40. data/examples/ivy4r/simple/ivy.xml +6 -0
  41. data/examples/ivy4r/simple/run.sh +2 -0
  42. data/examples/ivy4r/simple/src/main/java/HelloWorld.java +8 -0
  43. data/examples/packaging/include_exclude/README +1 -0
  44. data/examples/packaging/include_exclude/buildfile +62 -0
  45. data/examples/packaging/include_exclude/run.sh +4 -0
  46. data/examples/packaging/include_exclude/src/main/java/HelloWorld.java +5 -0
  47. data/examples/packaging/include_exclude/src/main/resources/include/some_resource.txt +0 -0
  48. data/examples/packaging/include_exclude/src/main/resources/some.include +0 -0
  49. data/examples/packaging/include_exclude/src/main/resources/some_exclude.clu +0 -0
  50. data/examples/packaging/include_exclude/src/main/resources/some_exclude.ex +0 -0
  51. data/examples/packaging/include_exclude/src/main/webapp/WEB-INF/web.xml +0 -0
  52. data/examples/packaging/meta/ADDITIONAL +1 -0
  53. data/examples/packaging/meta/DISCLAIMER +1 -0
  54. data/examples/packaging/meta/NOTICE +1 -0
  55. data/examples/packaging/meta/buildfile +25 -0
  56. data/examples/packaging/meta/run.sh +2 -0
  57. data/examples/packaging/meta/src/main/MANIFEST.MF +7 -0
  58. data/examples/packaging/meta/src/main/java/HelloWorld.java +5 -0
  59. data/examples/packaging/meta/src/main/resources/some_resource.txt +0 -0
  60. data/examples/packaging/meta/src/main/webapp/WEB-INF/web.xml +0 -0
  61. data/examples/packaging/multiple/buildfile +39 -0
  62. data/examples/packaging/multiple/run.sh +6 -0
  63. data/examples/packaging/multiple/src/main/java/HelloWorld.java +5 -0
  64. data/examples/packaging/multiple/src/main/resources/some_resource.txt +0 -0
  65. data/examples/packaging/multiple/src/main/webapp/WEB-INF/web.xml +0 -0
  66. data/examples/projects/foo-bar/buildfile +24 -0
  67. data/examples/projects/foo-bar/run.sh +2 -0
  68. data/examples/projects/killer-app/buildfile +82 -0
  69. data/examples/projects/killer-app/run.sh +27 -0
  70. data/examples/projects/killer-app/teh-api/src/main/java/Example.java +5 -0
  71. data/examples/projects/killer-app/teh-api/src/test/java/ExampleTest.java +8 -0
  72. data/examples/projects/killer-app/teh-impl/src/main/java/Example.java +5 -0
  73. data/examples/projects/killer-app/teh-impl/src/main/resources/META-INF/persistence.xml +18 -0
  74. data/examples/projects/killer-app/teh-impl/src/test/java/ExampleTest.java +8 -0
  75. data/examples/projects/silly/buildfile +15 -0
  76. data/examples/projects/silly/run.sh +2 -0
  77. data/examples/projects/task/buildfile +12 -0
  78. data/examples/projects/task/run.sh +5 -0
  79. data/examples/testing/failing/buildfile +11 -0
  80. data/examples/testing/failing/run.sh +7 -0
  81. data/examples/testing/failing/src/main/java/Example.java +5 -0
  82. data/examples/testing/failing/src/test/java/FailingExampleTest.java +8 -0
  83. data/examples/testing/frameworks/buildfile +12 -0
  84. data/examples/testing/frameworks/junit/src/main/java/Example.java +5 -0
  85. data/examples/testing/frameworks/junit/src/test/java/ExampleTest.java +8 -0
  86. data/examples/testing/frameworks/run.sh +5 -0
  87. data/examples/testing/frameworks/testng/src/main/java/Example.java +5 -0
  88. data/examples/testing/frameworks/testng/src/test/java/ExampleTest.java +9 -0
  89. data/examples/testing/include_exclude/buildfile +9 -0
  90. data/examples/testing/include_exclude/run.sh +2 -0
  91. data/examples/testing/include_exclude/src/main/java/Example.java +5 -0
  92. data/examples/testing/include_exclude/src/test/java/ExampleTest.java +8 -0
  93. data/examples/testing/include_exclude/src/test/java/FailingExampleTest.java +8 -0
  94. data/examples/testing/include_exclude/src/test/java/de/phoet/IncludeTest.java +10 -0
  95. data/examples/testing/integration/buildfile +12 -0
  96. data/examples/testing/integration/client/src/main/java/Example.java +5 -0
  97. data/examples/testing/integration/client/src/test/java/ClientExampleTest.java +8 -0
  98. data/examples/testing/integration/run.sh +2 -0
  99. data/examples/testing/integration/server/src/main/java/Example.java +5 -0
  100. data/examples/testing/integration/server/src/test/java/ServerExampleTest.java +8 -0
  101. data/examples/testing/running/buildfile +13 -0
  102. data/examples/testing/running/client/src/main/java/Example.java +5 -0
  103. data/examples/testing/running/client/src/test/java/ClientExampleTest.java +8 -0
  104. data/examples/testing/running/run.sh +26 -0
  105. data/examples/testing/running/server/src/main/java/Example.java +5 -0
  106. data/examples/testing/running/server/src/test/java/ServerExampleTest.java +8 -0
  107. data/features/artifacts.feature +42 -0
  108. data/features/step_definitions/artifacts_steps.rb +19 -0
  109. data/features/support/env.rb +11 -0
  110. metadata +213 -0
@@ -0,0 +1,8 @@
1
+ import org.junit.Test;
2
+
3
+ public class ServerExampleTest {
4
+ @Test
5
+ public void someTest() {
6
+ new Example().callMe();
7
+ }
8
+ }
@@ -0,0 +1,13 @@
1
+ repositories.remote << 'http://www.ibiblio.org/maven2/'
2
+
3
+ define 'running', :version=>"1.0" do
4
+ options.test = ENV['do_test'].nil?
5
+ options.test = :all if ENV['do_all']
6
+ define 'client' do
7
+ package(:jar)
8
+ end
9
+ define 'server' do
10
+ test.with project('client')
11
+ package(:jar)
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ public class Example {
2
+ public void callMe(){
3
+ System.out.println("I got called!");
4
+ }
5
+ }
@@ -0,0 +1,8 @@
1
+ import org.junit.Test;
2
+
3
+ public class ClientExampleTest {
4
+ @Test
5
+ public void someTest() {
6
+ new Example().callMe();
7
+ }
8
+ }
@@ -0,0 +1,26 @@
1
+ echo "build and test"
2
+ buildr clean test
3
+
4
+ echo "disable test within buildfile (via ENV)"
5
+ buildr clean package do_test=false
6
+
7
+ echo "run ServerExampleTest tests"
8
+ buildr clean test:ServerExampleTest
9
+
10
+ echo "run ServerExampleTest and ClientExampleTest tests"
11
+ buildr clean test:ServerExampleTest,ClientExampleTest
12
+
13
+ echo "run all tests that are named *Example*"
14
+ buildr clean test:*Example*
15
+
16
+ echo "do not stop at first failing test"
17
+ buildr package test=all
18
+
19
+ echo "do not stop at first failing test (via ENV)"
20
+ buildr clean package do_test=false
21
+
22
+ echo "re-run the failed tests"
23
+ buildr test:failed
24
+
25
+ echo "test only the client"
26
+ buildr clean test=only running:client:test
@@ -0,0 +1,5 @@
1
+ public class Example {
2
+ public void callMe(){
3
+ System.out.println("I got called!");
4
+ }
5
+ }
@@ -0,0 +1,8 @@
1
+ import org.junit.Test;
2
+
3
+ public class ServerExampleTest {
4
+ @Test
5
+ public void someTest() {
6
+ new Example().callMe();
7
+ }
8
+ }
@@ -0,0 +1,42 @@
1
+ Feature: buildr artifacts
2
+ In order to work with dependencies
3
+ buildr provieds the 'artifacts' task
4
+
5
+ Scenario: simple project to retrieve artifacts
6
+ Given I go to the 'artifacts/simple' project
7
+ When I call 'artifacts'
8
+ Then it should not fail
9
+ And it should retrieve the artifacts
10
+
11
+ Scenario: simple project using local proxy-task
12
+ Given I go to the 'artifacts/simple' project
13
+ When I call 'proxy artifacts'
14
+ Then it should not fail
15
+ And it should retrieve the artifacts
16
+
17
+ Scenario: simple project using local repo-task
18
+ Given I go to the 'artifacts/simple' project
19
+ When I call 'repo artifacts'
20
+ Then it should not fail
21
+ And it should retrieve the artifacts
22
+
23
+
24
+ Scenario: install_upload project building
25
+ Given I go to the 'artifacts/install_upload' project
26
+ When I call 'build'
27
+ Then it should not fail
28
+
29
+ Scenario: install_upload project installing an artifact
30
+ Given I go to the 'artifacts/install_upload' project
31
+ When I call 'install'
32
+ Then it should not fail
33
+
34
+ Scenario: install_upload project uploading an artifact
35
+ Given I go to the 'artifacts/install_upload' project
36
+ When I call 'upload'
37
+ Then it should not fail
38
+
39
+ Scenario: install_upload project installing directly using task
40
+ Given I go to the 'artifacts/install_upload' project
41
+ When I call 'install_upload:install_directly'
42
+ Then it should not fail
@@ -0,0 +1,19 @@
1
+ Given /^I go to the '(.*)' project$/ do |path|
2
+ @path = "examples/#{path}"
3
+ end
4
+
5
+ When /^I call '(.*)'$/ do |command|
6
+ cmd = "export M2_REPO='#{m2_repo}' && cd #{@path} && buildr clean #{command}"
7
+ # puts "running '#{cmd}'"
8
+ @result = `#{cmd}`
9
+ # puts "result is '#{@result}'"
10
+ end
11
+
12
+ Then /^it should not fail$/ do
13
+ # puts "result is here '#{@result}'"
14
+ @result.should match /.*Completed in.*/
15
+ end
16
+
17
+ Then /^it should retrieve the artifacts$/ do
18
+ m2_repo_exists?.should be true
19
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec/expectations'
2
+
3
+ require 'ftools'
4
+
5
+ def m2_repo_exists?
6
+ File.exist? m2_repo
7
+ end
8
+
9
+ def m2_repo
10
+ "#{Dir.pwd}/.m2/repository"
11
+ end
metadata ADDED
@@ -0,0 +1,213 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: buildr-examples
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - "Peter Schr\xC3\xB6der"
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-08-17 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: buildr
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 4
30
+ - 0
31
+ version: 1.4.0
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: ivy4r
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 11
44
+ - 0
45
+ version: 0.11.0
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: cucumber
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ - 8
58
+ - 0
59
+ version: 0.8.0
60
+ type: :development
61
+ version_requirements: *id003
62
+ description: Examples using Apache Buildr.
63
+ email: phoetmail@googlemail.com
64
+ executables: []
65
+
66
+ extensions: []
67
+
68
+ extra_rdoc_files: []
69
+
70
+ files:
71
+ - examples/artifacts/install_upload/app.zip
72
+ - examples/artifacts/install_upload/buildfile
73
+ - examples/artifacts/install_upload/src/main/java/HelloWorld.java
74
+ - examples/artifacts/shared/artifacts.rb
75
+ - examples/artifacts/simple/buildfile
76
+ - examples/artifacts/simple/src/main/java/HelloWorld.java
77
+ - examples/building/apt/buildfile
78
+ - examples/building/apt/run.sh
79
+ - examples/building/apt/src/main/java/Example.java
80
+ - examples/building/chaining/buildfile
81
+ - examples/building/chaining/run.sh
82
+ - examples/building/chaining/src/main/java/Example.java
83
+ - examples/building/chaining/srcs/HelloWorld.java
84
+ - examples/building/compiler/buildfile
85
+ - examples/building/compiler/run.sh
86
+ - examples/building/compiler/groovyproject/src/main/groovy/HelloWorld.groovy
87
+ - examples/building/compiler/javaproject/src/main/java/HelloWorld.java
88
+ - examples/building/compiler/scalaproject/src/main/scala/HelloWorld.scala
89
+ - examples/building/extending_tasks/buildfile
90
+ - examples/building/extending_tasks/run.sh
91
+ - examples/building/extending_tasks/src/main/java/HelloWorld.java
92
+ - examples/building/jjtree/buildfile
93
+ - examples/building/jjtree/run.sh
94
+ - examples/building/jjtree/src/main/jjtree/com/acme/Example.java
95
+ - examples/building/resources/buildfile
96
+ - examples/building/resources/profiles.yaml
97
+ - examples/building/resources/run.sh
98
+ - examples/building/resources/src/main/property-style/ant.txt
99
+ - examples/building/resources/src/main/property-style/erb.txt
100
+ - examples/building/resources/src/main/property-style/maven.txt
101
+ - examples/building/resources/src/main/property-style/regex.txt
102
+ - examples/building/resources/src/main/property-style/ruby.txt
103
+ - examples/building/resources/src/main/resources/filter.txt
104
+ - examples/installing/buildfile
105
+ - examples/installing/run.sh
106
+ - examples/ivy4r/simple/buildfile
107
+ - examples/ivy4r/simple/ivy.xml
108
+ - examples/ivy4r/simple/run.sh
109
+ - examples/ivy4r/simple/ant-scripts/ivysettings.xml
110
+ - examples/ivy4r/simple/src/main/java/HelloWorld.java
111
+ - examples/packaging/include_exclude/buildfile
112
+ - examples/packaging/include_exclude/README
113
+ - examples/packaging/include_exclude/run.sh
114
+ - examples/packaging/include_exclude/src/main/java/HelloWorld.java
115
+ - examples/packaging/include_exclude/src/main/resources/some.include
116
+ - examples/packaging/include_exclude/src/main/resources/some_exclude.clu
117
+ - examples/packaging/include_exclude/src/main/resources/some_exclude.ex
118
+ - examples/packaging/include_exclude/src/main/resources/include/some_resource.txt
119
+ - examples/packaging/include_exclude/src/main/webapp/WEB-INF/web.xml
120
+ - examples/packaging/meta/ADDITIONAL
121
+ - examples/packaging/meta/buildfile
122
+ - examples/packaging/meta/DISCLAIMER
123
+ - examples/packaging/meta/NOTICE
124
+ - examples/packaging/meta/run.sh
125
+ - examples/packaging/meta/src/main/MANIFEST.MF
126
+ - examples/packaging/meta/src/main/java/HelloWorld.java
127
+ - examples/packaging/meta/src/main/resources/some_resource.txt
128
+ - examples/packaging/meta/src/main/webapp/WEB-INF/web.xml
129
+ - examples/packaging/multiple/buildfile
130
+ - examples/packaging/multiple/run.sh
131
+ - examples/packaging/multiple/src/main/java/HelloWorld.java
132
+ - examples/packaging/multiple/src/main/resources/some_resource.txt
133
+ - examples/packaging/multiple/src/main/webapp/WEB-INF/web.xml
134
+ - examples/projects/foo-bar/buildfile
135
+ - examples/projects/foo-bar/run.sh
136
+ - examples/projects/killer-app/buildfile
137
+ - examples/projects/killer-app/run.sh
138
+ - examples/projects/killer-app/teh-api/src/main/java/Example.java
139
+ - examples/projects/killer-app/teh-api/src/test/java/ExampleTest.java
140
+ - examples/projects/killer-app/teh-impl/src/main/java/Example.java
141
+ - examples/projects/killer-app/teh-impl/src/main/resources/META-INF/persistence.xml
142
+ - examples/projects/killer-app/teh-impl/src/test/java/ExampleTest.java
143
+ - examples/projects/silly/buildfile
144
+ - examples/projects/silly/run.sh
145
+ - examples/projects/task/buildfile
146
+ - examples/projects/task/run.sh
147
+ - examples/testing/failing/buildfile
148
+ - examples/testing/failing/run.sh
149
+ - examples/testing/failing/src/main/java/Example.java
150
+ - examples/testing/failing/src/test/java/FailingExampleTest.java
151
+ - examples/testing/frameworks/buildfile
152
+ - examples/testing/frameworks/run.sh
153
+ - examples/testing/frameworks/junit/src/main/java/Example.java
154
+ - examples/testing/frameworks/junit/src/test/java/ExampleTest.java
155
+ - examples/testing/frameworks/testng/src/main/java/Example.java
156
+ - examples/testing/frameworks/testng/src/test/java/ExampleTest.java
157
+ - examples/testing/include_exclude/buildfile
158
+ - examples/testing/include_exclude/run.sh
159
+ - examples/testing/include_exclude/src/main/java/Example.java
160
+ - examples/testing/include_exclude/src/test/java/ExampleTest.java
161
+ - examples/testing/include_exclude/src/test/java/FailingExampleTest.java
162
+ - examples/testing/include_exclude/src/test/java/de/phoet/IncludeTest.java
163
+ - examples/testing/integration/buildfile
164
+ - examples/testing/integration/run.sh
165
+ - examples/testing/integration/client/src/main/java/Example.java
166
+ - examples/testing/integration/client/src/test/java/ClientExampleTest.java
167
+ - examples/testing/integration/server/src/main/java/Example.java
168
+ - examples/testing/integration/server/src/test/java/ServerExampleTest.java
169
+ - examples/testing/running/buildfile
170
+ - examples/testing/running/run.sh
171
+ - examples/testing/running/client/src/main/java/Example.java
172
+ - examples/testing/running/client/src/test/java/ClientExampleTest.java
173
+ - examples/testing/running/server/src/main/java/Example.java
174
+ - examples/testing/running/server/src/test/java/ServerExampleTest.java
175
+ - features/artifacts.feature
176
+ - features/step_definitions/artifacts_steps.rb
177
+ - features/support/env.rb
178
+ - README.rdoc
179
+ - LICENSE
180
+ has_rdoc: true
181
+ homepage: http://github.com/phoet/buildr-examples
182
+ licenses: []
183
+
184
+ post_install_message:
185
+ rdoc_options:
186
+ - -a
187
+ - --inline-source
188
+ - --charset=UTF-8
189
+ require_paths:
190
+ - lib
191
+ required_ruby_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ segments:
196
+ - 0
197
+ version: "0"
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ segments:
203
+ - 0
204
+ version: "0"
205
+ requirements: []
206
+
207
+ rubyforge_project:
208
+ rubygems_version: 1.3.6
209
+ signing_key:
210
+ specification_version: 3
211
+ summary: Examples using Apache Buildr - the build system that doesn't suck!
212
+ test_files: []
213
+