buildr 1.4.23-x86-mswin32 → 1.4.24-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'xpath_matchers
20
20
  def ensure_facet_xpath(doc, type, name)
21
21
  facet_xpath = "/module/component[@name='FacetManager']/facet"
22
22
  doc.should have_xpath(facet_xpath)
23
- web_facet_xpath = "#{facet_xpath}[@type='#{type}' and @name='#{name}']"
23
+ web_facet_xpath = "#{facet_xpath}[@type='#{type}' && @name='#{name}']"
24
24
  doc.should have_xpath(web_facet_xpath)
25
25
  web_facet_xpath
26
26
  end
@@ -122,7 +122,7 @@ describe Buildr::IntellijIdea do
122
122
  end
123
123
 
124
124
  it "generates one exported 'module-library' orderEntry in IML" do
125
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @exported='']/library/CLASSES/root", 1)
125
+ root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' && @exported='']/library/CLASSES/root", 1)
126
126
  end
127
127
  end
128
128
 
@@ -136,7 +136,7 @@ describe Buildr::IntellijIdea do
136
136
  end
137
137
 
138
138
  it "generates one exported 'module-library' orderEntry in IML" do
139
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @scope='TEST']/library/CLASSES/root", 1)
139
+ root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' && @scope='TEST']/library/CLASSES/root", 1)
140
140
  end
141
141
  end
142
142
 
@@ -149,9 +149,8 @@ describe Buildr::IntellijIdea do
149
149
  invoke_generate_task
150
150
  end
151
151
 
152
- it "generates one non-exported test scope 'module-library' orderEntry in IML" do
153
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @exported]/library/CLASSES/root", 0)
154
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @scope='TEST']/library/CLASSES/root", 1)
152
+ it "generates one non-exported test scope 'module-library' orderEntry in IML" do
153
+ root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' && @scope='TEST']/library/CLASSES/root", 1)
155
154
  end
156
155
  end
157
156
 
@@ -165,8 +164,7 @@ describe Buildr::IntellijIdea do
165
164
  end
166
165
 
167
166
  it "generates one non-exported 'module-library' orderEntry in IML" do
168
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @exported]/library/CLASSES/root", 0)
169
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library']/library/CLASSES/root", 1)
167
+ root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' && @scope='TEST']/library/CLASSES/root", 1)
170
168
  end
171
169
  end
172
170
 
@@ -181,7 +179,7 @@ describe Buildr::IntellijIdea do
181
179
  end
182
180
 
183
181
  it "generates 'module-library' orderEntry in IML with SOURCES specified" do
184
- root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' and @exported='']/library/SOURCES/root", 1)
182
+ root_module_xml(@foo).should have_nodes("#{order_entry_xpath}[@type='module-library' && @exported='']/library/SOURCES/root", 1)
185
183
  end
186
184
  end
187
185
 
@@ -264,11 +262,11 @@ describe Buildr::IntellijIdea do
264
262
  doc = xml_document(@foo._("foo.ipr"))
265
263
  doc.should have_nodes("#{xpath_to_module}", 3)
266
264
  module_ref = "$PROJECT_DIR$/foo.iml"
267
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']")
265
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']")
268
266
  module_ref = "$PROJECT_DIR$/other.iml"
269
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']")
267
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']")
270
268
  module_ref = "$PROJECT_DIR$/other_other.iml"
271
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']")
269
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']")
272
270
  end
273
271
  end
274
272
 
@@ -326,8 +324,8 @@ describe Buildr::IntellijIdea do
326
324
  doc = xml_document(@foo._("foo.iml"))
327
325
  facet_xpath = ensure_facet_xpath(doc, 'gwt', 'GWT')
328
326
  prefix = "#{facet_xpath}/configuration/packaging/module"
329
- doc.should have_xpath("#{prefix}[@name='com.biz.MyModule' and @enabled='true']")
330
- doc.should have_xpath("#{prefix}[@name='com.biz.MyOtherModule' and @enabled='false']")
327
+ doc.should have_xpath("#{prefix}[@name='com.biz.MyModule' && @enabled='true']")
328
+ doc.should have_xpath("#{prefix}[@name='com.biz.MyOtherModule' && @enabled='false']")
331
329
  end
