buildr 1.4.1-x86-mswin32 → 1.4.2-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/CHANGELOG +68 -11
  2. data/_buildr +2 -0
  3. data/addon/buildr/hibernate.rb +8 -5
  4. data/addon/buildr/jetty.rb +1 -1
  5. data/addon/buildr/openjpa.rb +0 -2
  6. data/addon/buildr/xmlbeans.rb +1 -1
  7. data/buildr.gemspec +13 -9
  8. data/doc/_layouts/default.html +3 -1
  9. data/doc/contributing.textile +10 -2
  10. data/doc/css/default.css +6 -6
  11. data/doc/download.textile +7 -7
  12. data/doc/languages.textile +2 -2
  13. data/doc/more_stuff.textile +41 -33
  14. data/doc/packaging.textile +6 -3
  15. data/doc/releasing.textile +116 -0
  16. data/doc/scripts/install-linux.sh +7 -6
  17. data/doc/testing.textile +14 -0
  18. data/lib/buildr.rb +2 -2
  19. data/lib/buildr/core.rb +0 -6
  20. data/lib/buildr/core/application.rb +25 -2
  21. data/lib/buildr/core/build.rb +66 -15
  22. data/lib/buildr/core/compile.rb +10 -1
  23. data/lib/buildr/core/filter.rb +1 -1
  24. data/lib/buildr/core/progressbar.rb +8 -3
  25. data/lib/buildr/core/test.rb +57 -6
  26. data/lib/buildr/core/transports.rb +18 -13
  27. data/lib/buildr/core/util.rb +19 -3
  28. data/lib/buildr/groovy/compiler.rb +2 -2
  29. data/lib/buildr/ide/eclipse.rb +32 -12
  30. data/lib/buildr/java/ant.rb +3 -3
  31. data/lib/buildr/java/bdd.rb +1 -2
  32. data/lib/buildr/java/cobertura.rb +10 -9
  33. data/lib/buildr/java/commands.rb +22 -21
  34. data/lib/buildr/java/compiler.rb +2 -2
  35. data/lib/buildr/java/doc.rb +1 -1
  36. data/lib/buildr/java/ecj.rb +71 -0
  37. data/lib/buildr/java/emma.rb +1 -1
  38. data/lib/buildr/java/external.rb +9 -9
  39. data/lib/buildr/java/jruby.rb +5 -0
  40. data/lib/buildr/java/packaging.rb +4 -3
  41. data/lib/buildr/java/rjb.rb +4 -6
  42. data/lib/buildr/java/tests.rb +9 -4
  43. data/lib/buildr/packaging/archive.rb +7 -3
  44. data/lib/buildr/packaging/artifact.rb +153 -38
  45. data/lib/buildr/packaging/gems.rb +2 -3
  46. data/lib/buildr/packaging/package.rb +19 -12
  47. data/lib/buildr/packaging/tar.rb +1 -1
  48. data/lib/buildr/packaging/ziptask.rb +1 -1
  49. data/lib/buildr/scala/bdd.rb +7 -3
  50. data/lib/buildr/scala/compiler.rb +2 -2
  51. data/lib/buildr/scala/doc.rb +3 -3
  52. data/lib/buildr/scala/tests.rb +7 -3
  53. data/lib/buildr/version.rb +18 -0
  54. data/rakelib/all-in-one.rake +1 -1
  55. data/rakelib/doc.rake +13 -3
  56. data/rakelib/metrics.rake +39 -0
  57. data/spec/core/application_spec.rb +13 -12
  58. data/spec/core/build_spec.rb +166 -7
  59. data/spec/core/cc_spec.rb +1 -1
  60. data/spec/core/checks_spec.rb +1 -1
  61. data/spec/core/common_spec.rb +10 -1
  62. data/spec/core/compile_spec.rb +1 -1
  63. data/spec/core/extension_spec.rb +1 -1
  64. data/spec/core/generate_spec.rb +1 -1
  65. data/spec/core/project_spec.rb +1 -1
  66. data/spec/core/test_spec.rb +124 -11
  67. data/spec/core/transport_spec.rb +10 -3
  68. data/spec/core/util_spec.rb +18 -2
  69. data/spec/groovy/bdd_spec.rb +1 -1
  70. data/spec/groovy/compiler_spec.rb +3 -3
  71. data/spec/ide/eclipse_spec.rb +63 -1
  72. data/spec/ide/idea7x_spec.rb +1 -1
  73. data/spec/java/ant_spec.rb +1 -1
  74. data/spec/java/bdd_spec.rb +1 -1
  75. data/spec/java/cobertura_spec.rb +29 -2
  76. data/spec/java/commands_spec.rb +61 -2
  77. data/spec/java/compiler_spec.rb +3 -3
  78. data/spec/java/ecj_spec.rb +115 -0
  79. data/spec/java/emma_spec.rb +1 -1
  80. data/spec/java/external_spec.rb +10 -8
  81. data/spec/java/java_spec.rb +14 -6
  82. data/spec/java/packaging_spec.rb +41 -15
  83. data/spec/java/test_coverage_helper.rb +1 -1
  84. data/spec/java/tests_spec.rb +1 -1
  85. data/spec/packaging/archive_spec.rb +12 -1
  86. data/spec/packaging/artifact_namespace_spec.rb +1 -1
  87. data/spec/packaging/artifact_spec.rb +197 -7
  88. data/spec/packaging/packaging_spec.rb +12 -12
  89. data/spec/sandbox.rb +8 -3
  90. data/spec/scala/bdd_spec.rb +3 -3
  91. data/spec/scala/compiler_spec.rb +7 -7
  92. data/spec/scala/scala.rb +3 -3
  93. data/spec/scala/tests_spec.rb +3 -3
  94. data/spec/spec_helpers.rb +11 -1
  95. data/spec/version_requirement_spec.rb +1 -1
  96. metadata +220 -85
  97. data/rakelib/jekylltask.rb +0 -120
