buildr 1.4.16 → 1.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG +20 -0
  3. data/addon/buildr/bnd.rb +158 -158
  4. data/addon/buildr/checkstyle-report.xsl +87 -0
  5. data/addon/buildr/checkstyle.rb +213 -205
  6. data/addon/buildr/css_lint-report.xsl +83 -0
  7. data/addon/buildr/css_lint.rake +196 -0
  8. data/addon/buildr/custom_pom.rb +282 -0
  9. data/addon/buildr/drb.rb +0 -1
  10. data/addon/buildr/git_auto_version.rb +34 -34
  11. data/addon/buildr/gwt.rb +171 -171
  12. data/addon/buildr/hibernate.rb +8 -8
  13. data/addon/buildr/javancss.rb +155 -155
  14. data/addon/buildr/jaxb_xjc.rb +74 -74
  15. data/addon/buildr/jibx.rb +0 -1
  16. data/addon/buildr/org/apache/buildr/BuildrNail.java +2 -2
  17. data/addon/buildr/org/apache/buildr/JettyWrapper.java +3 -3
  18. data/addon/buildr/package_as_nsis.rb +2 -2
  19. data/addon/buildr/pmd.rb +166 -166
  20. data/addon/buildr/scss_lint-report.xsl +79 -0
  21. data/addon/buildr/scss_lint.rb +199 -0
  22. data/addon/buildr/wsgen.rb +4 -0
  23. data/doc/building.textile +3 -3
  24. data/doc/css/default.css +3 -3
  25. data/doc/css/print.css +1 -1
  26. data/doc/download.textile +18 -7
  27. data/doc/index.textile +8 -1
  28. data/doc/installing.textile +3 -3
  29. data/doc/languages.textile +0 -1
  30. data/doc/mailing_lists.textile +0 -4
  31. data/doc/more_stuff.textile +127 -3
  32. data/doc/preface.textile +1 -1
  33. data/doc/projects.textile +6 -6
  34. data/doc/releasing.textile +0 -1
  35. data/lib/buildr/clojure/shell.rb +0 -1
  36. data/lib/buildr/core/build.rb +16 -16
  37. data/lib/buildr/core/filter.rb +3 -3
  38. data/lib/buildr/core/jrebel.rb +0 -1
  39. data/lib/buildr/core/linux.rb +0 -1
  40. data/lib/buildr/core/run.rb +0 -1
  41. data/lib/buildr/core/shell.rb +0 -1
  42. data/lib/buildr/groovy/doc.rb +0 -1
  43. data/lib/buildr/ide/eclipse.rb +0 -2
  44. data/lib/buildr/ide/idea.rb +44 -8
  45. data/lib/buildr/java/bdd.rb +0 -1
  46. data/lib/buildr/java/commands.rb +2 -3
  47. data/lib/buildr/java/jruby.rb +2 -2
  48. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +5 -5
  49. data/lib/buildr/java/tests.rb +0 -1
  50. data/lib/buildr/packaging/artifact_namespace.rb +0 -2
  51. data/lib/buildr/resources/icons-license.txt +14 -17
  52. data/lib/buildr/scala/bdd.rb +0 -1
  53. data/lib/buildr/scala/compiler.rb +0 -1
  54. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
  55. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +0 -2
  56. data/lib/buildr/version.rb +1 -1
  57. data/rakelib/metrics.rake +3 -3
  58. data/rakelib/release.rake +8 -2
  59. data/spec/addon/bnd_spec.rb +383 -383
  60. data/spec/addon/custom_pom_spec.rb +149 -0
  61. data/spec/addon/drb_spec.rb +0 -1
  62. data/spec/addon/jaxb_xjc_spec.rb +130 -130
  63. data/spec/core/application_spec.rb +0 -1
  64. data/spec/core/build_spec.rb +1 -1
  65. data/spec/core/console_spec.rb +0 -1
  66. data/spec/core/doc_spec.rb +0 -1
  67. data/spec/core/extension_spec.rb +0 -1
  68. data/spec/core/generate_from_eclipse_spec.rb +9 -9
  69. data/spec/core/run_spec.rb +2 -3
  70. data/spec/core/shell_spec.rb +0 -1
  71. data/spec/ide/idea_spec.rb +1979 -1941
  72. data/spec/java/cobertura_spec.rb +6 -6
  73. data/spec/java/commands_spec.rb +11 -11
  74. data/spec/java/compiler_spec.rb +0 -1
  75. data/spec/java/doc_spec.rb +0 -1
  76. data/spec/java/ecj_spec.rb +1 -3
  77. data/spec/java/external_spec.rb +0 -2
  78. data/spec/java/java_spec.rb +3 -3
  79. data/spec/java/run_spec.rb +0 -1
  80. data/spec/java/tests_spec.rb +15 -0
  81. data/spec/xpath_matchers.rb +121 -120
  82. metadata +10 -2