332
330
  end
333
331
 
@@ -402,7 +400,7 @@ describe Buildr::IntellijIdea do
402
400
  it "generates a web facet with jsf facet auto-detected" do
403
401
  doc = xml_document(@foo._("foo.iml"))
404
402
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
405
- doc.should have_xpath("#{web_facet_xpath}/facet[@type='jsf' and @name='JSF']")
403
+ doc.should have_xpath("#{web_facet_xpath}/facet[@type='jsf' && @name='JSF']")
406
404
  end
407
405
  end
408
406
 
@@ -419,7 +417,7 @@ describe Buildr::IntellijIdea do
419
417
  it "does not generate a web facet with jsf facet" do
420
418
  doc = xml_document(@foo._("foo.iml"))
421
419
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
422
- doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and @name='JSF']")
420
+ doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' && @name='JSF']")
423
421
  end
424
422
  end
425
423
 
@@ -438,7 +436,7 @@ describe Buildr::IntellijIdea do
438
436
  it "does not generate a web facet with jsf facet" do
439
437
  doc = xml_document(@foo._("foo.iml"))
440
438
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
441
- doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and @name='JSF']")
439
+ doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' && @name='JSF']")
442
440
  end
443
441
  end
444
442
 
@@ -457,7 +455,7 @@ describe Buildr::IntellijIdea do
457
455
  it "does not generate a web facet with jsf facet" do
458
456
  doc = xml_document(@foo._("foo.iml"))
459
457
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
460
- doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and @name='JSF']")
458
+ doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' && @name='JSF']")
461
459
  end
462
460
  end
463
461
 
@@ -484,7 +482,7 @@ describe Buildr::IntellijIdea do
484
482
  it "generates a web facet with derived webroots" do
485
483
  doc = xml_document(@foo._("foo.iml"))
486
484
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
487
- doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp' and @relative='/']")
485
+ doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp' && @relative='/']")
488
486
  end
489
487
  end
490
488
 
@@ -507,8 +505,8 @@ describe Buildr::IntellijIdea do
507
505
  it "generates a web facet with specified webroots" do
508
506
  doc = xml_document(@foo._("foo.iml"))
509
507
  web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
510
- doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp2' and @relative='/']")
511
- doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/css' and @relative='/css']")
508
+ doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp2' && @relative='/']")
509
+ doc.should have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/css' && @relative='/css']")
512
510
  end
513
511
  end
514
512
 
@@ -534,8 +532,8 @@ describe Buildr::IntellijIdea do
534
532
  it "generates a jpa facet with default settings" do
535
533
  doc = xml_document(@foo._("foo.iml"))
536
534
  facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
537
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and @value='true']")
538
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and @value='Hibernate']")
535
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' && @value='true']")
536
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' && @value='Hibernate']")
539
537
  end
540
538
  end
541
539
 
@@ -563,8 +561,8 @@ describe Buildr::IntellijIdea do
563
561
  it "generates a jpa facet with default settings" do
564
562
  doc = xml_document(@foo._("foo.iml"))
565
563
  facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
566
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and @value='true']")
567
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and @value='Hibernate']")
564
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' && @value='true']")
565
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' && @value='Hibernate']")
568
566
  end
569
567
  end
570
568
 
@@ -604,8 +602,8 @@ describe Buildr::IntellijIdea do
604
602
  it "generates a jpa facet with default settings" do
605
603
  doc = xml_document(@foo._("foo.iml"))
606
604
  facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
607
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and @value='true']")
608
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and @value='Hibernate']")
605
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' && @value='true']")
606
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' && @value='Hibernate']")
609
607
  end
610
608
  end
611
609
 
@@ -623,8 +621,8 @@ describe Buildr::IntellijIdea do
623
621
  it "generates a jpa facet with default settings" do
624
622
  doc = xml_document(@foo._("foo.iml"))
625
623
  facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