data/spec/core/cc_spec.rb CHANGED
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
  module CCHelper
20
20
  def setup_cc
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  describe Project, 'check task' do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
  describe Buildr.method(:struct) do
20
20
  before do
@@ -539,6 +539,15 @@ describe Buildr::Filter do
539
539
  (File.stat(file).mode & 0o200).should == 0o200
540
540
  end
541
541
  end
542
+
543
+ it 'should preserve mode bits except readable' do
544
+ pending "Pending the release of the fix for JRUBY-4927" if RUBY_PLATFORM =~ /java/
545
+ Dir['src/*'].each { |file| File.chmod(0o755, file) }
546
+ @filter.from('src').into('target').run
547
+ Dir['target/*'].sort.each do |file|
548
+ (File.stat(file).mode & 0o755).should == 0o755
549
+ end
550
+ end
542
551
  end
543
552
 
544
553
  describe Filter::Mapper do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  module CompilerHelper
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  describe Extension do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  describe Buildr::Generate do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  describe Project do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  module TestHelper
@@ -758,25 +758,25 @@ describe Rake::Task, 'test' do
758
758
  options.test = :all
759
759
  lambda { task('test').invoke rescue nil }.should run_tasks('foo:test', 'bar:test')
760
760
  end
761
-
761
+
762
762
  it 'should ignore failure in subprojects if options.test is :all' do
763
763
  define('foo') {
764
- define('p1') { test { fail } }
765
- define('p2') { test { } }
766
- define('p3') { test { fail } }
764
+ define('p1') { test { fail } }
765
+ define('p2') { test { } }
766
+ define('p3') { test { fail } }
767
767
  }
768
- define('bar') { test { fail } }
768
+ define('bar') { test { fail } }
769
769
  options.test = :all
770
770
  lambda { task('test').invoke rescue nil }.should run_tasks('foo:p1:test', 'foo:p2:test', 'foo:p3:test', 'bar:test')
771
771
  end
772
-
772
+
773
773
  it 'should ignore failure in subprojects if environment variable test is \'all\'' do
774
774
  define('foo') {
775
- define('p1') { test { fail } }
776
- define('p2') { test { } }
777
- define('p3') { test { fail } }
775
+ define('p1') { test { fail } }
776
+ define('p2') { test { } }
777
+ define('p3') { test { fail } }
778
778
  }
779
- define('bar') { test { fail } }
779
+ define('bar') { test { fail } }
780
780
  ENV['test'] = 'all'
781
781
  lambda { task('test').invoke rescue nil }.should run_tasks('foo:p1:test', 'foo:p2:test', 'foo:p3:test', 'bar:test')
782
782
  end
@@ -904,6 +904,80 @@ describe 'test rule' do
904
904
  project('foo').test.tests.should include('something')
905
905
  end
906
906
 