@@ -0,0 +1,149 @@
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
+
17
+ require File.expand_path('../spec_helpers', File.dirname(__FILE__))
18
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'xpath_matchers'))
19
+
20
+ Sandbox.require_optional_extension 'buildr/custom_pom'
21
+
22
+ describe Buildr::CustomPom do
23
+
24
+ def xml_document(filename)
25
+ File.should be_exist(filename)
26
+ REXML::Document.new(File.read(filename))
27
+ end
28
+
29
+ def project_pom_xml(project)
30
+ xml_document(project.packages[0].pom.to_s)
31
+ end
32
+
33
+ def verify_license(pom_xml, name, url)
34
+ pom_xml.should match_xpath("/project/licenses/license/url[../name/text() = '#{name}']", url)
35
+ end
36
+
37
+ def dependency_xpath(artifact_id)
38
+ "/project/dependencies/dependency[artifactId/text() = '#{artifact_id}']"
39
+ end
40
+
41
+ def verify_dependency_group(pom_xml, artifact_id, group)
42
+ pom_xml.should match_xpath("#{dependency_xpath(artifact_id)}/groupId", group)
43
+ end
44
+
45
+ def verify_dependency_version(pom_xml, artifact_id, version)
46
+ pom_xml.should match_xpath("#{dependency_xpath(artifact_id)}/version", version)
47
+ end
48
+
49
+ def verify_dependency_scope(pom_xml, artifact_id, scope)
50
+ pom_xml.should match_xpath("#{dependency_xpath(artifact_id)}/scope", scope)
51
+ end
52
+
53
+ def verify_dependency_optional(pom_xml, artifact_id, optional)
54
+ pom_xml.should match_xpath("#{dependency_xpath(artifact_id)}/optional", optional)
55
+ end
56
+
57
+ def verify_dependency(pom_xml, artifact_id, group, version, scope, optional)
58
+ verify_dependency_group(pom_xml, artifact_id, group)
59
+ verify_dependency_version(pom_xml, artifact_id, version)
60
+ verify_dependency_scope(pom_xml, artifact_id, scope)
61
+ verify_dependency_optional(pom_xml, artifact_id, optional)
62
+ end
63
+
64
+ describe "with explicitly specified pom details" do
65
+ before do
66
+ ['id-provided', 'id-optional', 'id-runtime', 'id-test'].each do |artifact_id|
67
+ artifact("group:#{artifact_id}:jar:1.0") do |t|
68
+ mkdir_p File.dirname(t.to_s)
69
+ Zip::ZipOutputStream.open t.to_s do |zip|
70
+ zip.put_next_entry 'empty.txt'
71
+ end
72
+ end
73
+ end
74
+ write 'src/main/java/Example.java', "public class Example {}"
75
+
76
+ @foo = define 'foo' do
77
+ project.group = 'org.myproject'
78
+ project.version = '1.0'
79
+
80
+ pom.licenses['The Apache Software License, Version 2.0'] = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
81
+ pom.licenses['GNU General Public License (GPL) version 3.0'] = 'http://www.gnu.org/licenses/gpl-3.0.html'
82
+ pom.scm_connection = pom.scm_developer_connection = 'scm:git:git@github.com:jbloggs/myproject'
83
+ pom.scm_url = 'git@github.com:jbloggs/myproject'
84
+ pom.url = 'https://github.com/jbloggs/myproject'
85
+ pom.issues_url = 'https://github.com/jbloggs/myproject/issues'
86
+ pom.issues_system = 'GitHub Issues'
87
+ pom.add_developer('jbloggs', 'Joe Bloggs', 'jbloggs@example.com', ['Project Lead'])
88
+ pom.provided_dependencies = ['group:id-provided:jar:1.0']
89
+ pom.optional_dependencies = ['group:id-optional:jar:1.0']
90
+
91
+ compile.with 'group:id-runtime:jar:1.0', 'group:id-optional:jar:1.0', 'group:id-provided:jar:1.0'
92
+
93
+ test.with 'group:id-test:jar:1.0'
94
+
95
+ package(:jar)
96
+ end
97
+ task('package').invoke
98
+ @pom_xml = project_pom_xml(@foo)
99
+ #$stderr.puts @pom_xml.to_s
100
+ end
101
+
102
+ it "has correct static metadata" do
103
+ @pom_xml.should match_xpath("/project/modelVersion", '4.0.0')
104
+ @pom_xml.should match_xpath("/project/parent/groupId", 'org.sonatype.oss')
105
+ @pom_xml.should match_xpath("/project/parent/artifactId", 'oss-parent')
106
+ @pom_xml.should match_xpath("/project/parent/version", '7')
107
+ end
108
+
109
+ it "has correct project level metadata" do
110
+ @pom_xml.should match_xpath("/project/groupId", 'org.myproject')
111
+ @pom_xml.should match_xpath("/project/artifactId", 'foo')
112
+ @pom_xml.should match_xpath("/project/version", '1.0')
113
+ @pom_xml.should match_xpath("/project/packaging", 'jar')
114
+ @pom_xml.should match_xpath("/project/name", 'foo')
115
+ @pom_xml.should match_xpath("/project/description", 'foo')
116
+ @pom_xml.should match_xpath("/project/url", 'https://github.com/jbloggs/myproject')
117
+ end
118
+
119
+ it "has correct scm details" do
120
+ @pom_xml.should match_xpath("/project/scm/connection", 'scm:git:git@github.com:jbloggs/myproject')
121
+ @pom_xml.should match_xpath("/project/scm/developerConnection", 'scm:git:git@github.com:jbloggs/myproject')
122
+ @pom_xml.should match_xpath("/project/scm/url", 'git@github.com:jbloggs/myproject')
123
+ end
124
+
125
+ it "has correct issueManagement details" do
126
+ @pom_xml.should match_xpath("/project/issueManagement/url", 'https://github.com/jbloggs/myproject/issues')
127
+ @pom_xml.should match_xpath("/project/issueManagement/system", 'GitHub Issues')
128
+ end
129
+
130
+ it "has correct developers details" do
131
+ @pom_xml.should match_xpath("/project/developers/developer/id", 'jbloggs')
132
+ @pom_xml.should match_xpath("/project/developers/developer/name", 'Joe Bloggs')
133
+ @pom_xml.should match_xpath("/project/developers/developer/email", 'jbloggs@example.com')
134
+ @pom_xml.should match_xpath("/project/developers/developer/roles/role", 'Project Lead')
135
+ end
136
+
137
+ it "has correct license details" do
138
+ verify_license(@pom_xml, 'The Apache Software License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
139
+ verify_license(@pom_xml, 'GNU General Public License (GPL) version 3.0', 'http://www.gnu.org/licenses/gpl-3.0.html')
140
+ end
141
+
142
+ it "has correct dependency details" do
143
+ verify_dependency(@pom_xml, 'id-runtime', 'group', '1.0', nil, nil)
144
+ verify_dependency(@pom_xml, 'id-optional', 'group', '1.0', nil, 'true')
145
+ verify_dependency(@pom_xml, 'id-provided', 'group', '1.0', 'provided', nil)
146
+ verify_dependency(@pom_xml, 'id-test', 'group', '1.0', 'test', nil)
147
+ end
148
+ end
149
+ end
@@ -325,4 +325,3 @@ describe Buildr::DRbApplication do
325
325
 
326
326
  end
327
327
  end
328
-
@@ -1,130 +1,130 @@
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
- require File.expand_path('../spec_helpers', File.dirname(__FILE__))
17
-
18
- if Java.java.lang.System.getProperty("java.runtime.version") >= "1.6"
19
- Sandbox.require_optional_extension 'buildr/jaxb_xjc'
20
-
21
- XSD_CONTENT = <<XSD
22
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
23
-
24
- <xsd:simpleType name="agency">
25
- <xsd:restriction base="xsd:string">
26
- <xsd:enumeration value="DSE"/>
27
- <xsd:enumeration value="PV"/>
28
- <xsd:enumeration value="CFA"/>
29
- <xsd:enumeration value="DPI"/>
30
- <xsd:enumeration value="VF"/>
31
- <xsd:enumeration value="Unknown"/>
32
- </xsd:restriction>
33
- </xsd:simpleType>
34
-
35
- <xsd:complexType name="latLongCoordinate">
36
- <xsd:all>
37
- <xsd:element name="latitude" type="xsd:float"/>
38
- <xsd:element name="longitude" type="xsd:float"/>
39
- </xsd:all>
40
- </xsd:complexType>
41
-
42
- <xsd:element name="wildfire">
43
- <xsd:complexType>
44
- <xsd:sequence>
45
- <xsd:element name="name" type="xsd:string"/>
46
- <xsd:element name="district" type="xsd:string">
47
- <xsd:annotation>
48
- <xsd:documentation xml:lang="en">
49
- The name of the district WITHOUT the "FIRE DISTRICT" suffix.
50
- </xsd:documentation>
51
- </xsd:annotation>
52
- </xsd:element>
53
- <xsd:element name="status">
54
- <xsd:simpleType>
55
- <xsd:restriction base="xsd:string">
56
- <xsd:enumeration value="GOING"/>
57
- <xsd:enumeration value="CONTAINED"/>
58
- <xsd:enumeration value="UNDER CONTROL - 1"/>
59
- <xsd:enumeration value="UNDER CONTROL - 2"/>
60
- <xsd:enumeration value="SAFE"/>
61
- <xsd:enumeration value="SAFE - OVERRUN"/>
62
- <xsd:enumeration value="SAFE - NOT FOUND"/>
63
- <xsd:enumeration value="SAFE - FALSE ALARM"/>
64
- <xsd:enumeration value="NOT FOUND"/>
65
- <xsd:enumeration value="UNKNOWN"/>
66
- </xsd:restriction>
67
- </xsd:simpleType>
68
- </xsd:element>
69
- <xsd:element name="reported-at" type="xsd:dateTime"/>
70
- <xsd:element name="lead-agency" type="xsd:string"/>
71
- <xsd:element name="origin" type="latLongCoordinate" minOccurs="0">
72
- <xsd:annotation>
73
- <xsd:documentation xml:lang="en">
74
- This is a grid reference in lat/long format.
75
- </xsd:documentation>
76
- </xsd:annotation>
77
- </xsd:element>
78
- <xsd:element name="area" type="xsd:decimal" minOccurs="0"/>
79
- <xsd:element name="number">
80
- <xsd:simpleType>
81
- <xsd:restriction base="xsd:integer">
82
- <xsd:minInclusive value="0"/>
83
- </xsd:restriction>
84
- </xsd:simpleType>
85
- </xsd:element>
86
- <xsd:element name="global-id">
87
- <xsd:simpleType>
88
- <xsd:restriction base="xsd:integer">
89
- <xsd:minInclusive value="0"/>
90
- </xsd:restriction>
91
- </xsd:simpleType>
92
- </xsd:element>
93
- <xsd:element name="data-source" type="xsd:string"/>
94
- </xsd:sequence>
95
- </xsd:complexType>
96
- </xsd:element>
97
- </xsd:schema>
98
- XSD
99
-
100
- describe Buildr::JaxbXjc do
101
- describe "compiled with specified xsd" do
102
- before do
103
- write "src/main/xsd/wildfire-1.3.xsd", XSD_CONTENT
104
- @foo = define "foo" do
105
- project.version = "2.1.3"
106
- compile.from compile_jaxb("src/main/xsd/wildfire-1.3.xsd", "-quiet", :package => "org.foo.api")
107
- package :jar
108
- end
109
- task('compile').invoke
110
- end
111
-
112
- it "produce .java files in the correct location" do
113
- File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Agency.java"))
114
- File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/LatLongCoordinate.java"))
115
- File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/ObjectFactory.java"))
116
- File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Wildfire.java"))
117
- end
118
-
119
- it "produce .class files in the correct location" do
120
- File.should be_exist(@foo._("target/classes/org/foo/api/Agency.class"))
121
- File.should be_exist(@foo._("target/classes/org/foo/api/LatLongCoordinate.class"))
122
- File.should be_exist(@foo._("target/classes/org/foo/api/ObjectFactory.class"))
123
- File.should be_exist(@foo._("target/classes/org/foo/api/Wildfire.class"))
124
- end
125
- end
126
- end
127
-
128
- elsif Buildr::VERSION >= '1.5'
129
- raise "JVM version guard in #{__FILE__} should be removed since it is assumed that Java 1.5 is no longer supported."
130
- end
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
+ require File.expand_path('../spec_helpers', File.dirname(__FILE__))
17
+
18
+ if Java.java.lang.System.getProperty("java.runtime.version") >= "1.6"
19
+ Sandbox.require_optional_extension 'buildr/jaxb_xjc'
20
+
21
+ XSD_CONTENT = <<XSD
22
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
23
+
24
+ <xsd:simpleType name="agency">
25
+ <xsd:restriction base="xsd:string">
26
+ <xsd:enumeration value="DSE"/>
27
+ <xsd:enumeration value="PV"/>
28
+ <xsd:enumeration value="CFA"/>
29
+ <xsd:enumeration value="DPI"/>
30
+ <xsd:enumeration value="VF"/>
31
+ <xsd:enumeration value="Unknown"/>
32
+ </xsd:restriction>
33
+ </xsd:simpleType>
34
+
35
+ <xsd:complexType name="latLongCoordinate">
36
+ <xsd:all>
37
+ <xsd:element name="latitude" type="xsd:float"/>
38
+ <xsd:element name="longitude" type="xsd:float"/>
39
+ </xsd:all>
40
+ </xsd:complexType>
41
+
42
+ <xsd:element name="wildfire">
43
+ <xsd:complexType>
44
+ <xsd:sequence>
45
+ <xsd:element name="name" type="xsd:string"/>
46
+ <xsd:element name="district" type="xsd:string">
47
+ <xsd:annotation>
48
+ <xsd:documentation xml:lang="en">
49
+ The name of the district WITHOUT the "FIRE DISTRICT" suffix.
50
+ </xsd:documentation>
51
+ </xsd:annotation>
52
+ </xsd:element>
53
+ <xsd:element name="status">
54
+ <xsd:simpleType>
55
+ <xsd:restriction base="xsd:string">
56
+ <xsd:enumeration value="GOING"/>
57
+ <xsd:enumeration value="CONTAINED"/>
58
+ <xsd:enumeration value="UNDER CONTROL - 1"/>
59
+ <xsd:enumeration value="UNDER CONTROL - 2"/>
60
+ <xsd:enumeration value="SAFE"/>
61
+ <xsd:enumeration value="SAFE - OVERRUN"/>
62
+ <xsd:enumeration value="SAFE - NOT FOUND"/>
63
+ <xsd:enumeration value="SAFE - FALSE ALARM"/>
64
+ <xsd:enumeration value="NOT FOUND"/>
65
+ <xsd:enumeration value="UNKNOWN"/>
66
+ </xsd:restriction>
67
+ </xsd:simpleType>
68
+ </xsd:element>
69
+ <xsd:element name="reported-at" type="xsd:dateTime"/>
70
+ <xsd:element name="lead-agency" type="xsd:string"/>
71
+ <xsd:element name="origin" type="latLongCoordinate" minOccurs="0">
72
+ <xsd:annotation>
73
+ <xsd:documentation xml:lang="en">
74
+ This is a grid reference in lat/long format.
75
+ </xsd:documentation>
76
+ </xsd:annotation>
77
+ </xsd:element>
78
+ <xsd:element name="area" type="xsd:decimal" minOccurs="0"/>
79
+ <xsd:element name="number">
80
+ <xsd:simpleType>
81
+ <xsd:restriction base="xsd:integer">
82
+ <xsd:minInclusive value="0"/>
83
+ </xsd:restriction>
84
+ </xsd:simpleType>
85
+ </xsd:element>
86
+ <xsd:element name="global-id">
87
+ <xsd:simpleType>
88
+ <xsd:restriction base="xsd:integer">
89
+ <xsd:minInclusive value="0"/>
90
+ </xsd:restriction>
91
+ </xsd:simpleType>
92
+ </xsd:element>
93
+ <xsd:element name="data-source" type="xsd:string"/>
94
+ </xsd:sequence>
95
+ </xsd:complexType>
96
+ </xsd:element>
97
+ </xsd:schema>
98
+ XSD
99
+
100
+ describe Buildr::JaxbXjc do
101
+ describe "compiled with specified xsd" do
102
+ before do
103
+ write "src/main/xsd/wildfire-1.3.xsd", XSD_CONTENT
104
+ @foo = define "foo" do
105
+ project.version = "2.1.3"
106
+ compile.from compile_jaxb("src/main/xsd/wildfire-1.3.xsd", "-quiet", :package => "org.foo.api")
107
+ package :jar
108
+ end
109
+ task('compile').invoke
110
+ end
111
+
112
+ it "produce .java files in the correct location" do
113
+ File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Agency.java"))
114
+ File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/LatLongCoordinate.java"))
115
+ File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/ObjectFactory.java"))
116
+ File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Wildfire.java"))
117
+ end
118
+
119
+ it "produce .class files in the correct location" do
120
+ File.should be_exist(@foo._("target/classes/org/foo/api/Agency.class"))
121
+ File.should be_exist(@foo._("target/classes/org/foo/api/LatLongCoordinate.class"))
122
+ File.should be_exist(@foo._("target/classes/org/foo/api/ObjectFactory.class"))
123
+ File.should be_exist(@foo._("target/classes/org/foo/api/Wildfire.class"))
124
+ end
125
+ end
126
+ end
127
+
128
+ elsif Buildr::VERSION >= '1.5'
129
+ raise "JVM version guard in #{__FILE__} should be removed since it is assumed that Java 1.5 is no longer supported."
130
+ end
@@ -575,4 +575,3 @@ describe Rake do
575
575
  end
576
576
  end
577
577
  end
578
-
@@ -227,7 +227,7 @@ A README
227
227
  it 'should return an empty array on a clean repository' do
228
228
  Hg.should_receive(:`).with('hg status').and_return "\n"
229
229
  Hg.uncommitted_files.should be_empty
230
- end
230
+ end
231
231
  end
232
232
 
233
233
  describe '#remote' do
@@ -63,4 +63,3 @@ describe Buildr::Console do
63
63
  end
64
64
  end
65
65
  end
66
-
@@ -192,4 +192,3 @@ describe Project, '#doc' do
192
192
  project('foo').doc.invoke
193
193
  end
194
194
  end
195
-
@@ -198,4 +198,3 @@ module ExtensionThreeFour
198
198
  project.after_order << :four
199
199
  end
200
200
  end
201
-
@@ -16,7 +16,7 @@
16
16
  require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
17
17
 
18
18
  module EclipseHelper
19
-
19
+
20
20
  def setupExample(group, projectName, options = {})
21
21
  options[:symName] ? symName = options[:symName] :symName = File.basename(projectName)
22
22
  requiredPlugins = nil
@@ -102,12 +102,12 @@ describe Buildr::Generate do
102
102
  include EclipseHelper
103
103
  describe 'it should find a single eclipse project' do
104
104
  top = "top_#{__LINE__}"
105
-
105
+
106
106
  before do
107
107
  setupExample(top, 'single')
108
108
  File.open(File.join(top, 'buildfile'), 'w') { |file| file.write Generate.from_eclipse(File.join(Dir.pwd, top)).join("\n") }
109
109
  end
110
-
110
+
111
111
  it 'should create a valid buildfile' do
112
112
  define('first')
113
113
  File.exists?(File.join(top, 'single', '.project')).should be_true
@@ -149,7 +149,7 @@ describe Buildr::Generate do
149
149
  file(buildFile).should contain('layout[:source, :main, :scala]')
150
150
  lambda { Buildr.application.run }.should_not raise_error
151
151
  end
152
-
152
+
153
153
  it "should pass output in build.properties to layout[:target, :main], etc" do
154
154
  define('layout_target')
155
155
  buildFile = File.join(top, 'buildfile')
@@ -161,7 +161,7 @@ describe Buildr::Generate do
161
161
  file(buildFile).should contain('layout[:target, :main, :scala]')
162
162
  lambda { Buildr.application.run }.should_not raise_error
163
163
  end
164
-
164
+
165
165
  it "should package an eclipse plugin" do
166
166
  define('layout_target')
167
167
  buildFile = File.join(top, 'buildfile')
@@ -186,14 +186,14 @@ describe Buildr::Generate do
186
186
  lambda { Buildr.application.run }.should_not raise_error
187
187
  end
188
188
  end
189
-
189
+
190
190
  describe 'it should accecpt singleton SymbolicName in MANIFEST.MF' do
191
191
  top = "top_#{__LINE__}"
192
192
  before do
193
193
  setupExample(top, 'single', { :symName => 'singleSymbolicName;singleton:=true'})
194
194
  File.open(File.join(top, 'buildfile'), 'w') { |file| file.write Generate.from_eclipse(File.join(Dir.pwd, top)).join("\n") }
195
195
  end
196
-
196
+
197
197
  it "should not get confused if SymbolicName in MANIFEST.MF is a singleton:=true" do
198
198
  buildFile = File.join(top, 'buildfile')
199
199
  file(buildFile).should exist
@@ -220,7 +220,7 @@ describe Buildr::Generate do
220
220
  file(buildFile).should contain('define "single"')
221
221
  lambda { Buildr.application.run }.should_not raise_error
222
222
  end
223
-
223
+
224
224
  it "should correct the path for a nested plugin" do
225
225
  define('base_dir')
226
226
  buildFile = File.join(top, 'buildfile')
@@ -264,7 +264,7 @@ describe Buildr::Generate do
264
264
  file(buildFile).should contain(/define "second".*do.*dependencies << projects\("first"\).* end/m)
265
265
  lambda { Buildr.application.run }.should_not raise_error
266
266
  end
267
-
267
+
268
268
  # Fragments are only supported with buildr4osi which is not (yet?) part of buildr
269
269
  it 'should skip fragments.' do
270
270
  define('base_dir')