626
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and @value='true']")
627
- doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and @value='EclipseLink']")
624
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' && @value='true']")
625
+ doc.should have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' && @value='EclipseLink']")
628
626
  end
629
627
  end
630
628
 
@@ -763,9 +761,9 @@ describe Buildr::IntellijIdea do
763
761
 
764
762
  it "generates a data source manager with specified data source" do
765
763
  doc = xml_document(@foo._("foo.ipr"))
766
- prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and @format='xml' and @hash='3208837817']/data-source"
764
+ prefix_xpath = "/project/component[@name='DataSourceManagerImpl' && @format='xml' && @hash='3208837817']/data-source"
767
765
  doc.should have_nodes(prefix_xpath, 1)
768
- ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='Postgres']"
766
+ ds_path = "#{prefix_xpath}[@source='LOCAL' && @name='Postgres']"
769
767
  doc.should have_xpath(ds_path)
770
768
  doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
771
769
  doc.should have_xpath("#{ds_path}/jdbc-driver/text() = 'org.postgresql.Driver'")
@@ -789,9 +787,9 @@ describe Buildr::IntellijIdea do
789
787
 
790
788
  it "generates a data source manager with specified data source" do
791
789
  doc = xml_document(@foo._("foo.ipr"))
792
- prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and @format='xml' and @hash='3208837817']/data-source"
790
+ prefix_xpath = "/project/component[@name='DataSourceManagerImpl' && @format='xml' && @hash='3208837817']/data-source"
793
791
  doc.should have_nodes(prefix_xpath, 1)
794
- ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='Postgres']"
792
+ ds_path = "#{prefix_xpath}[@source='LOCAL' && @name='Postgres']"
795
793
  doc.should have_xpath(ds_path)
796
794
  doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
797
795
  doc.should have_xpath("#{ds_path}/jdbc-driver/text() = 'org.postgresql.Driver'")
@@ -814,9 +812,9 @@ describe Buildr::IntellijIdea do
814
812
 
815
813
  it "generates a data source manager with specified data source" do
816
814
  doc = xml_document(@foo._("foo.ipr"))
817
- prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and @format='xml' and @hash='3208837817']/data-source"
815
+ prefix_xpath = "/project/component[@name='DataSourceManagerImpl' && @format='xml' && @hash='3208837817']/data-source"
818
816
  doc.should have_nodes(prefix_xpath, 1)
819
- ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='SqlServer']"
817
+ ds_path = "#{prefix_xpath}[@source='LOCAL' && @name='SqlServer']"
820
818
  doc.should have_xpath(ds_path)
821
819
 
822
820
  doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
@@ -847,8 +845,8 @@ describe Buildr::IntellijIdea do
847
845
  doc = xml_document(@foo._("foo.ipr"))
848
846
  facet_xpath = "/project/component[@name='ArtifactManager']/artifact"
849
847
  doc.should have_nodes(facet_xpath, 2)
850
- doc.should have_xpath("#{facet_xpath}[@type='jar' and @name='MyFancy.jar']")
851
- doc.should have_xpath("#{facet_xpath}[@type='jar' and @name='MyOtherFancy.jar']")
848
+ doc.should have_xpath("#{facet_xpath}[@type='jar' && @name='MyFancy.jar']")
849
+ doc.should have_xpath("#{facet_xpath}[@type='jar' && @name='MyOtherFancy.jar']")
852
850
  end
853
851
  end
854
852
 
@@ -871,11 +869,11 @@ describe Buildr::IntellijIdea do
871
869
  it "generates an IPR with a jar artifact" do
872
870
  doc = xml_document(@foo._("foo.ipr"))
873
871
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
874
- facet_xpath = "#{base_xpath}[@type='jar' and @name='bar.jar' and @build-on-make='false']"
872
+ facet_xpath = "#{base_xpath}[@type='jar' && @name='bar.jar' && @build-on-make='false']"
875
873
  doc.should have_xpath(facet_xpath)
876
874
 