907
+ it 'should not execute excluded tests' do
908
+ define 'foo' do
909
+ test.using(:junit)
910
+ test.instance_eval { @framework.stub!(:tests).and_return(['something', 'nothing']) }
911
+ end
912
+ task('test:*,-nothing').invoke
913
+ project('foo').test.tests.should include('something')
914
+ project('foo').test.tests.should_not include('nothing')
915
+ end
916
+
917
+ it 'should not execute tests in excluded package' do
918
+ write 'src/test/java/com/example/foo/TestSomething.java',
919
+ 'package com.example.foo; public class TestSomething extends junit.framework.TestCase { public void testNothing() {} }'
920
+ write 'src/test/java/com/example/bar/TestFails.java',
921
+ 'package com.example.bar; public class TestFails extends junit.framework.TestCase { public void testFailure() { fail(); } }'
922
+ define 'foo' do
923
+ test.using(:junit)
924
+ end
925
+ task('test:-com.example.bar').invoke
926
+ project('foo').test.tests.should include('com.example.foo.TestSomething')
927
+ project('foo').test.tests.should_not include('com.example.bar.TestFails')
928
+ end
929
+
930
+ it 'should not execute excluded tests with wildcards' do
931
+ define 'foo' do
932
+ test.using(:junit)
933
+ test.instance_eval { @framework.stub!(:tests).and_return(['something', 'nothing']) }
934
+ end
935
+ task('test:something,-s*,-n*').invoke
936
+ project('foo').test.tests.should_not include('something')
937
+ project('foo').test.tests.should_not include('nothing')
938
+ end
939
+
940
+ it 'should execute all tests except excluded tests' do
941
+ define 'foo' do
942
+ test.using(:junit)
943
+ test.instance_eval { @framework.stub!(:tests).and_return(['something', 'anything', 'nothing']) }
944
+ end
945
+ task('test:-nothing').invoke
946
+ project('foo').test.tests.should include('something', 'anything')
947
+ project('foo').test.tests.should_not include('nothing')
948
+ end
949
+
950
+ it 'should ignore exclusions in buildfile' do
951
+ define 'foo' do
952
+ test.using(:junit)
953
+ test.exclude 'something'
954
+ test.instance_eval { @framework.stub!(:tests).and_return(['something', 'anything', 'nothing']) }
955
+ end
956
+ task('test:-nothing').invoke
957
+ project('foo').test.tests.should include('something', 'anything')
958
+ project('foo').test.tests.should_not include('nothing')
959
+ end
960
+
961
+ it 'should ignore inclusions in buildfile' do
962
+ define 'foo' do
963
+ test.using(:junit)
964
+ test.include 'something'
965
+ test.instance_eval { @framework.stub!(:tests).and_return(['something', 'nothing']) }
966
+ end
967
+ task('test:nothing').invoke
968
+ project('foo').test.tests.should include('nothing')
969
+ project('foo').test.tests.should_not include('something')
970
+ end
971
+
972
+ it 'should not execute a test if it''s both included and excluded' do
973
+ define 'foo' do
974
+ test.using(:junit)
975
+ test.instance_eval { @framework.stub!(:tests).and_return(['nothing']) }
976
+ end
977
+ task('test:nothing,-nothing').invoke
978
+ project('foo').test.tests.should_not include('nothing')
979
+ end
980
+
907
981
  it 'should not update the last successful test run timestamp' do
908
982
  define 'foo' do
909
983
  test.using(:junit)
@@ -946,6 +1020,45 @@ describe 'test failed' do
946
1020
  project('foo').test.tests.should_not include('PassingTest')
947
1021
  end
948
1022
 