877
875
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/artifacts/bar")
878
- doc.should have_xpath("#{facet_xpath}/root[@id='archive' and @name='bar.jar']/element[@id='module-output' and @name='bar']")
876
+ doc.should have_xpath("#{facet_xpath}/root[@id='archive' && @name='bar.jar']/element[@id='module-output' && @name='bar']")
879
877
  end
880
878
  end
881
879
 
@@ -904,13 +902,13 @@ describe Buildr::IntellijIdea do
904
902
  it "generates an IPR with a jar artifact" do
905
903
  doc = xml_document(@foo._("foo.ipr"))
906
904
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
907
- facet_xpath = "#{base_xpath}[@type='jar' and @name='bar.jar' and @build-on-make='true']"
905
+ facet_xpath = "#{base_xpath}[@type='jar' && @name='bar.jar' && @build-on-make='true']"
908
906
  doc.should have_xpath(facet_xpath)
909
907
 
910
908
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/bink")
911
- doc.should have_xpath("#{facet_xpath}/root[@id='archive' and @name='bar.jar']/element[@id='module-output' and @name='bar']")
912
- doc.should have_xpath("#{facet_xpath}/root[@id='archive' and @name='bar.jar']/element[@id='jpa-descriptors' and @facet='p/jpa/JPA']")
913
- doc.should have_xpath("#{facet_xpath}/root[@id='archive' and @name='bar.jar']/element[@id='javaee-facet-resources' and @facet='x/ejb/EJB']")
909
+ doc.should have_xpath("#{facet_xpath}/root[@id='archive' && @name='bar.jar']/element[@id='module-output' && @name='bar']")
910
+ doc.should have_xpath("#{facet_xpath}/root[@id='archive' && @name='bar.jar']/element[@id='jpa-descriptors' && @facet='p/jpa/JPA']")
911
+ doc.should have_xpath("#{facet_xpath}/root[@id='archive' && @name='bar.jar']/element[@id='javaee-facet-resources' && @facet='x/ejb/EJB']")
914
912
  end
915
913
  end
916
914
 
@@ -935,12 +933,12 @@ describe Buildr::IntellijIdea do
935
933
  it "generates an IPR with an ejb artifact" do
936
934
  doc = xml_document(@foo._("foo.ipr"))
937
935
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
938
- facet_xpath = "#{base_xpath}[@type='exploded-ejb' and @name='bar' and @build-on-make='false']"
936
+ facet_xpath = "#{base_xpath}[@type='exploded-ejb' && @name='bar' && @build-on-make='false']"
939
937
  doc.should have_xpath(facet_xpath)
940
938
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/artifacts/bar")
941
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='module-output' and @name='bar']")
942
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='jpa-descriptors' and @facet='p/jpa/JPA']")
943
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' and @facet='x/ejb/EJB']")
939
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='module-output' && @name='bar']")
940
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='jpa-descriptors' && @facet='p/jpa/JPA']")
941
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' && @facet='x/ejb/EJB']")
944
942
  end
945
943
  end
946
944
 
@@ -963,11 +961,11 @@ describe Buildr::IntellijIdea do
963
961
  it "generates an IPR with an ejb artifact" do
964
962
  doc = xml_document(@foo._("foo.ipr"))
965
963
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
966
- facet_xpath = "#{base_xpath}[@type='exploded-ejb' and @name='bar' and @build-on-make='false']"
964
+ facet_xpath = "#{base_xpath}[@type='exploded-ejb' && @name='bar' && @build-on-make='false']"
967
965
  doc.should have_xpath(facet_xpath)
968
966
 
969
967
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/artifacts/bar")
970
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='module-output' and @name='bar']")
968
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='module-output' && @name='bar']")
971
969
  end
972
970
  end
973
971
 
@@ -991,13 +989,13 @@ describe Buildr::IntellijIdea do
991
989
  it "generates an IPR with a war artifact" do
992
990
  doc = xml_document(@foo._("foo.ipr"))
993
991
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
994
- facet_xpath = "#{base_xpath}[@type='exploded-war' and @name='bar' and @build-on-make='false']"
992
+ facet_xpath = "#{base_xpath}[@type='exploded-war' && @name='bar' && @build-on-make='false']"
995
993
  doc.should have_xpath(facet_xpath)