1023
+ it 'should run failed tests, respecting excluded tests' do
1024
+ define 'foo' do
1025
+ test.using(:junit).exclude('ExcludedTest')
1026
+ test.instance_eval do
1027
+ @framework.stub!(:tests).and_return(['FailingTest', 'PassingTest', 'ExcludedTest'])
1028
+ @framework.stub!(:run).and_return(['PassingTest'])
1029
+ end
1030
+ end
1031
+ write project('foo').path_to(:target, "junit-failed"), "FailingTest\nExcludedTest"
1032
+ task('test:failed').invoke rescue nil
1033
+ project('foo').test.tests.should include('FailingTest')
1034
+ project('foo').test.tests.should_not include('ExcludedTest')
1035
+ end
1036
+
1037
+ it 'should run only the tests that failed the last time, even when failed tests have dependencies' do
1038
+ define 'parent' do
1039
+ define 'foo' do
1040
+ test.using(:junit)
1041
+ test.instance_eval do
1042
+ @framework.stub!(:tests).and_return(['PassingTest'])
1043
+ @framework.stub!(:run).and_return(['PassingTest'])
1044
+ end
1045
+ end
1046
+ define 'bar' do
1047
+ test.using(:junit)
1048
+ test.enhance ["parent:foo:test"]
1049
+ test.instance_eval do
1050
+ @framework.stub!(:tests).and_return(['FailingTest', 'PassingTest'])
1051
+ @framework.stub!(:run).and_return(['PassingTest'])
1052
+ end
1053
+ end
1054
+ end
1055
+ write project('parent:bar').path_to(:target, "junit-failed"), "FailingTest"
1056
+ task('test:failed').invoke rescue nil
1057
+ project('parent:foo').test.tests.should_not include('PassingTest')
1058
+ project('parent:bar').test.tests.should include('FailingTest')
1059
+ project('parent:bar').test.tests.should_not include('PassingTest')
1060
+ end
1061
+
949
1062
  end
950
1063
 
951
1064
 
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  describe URI, '#download' do
@@ -63,6 +63,13 @@ describe URI, '#upload' do
63
63
  @uri = URI(URI.escape("file://#{File.expand_path(@target)}"))
64
64
  end
65
65
 
66
+ it 'should preserve file permissions if uploading to a file' do
67
+ File.chmod(0666, @source)
68
+ s = File.stat(@source).mode
69
+ @uri.upload @source
70
+ File.stat(@target).mode.should eql(s)
71
+ end
72
+
66
73
  it 'should upload file if found' do
67
74
  @uri.upload @source
68
75
  file(@target).should contain(@content)
@@ -452,14 +459,14 @@ describe URI::SFTP, '#read' do
452
459
 
453
460
  it 'should read contents of file and return it' do
454
461
  file = mock('Net::SFTP::Operations::File')
455
- file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content, nil)
462
+ file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
456
463
  @file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
457
464
  @uri.read.should eql(@content)
458
465
  end
459
466
 
460
467
  it 'should read contents of file and pass it to block' do
461
468
  file = mock('Net::SFTP::Operations::File')
462
- file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content, nil)
469
+ file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
463
470
  @file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
464
471
  content = ''
465
472
  @uri.read do |chunk|
@@ -14,7 +14,23 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
+
19
+ describe Buildr do
20
+ describe "#replace_extension" do
21
+ it "should replace filename extensions" do
22
+ replace = lambda { |filename, ext| Util.replace_extension(filename, ext) }
23
+
24
+ replace["foo.zip", "txt"].should eql("foo.txt")
25
+ replace["foo.", "txt"].should eql("foo.txt")
26
+ replace["foo", "txt"].should eql("foo.txt")
27
+
28
+ replace["bar/foo.zip", "txt"].should eql("bar/foo.txt")
29
+ replace["bar/foo.", "txt"].should eql("bar/foo.txt")
30
+ replace["bar/foo", "txt"].should eql("bar/foo.txt")
31
+ end
32
+ end
33
+ end
18
34
 
19
35
  describe Hash do
20
36
  describe "#only" do
@@ -68,7 +84,7 @@ end
68
84
 
69
85
  describe File do
70
86
  # Quite a few of the other specs depend on File#utime working correctly.
71
- # These specs validate that utime is working as expected.
87
+ # These specs validate that utime is working as expected.
72
88
  describe "#utime" do
73
89
  it "should update mtime of directories" do
74
90
  mkpath 'tmp'
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- require File.join(File.dirname(__FILE__), '../spec_helpers')
16
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
17
17
 
18
18
 
19
19
  describe Buildr::Groovy::EasyB do
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
  describe 'groovyc compiler' do
20
20
 
@@ -184,8 +184,8 @@ describe 'groovyc compiler options' do
184
184
  groovyc.options.verbose.should be_false
185
185
  end
186
186
 
187
- it 'should set verbose option when running with --trace option' do
188
- trace true
187
+ it 'should set verbose option when running with --trace=groovyc option' do
188
+ Buildr.application.options.trace_categories = [:groovyc]
189
189
  groovyc.options.verbose.should be_true
190
190
  end