996
994
 
997
995
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/artifacts/bar")
998
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='classes']/element[@id='module-output' and @name='bar']")
999
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='lib']/element[@id='file-copy' and @path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
1000
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' and @facet='bar/web/Web']")
996
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='classes']/element[@id='module-output' && @name='bar']")
997
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='lib']/element[@id='file-copy' && @path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
998
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' && @facet='bar/web/Web']")
1001
999
  end
1002
1000
  end
1003
1001
 
@@ -1025,18 +1023,18 @@ describe Buildr::IntellijIdea do
1025
1023
  it "generates an IPR with a war artifact" do
1026
1024
  doc = xml_document(@foo._("foo.ipr"))
1027
1025
  base_xpath = "/project/component[@name='ArtifactManager']/artifact"
1028
- facet_xpath = "#{base_xpath}[@type='exploded-war' @name='MyFancy.jar' and @build-on-make='false']"
1026
+ facet_xpath = "#{base_xpath}[@type='exploded-war' @name='MyFancy.jar' && @build-on-make='false']"
1029
1027
  doc.should have_xpath(facet_xpath)
1030
1028
 
1031
1029
  doc.should have_xpath("#{facet_xpath}/output-path/text() = $PROJECT_DIR$/artifacts/gar")
1032
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='classes']/element[@id='module-output' and @name='bar']")
1033
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='lib']/element[@id='file-copy' and @path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
1034
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' and @facet='x/web/Web']")
1035
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' and @facet='y/web/Web']")
1036
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' and @facet='p/gwt/GWT']")
1037
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' and @facet='q/gwt/GWT']")
1038
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='lib']/element[@id='artifact' and @artifact-name='baz.jar']")
1039
- doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and @name='WEB-INF']/element[@id='directory' and @name='lib']/element[@id='artifact' and @artifact-name='biz.jar']")
1030
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='classes']/element[@id='module-output' && @name='bar']")
1031
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='lib']/element[@id='file-copy' && @path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
1032
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' && @facet='x/web/Web']")
1033
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources' && @facet='y/web/Web']")
1034
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' && @facet='p/gwt/GWT']")
1035
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' && @facet='q/gwt/GWT']")
1036
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='lib']/element[@id='artifact' && @artifact-name='baz.jar']")
1037
+ doc.should have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' && @name='WEB-INF']/element[@id='directory' && @name='lib']/element[@id='artifact' && @artifact-name='biz.jar']")
1040
1038
  end
1041
1039
  end
1042
1040
 
@@ -1071,8 +1069,8 @@ describe Buildr::IntellijIdea do
1071
1069
  doc = xml_document(@foo._("foo.ipr"))
1072
1070
  facet_xpath = "/project/component[@name='ProjectRunConfigurationManager']/configuration"
1073
1071
  doc.should have_nodes(facet_xpath, 2)
1074
- doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' and @name='Run Contacts.html']")
1075
- doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' and @name='Run Planner.html']")
1072
+ doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' && @name='Run Contacts.html']")
1073
+ doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' && @name='Run Planner.html']")
1076
1074
  end
1077
1075
  end
1078
1076
 
@@ -1097,7 +1095,7 @@ describe Buildr::IntellijIdea do
1097
1095
  doc = xml_document(@foo._("foo.ipr"))
1098
1096
  facet_xpath = "/project/component[@name='ProjectRunConfigurationManager']/configuration"
1099
1097
  doc.should have_nodes(facet_xpath, 1)
1100
- doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' and @factoryName='GWT Configuration' and @default='true']")
1098
+ doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' && @factoryName='GWT Configuration' && @default='true']")
1101
1099
  end
1102
1100
  end
1103
1101
 
@@ -1113,10 +1111,10 @@ describe Buildr::IntellijIdea do
1113
1111
  doc = xml_document(@foo._("foo.ipr"))
1114
1112
  configurations_xpath = "/project/component[@name='ProjectRunConfigurationManager']/configuration"
1115
1113
  doc.should have_nodes(configurations_xpath, 1)