191
191
 
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require File.join(File.dirname(__FILE__), '../spec_helpers')
17
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
18
18
 
19
19
 
20
20
  JAVA_CONTAINER = Buildr::Eclipse::Java::CONTAINER
@@ -61,6 +61,13 @@ module EclipseHelper
61
61
  end
62
62
  end
63
63
 
64
+ # <classpathentry path="PATH" javadocpath="RETURNED_VALUE" kind="var"/>
65
+ def javadocpath_for_path(path)
66
+ classpath_xml_elements.collect("classpathentry[@kind='var',@path='#{path}']") do |n|
67
+ n.attributes['javadocpath'] || 'no javadoc artifact'
68
+ end
69
+ end
70
+
64
71
  def project_xml_elements
65
72
  task('eclipse').invoke
66
73
  File.open('.project') { |f| REXML::Document.new(f).root.elements }
@@ -110,6 +117,15 @@ describe Buildr::Eclipse do
110
117
  end
111
118
  end
112
119
 
120
+ it 'should use eclipse project name if specified' do
121
+ define('foo') { eclipse.name = 'bar' }
122
+ task('eclipse').invoke
123
+ File.open('.project') do |f|
124
+ REXML::Document.new(f).root.
125
+ elements.collect("name") { |e| e.text }.should == ['bar']
126
+ end
127
+ end
128
+
113
129
  it 'should not generate a .classpath file' do
114
130
  define('foo')
115
131
  task('eclipse').invoke
@@ -165,6 +181,32 @@ describe Buildr::Eclipse do
165
181
  end
166
182
  end
167
183
 
184
+ it 'should use eclipse name for child project if set' do
185
+ mkdir 'foo'
186
+ define('myproject') {
187
+ project.version = '1.0'
188
+ define('foo') { eclipse.name = 'bar'; compile.using(:javac); package :jar }
189
+ }
190
+ task('eclipse').invoke
191
+ File.open(File.join('foo', '.project')) do |f|
192
+ REXML::Document.new(f).root.
193
+ elements.collect("name") { |e| e.text }.should == ['bar']
194
+ end
195
+ end
196
+
197
+ it 'should use short name for child project if eclipse.options.short_names = true' do
198
+ mkdir 'foo'
199
+ define('myproject') {
200
+ project.version = '1.0'
201
+ eclipse.options.short_names = true
202
+ define('foo') { compile.using(:javac); package :jar }
203
+ }
204
+ task('eclipse').invoke
205
+ File.open(File.join('foo', '.project')) do |f|
206
+ REXML::Document.new(f).root.
207
+ elements.collect("name") { |e| e.text }.should == ['foo']
208
+ end
209
+ end
168
210
  end
169
211
 
170
212
  describe 'scala project' do
@@ -465,6 +507,21 @@ MANIFEST
465
507
  elements.collect("classpathentry[@kind='src']") { |n| n.attributes['path'] }.should include('/myproject-foo')
466
508
  end
467
509
  end
510
+
511
+ it 'should use eclipse name in its classpath if set' do
512
+ mkdir 'foo'
513
+ mkdir 'bar'
514
+ define('myproject') {
515
+ project.version = '1.0'
516
+ define('foo') { eclipse.name = 'eclipsefoo'; package :jar }
517
+ define('bar') { eclipse.name = 'eclipsebar'; compile.using(:javac).with project('foo'); }
518
+ }
519
+ task('eclipse').invoke
520
+ File.open(File.join('bar', '.classpath')) do |f|
521
+ REXML::Document.new(f).root.
522
+ elements.collect("classpathentry[@kind='src']") { |n| n.attributes['path'] }.should include('/eclipsefoo')
523
+ end
524
+ end
468
525
  end
469
526
  end
470
527
 
@@ -528,6 +585,11 @@ MANIFEST
528
585
  sourcepath_for_path('M2_REPO/com/example/library/2.0/library-2.0.jar').
529
586
  should == ['M2_REPO/com/example/library/2.0/library-2.0-sources.jar']
530
587
  end
588
+
589
+ it 'should have a javadoc artifact reference in the .classpath file' do
590
+ javadocpath_for_path('M2_REPO/com/example/library/2.0/library-2.0.jar').
591
+ should == ['M2_REPO/com/example/library/2.0/library-2.0-javadoc.jar']
592
+ end
531
593
  end
532
594
 
533
595
  describe 'maven2 repository variable' do