1116
- configuration_xpath = "#{configurations_xpath}[@type='TestNG' and @factoryName='TestNG' and @default='true']"
1114
+ configuration_xpath = "#{configurations_xpath}[@type='TestNG' && @factoryName='TestNG' && @default='true']"
1117
1115
  doc.should have_xpath(configuration_xpath)
1118
- doc.should have_xpath("#{configuration_xpath}/option[@name='VM_PARAMETERS' and @value='-ea']")
1119
- doc.should have_xpath("#{configuration_xpath}/option[@name='WORKING_DIRECTORY' and @value='$PROJECT_DIR$']")
1116
+ doc.should have_xpath("#{configuration_xpath}/option[@name='VM_PARAMETERS' && @value='-ea']")
1117
+ doc.should have_xpath("#{configuration_xpath}/option[@name='WORKING_DIRECTORY' && @value='$PROJECT_DIR$']")
1120
1118
  end
1121
1119
  end
1122
1120
 
@@ -1132,10 +1130,10 @@ describe Buildr::IntellijIdea do
1132
1130
  doc = xml_document(@foo._("foo.ipr"))
1133
1131
  configurations_xpath = "/project/component[@name='ProjectRunConfigurationManager']/configuration"
1134
1132
  doc.should have_nodes(configurations_xpath, 1)
1135
- configuration_xpath = "#{configurations_xpath}[@type='TestNG' and @factoryName='TestNG' and @default='true']"
1133
+ configuration_xpath = "#{configurations_xpath}[@type='TestNG' && @factoryName='TestNG' && @default='true']"
1136
1134
  doc.should have_xpath(configuration_xpath)
1137
- doc.should have_xpath("#{configuration_xpath}/option[@name='VM_PARAMETERS' and @value='-ea -Dtest.db.url=xxxx']")
1138
- doc.should have_xpath("#{configuration_xpath}/option[@name='WORKING_DIRECTORY' and @value='C:/blah']")
1135
+ doc.should have_xpath("#{configuration_xpath}/option[@name='VM_PARAMETERS' && @value='-ea -Dtest.db.url=xxxx']")
1136
+ doc.should have_xpath("#{configuration_xpath}/option[@name='WORKING_DIRECTORY' && @value='C:/blah']")
1139
1137
  end
1140
1138
  end
1141
1139
 
@@ -1159,13 +1157,13 @@ describe Buildr::IntellijIdea do
1159
1157
  doc = xml_document(@foo._("foo.ipr"))
1160
1158
  doc.should have_nodes("#{xpath_to_module}", 4)
1161
1159
  module_ref = "$PROJECT_DIR$/foo.iml"
1162
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']")
1160
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']")
1163
1161
  module_ref = "$PROJECT_DIR$/rab/rab.iml"
1164
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}' @group = 'MyGroup']")
1162
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}' @group = 'MyGroup']")
1165
1163
  module_ref = "$PROJECT_DIR$/bar/bar.iml"
1166
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}' @group = 'foo']")
1164
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}' @group = 'foo']")
1167
1165
  module_ref = "$PROJECT_DIR$/bar/baz/baz.iml"
1168
- doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}' @group = 'foo/bar']")
1166
+ doc.should have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}' @group = 'foo/bar']")
1169
1167
  end
1170
1168
  end
1171
1169
 
@@ -1196,7 +1194,7 @@ describe Buildr::IntellijIdea do
1196
1194
  File.should be_exist(@foo._("foo.ipr"))
1197
1195
  doc = xml_document(@foo._("foo.ipr"))
1198
1196
  module_ref = "$PROJECT_DIR$/foo.iml"
1199
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1197
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1200
1198
  end
1201
1199
  end
1202
1200
 
@@ -1264,7 +1262,7 @@ describe Buildr::IntellijIdea do
1264
1262
  File.should be_exist(@foo._("fooble.ipr"))
1265
1263
  doc = xml_document(@foo._("fooble.ipr"))
1266
1264
  module_ref = "$PROJECT_DIR$/feap.iml"
1267
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1265
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1268
1266
  end
1269
1267
  end
1270
1268
 
@@ -1290,7 +1288,7 @@ describe Buildr::IntellijIdea do
1290
1288
  doc = xml_document(@foo._("foo-ipr-suffix.ipr"))
1291
1289
  doc.should have_nodes("#{xpath_to_module}", 1)
1292
1290
  module_ref = "$PROJECT_DIR$/foo-iml-suffix.iml"
1293
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1291
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1294
1292
  end
1295
1293
  end
1296
1294
 
@@ -1316,7 +1314,7 @@ describe Buildr::IntellijIdea do
1316
1314
  doc = xml_document(@foo._("ipr-prefix-foo.ipr"))
1317
1315
  doc.should have_nodes("#{xpath_to_module}", 1)
1318
1316
  module_ref = "$PROJECT_DIR$/iml-prefix-foo.iml"
1319
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1317
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1320
1318
  end
1321
1319
  end
1322
1320
 
@@ -1344,7 +1342,7 @@ describe Buildr::IntellijIdea do
1344
1342
  doc = xml_document(@foo._("ipr-prefix-foo-ipr-suffix.ipr"))
1345
1343
  doc.should have_nodes("#{xpath_to_module}", 1)
1346
1344
  module_ref = "$PROJECT_DIR$/iml-prefix-foo-iml-suffix.iml"
1347
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1345
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1348
1346
  end
1349
1347
  end
1350
1348
  end
@@ -1370,9 +1368,9 @@ describe Buildr::IntellijIdea do
1370
1368
  doc = xml_document(@foo._("foo.ipr"))
1371
1369
  doc.should have_nodes("#{xpath_to_module}", 2)
1372
1370
  module_ref = "$PROJECT_DIR$/foo.iml"
1373
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1371
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1374
1372
  module_ref = "$PROJECT_DIR$/bar/bar.iml"
1375
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and @filepath='#{module_ref}']", 1)
1373
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' && @filepath='#{module_ref}']", 1)
1376
1374
  end
1377
1375
  end
1378
1376
 
@@ -1409,7 +1407,7 @@ describe Buildr::IntellijIdea do
1409
1407
  doc = xml_document(@foo._("foo.ipr"))
1410
1408
  doc.should have_nodes("#{xpath_to_module}", 5)
1411
1409
  ["foo.iml", "fe/bar.iml", "fi/baz.iml", "fi/foe/foe.iml", "fe/fum/fum.iml"].each do |module_ref|
1412
- doc.should have_nodes("#{xpath_to_module}[@fileurl='file://$PROJECT_DIR$/#{module_ref}' and @filepath='$PROJECT_DIR$/#{module_ref}']", 1)
1410
+ doc.should have_nodes("#{xpath_to_module}[@fileurl='file://$PROJECT_DIR$/#{module_ref}' && @filepath='$PROJECT_DIR$/#{module_ref}']", 1)
1413
1411
  end
1414
1412
  end
1415
1413
  end
@@ -1448,7 +1446,7 @@ describe Buildr::IntellijIdea do
1448
1446
  end
1449
1447
 
1450
1448
  it "depends on the associated module exactly once" do
1451
- @bar_iml.should have_nodes("//orderEntry[@type='module' and @module-name='foo' and @exported=""]", 1)
1449
+ @bar_iml.should have_nodes("//orderEntry[@type='module' && @module-name='foo' && @exported=""]", 1)
1452
1450
  end
1453
1451
 
1454
1452
  it "does not depend on the other project's packaged JAR" do
@@ -1501,12 +1499,12 @@ describe Buildr::IntellijIdea do
1501
1499
  it "generate an ProjectRootManager with 1.5 jdk specified" do
1502
1500
  #raise File.read(@foo._("foo.ipr"))
1503
1501
  xml_document(@foo._("foo.ipr")).
1504
- should have_xpath("/project/component[@name='ProjectRootManager' and @project-jdk-name = '1.5' and @languageLevel = 'JDK_1_5']")
1502
+ should have_xpath("/project/component[@name='ProjectRootManager' && @project-jdk-name = '1.5' && @languageLevel = 'JDK_1_5']")
1505
1503
  end
1506
1504
 
1507
1505
  it "generates a ProjectDetails component with the projectName option set" do
1508
1506
  xml_document(@foo._("foo.ipr")).
1509
- should have_xpath("/project/component[@name='ProjectDetails']/option[@name = 'projectName' and @value = 'foo']")
1507
+ should have_xpath("/project/component[@name='ProjectDetails']/option[@name = 'projectName' && @value = 'foo']")
1510
1508
  end
1511
1509
  end
1512
1510
 
@@ -1520,7 +1518,7 @@ describe Buildr::IntellijIdea do
1520
1518
 
1521
1519
  it "generate an ProjectRootManager with 1.6 jdk specified" do
1522
1520
  xml_document(@foo._("foo.ipr")).
1523
- should have_xpath("/project/component[@name='ProjectRootManager' and @project-jdk-name = '1.6' and @languageLevel = 'JDK_1_6']")
1521
+ should have_xpath("/project/component[@name='ProjectRootManager' && @project-jdk-name = '1.6' && @languageLevel = 'JDK_1_6']")
1524
1522
  end
1525
1523
  end
1526
1524
 
@@ -1589,11 +1587,11 @@ describe Buildr::IntellijIdea do
1589
1587
  end
1590
1588
 
1591
1589
  it "generates the correct main source directories" do
1592
- root_module_xml(@foo).should have_xpath("//content/sourceFolder[@url='file://$MODULE_DIR$/src/main/baz' and @isTestSource='false']")
1590
+ root_module_xml(@foo).should have_xpath("//content/sourceFolder[@url='file://$MODULE_DIR$/src/main/baz' && @isTestSource='false']")
1593
1591
  end
1594
1592
 
1595
1593
  it "generates the correct test source directories" do
1596
- root_module_xml(@foo).should have_xpath("//content/sourceFolder[@url='file://$MODULE_DIR$/src/test/foo' and @isTestSource='true']")
1594
+ root_module_xml(@foo).should have_xpath("//content/sourceFolder[@url='file://$MODULE_DIR$/src/test/foo' && @isTestSource='true']")
1597
1595
  end
1598
1596
  end
1599
1597
 
@@ -1669,7 +1667,7 @@ PROJECT_XML
1669
1667
  end
1670
1668
 
1671
1669
  def ipr_from_template_xpath
1672
- "/project/component[@name='SvnBranchConfigurationManager']/option[@name = 'mySupportsUserInfoFilter' and @value = 'false']"
1670
+ "/project/component[@name='SvnBranchConfigurationManager']/option[@name = 'mySupportsUserInfoFilter' && @value = 'false']"
1673
1671
  end
1674
1672
 
1675
1673
  def ipr_from_existing_xpath
@@ -1677,7 +1675,7 @@ PROJECT_XML
1677
1675
  end
1678
1676
 
1679
1677
  def ipr_from_existing_shadowing_template_xpath
1680
- "/project/component[@name='SvnBranchConfigurationManager']/option[@name = 'mySupportsUserInfoFilter' and @value = 'true']"
1678
+ "/project/component[@name='SvnBranchConfigurationManager']/option[@name = 'mySupportsUserInfoFilter' && @value = 'true']"
1681
1679
  end
1682
1680
 
1683
1681
  def ipr_from_existing_shadowing_generated_xpath
@@ -1872,7 +1870,7 @@ PROJECT_XML
1872
1870
  it "merges components not in ipr template and not generated by task" do
1873
1871
  xml_document(@foo._("foo.ipr")).should have_xpath(ipr_from_existing_xpath)
1874
1872
  xml_document(@foo._("foo.ipr")).should_not have_xpath(ipr_from_existing_shadowing_generated_xpath)
1875
- xml_document(@foo._("foo.ipr")).should_not have_xpath(ipr_from_existing_shadowing_template_xpath)
1873
+ xml_document(@foo._("foo.ipr")).should have_xpath(ipr_from_existing_shadowing_template_xpath)
1876
1874
  end
1877
1875
  end
1878
1876
  end