maven-tools 0.32.4 → 0.32.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/lib/maven/model/model.rb +8 -11
- data/lib/maven/model/utils.rb +5 -4
- data/lib/maven/tools/gem_project.rb +27 -69
- data/lib/maven/tools/maven_project.rb +71 -0
- data/lib/maven/tools/version.rb +1 -1
- data/lib/maven/tools/versions.rb +5 -5
- data/rspec/maven/model/model_spec.rb +47 -46
- data/rspec/maven/tools/gem_project_spec.rb +93 -93
- data/rspec/maven/tools/rails_project_spec.rb +43 -45
- metadata +122 -134
@@ -84,10 +84,6 @@ XML
|
|
84
84
|
<packaging>gem</packaging>
|
85
85
|
<build>
|
86
86
|
<plugins>
|
87
|
-
<plugin>
|
88
|
-
<groupId>de.saumya.mojo</groupId>
|
89
|
-
<artifactId>bundler-maven-plugin</artifactId>
|
90
|
-
</plugin>
|
91
87
|
<plugin>
|
92
88
|
<groupId>de.saumya.mojo</groupId>
|
93
89
|
<artifactId>gem-maven-plugin</artifactId>
|
@@ -95,6 +91,10 @@ XML
|
|
95
91
|
<gemspec>rspec/maven/tools/minimal.gemspec</gemspec>
|
96
92
|
</configuration>
|
97
93
|
</plugin>
|
94
|
+
<plugin>
|
95
|
+
<groupId>de.saumya.mojo</groupId>
|
96
|
+
<artifactId>bundler-maven-plugin</artifactId>
|
97
|
+
</plugin>
|
98
98
|
</plugins>
|
99
99
|
</build>
|
100
100
|
</project>
|
@@ -145,10 +145,6 @@ XML
|
|
145
145
|
</dependencies>
|
146
146
|
<build>
|
147
147
|
<plugins>
|
148
|
-
<plugin>
|
149
|
-
<groupId>de.saumya.mojo</groupId>
|
150
|
-
<artifactId>bundler-maven-plugin</artifactId>
|
151
|
-
</plugin>
|
152
148
|
<plugin>
|
153
149
|
<groupId>de.saumya.mojo</groupId>
|
154
150
|
<artifactId>gem-maven-plugin</artifactId>
|
@@ -156,6 +152,10 @@ XML
|
|
156
152
|
<gemspec>rspec/maven/tools/maven-tools.gemspec</gemspec>
|
157
153
|
</configuration>
|
158
154
|
</plugin>
|
155
|
+
<plugin>
|
156
|
+
<groupId>de.saumya.mojo</groupId>
|
157
|
+
<artifactId>bundler-maven-plugin</artifactId>
|
158
|
+
</plugin>
|
159
159
|
</plugins>
|
160
160
|
</build>
|
161
161
|
</project>
|
@@ -280,10 +280,6 @@ XML
|
|
280
280
|
</dependencyManagement>
|
281
281
|
<build>
|
282
282
|
<plugins>
|
283
|
-
<plugin>
|
284
|
-
<groupId>de.saumya.mojo</groupId>
|
285
|
-
<artifactId>bundler-maven-plugin</artifactId>
|
286
|
-
</plugin>
|
287
283
|
<plugin>
|
288
284
|
<groupId>de.saumya.mojo</groupId>
|
289
285
|
<artifactId>gem-maven-plugin</artifactId>
|
@@ -291,6 +287,10 @@ XML
|
|
291
287
|
<gemspec>rspec/maven/tools/maven-tools.gemspec</gemspec>
|
292
288
|
</configuration>
|
293
289
|
</plugin>
|
290
|
+
<plugin>
|
291
|
+
<groupId>de.saumya.mojo</groupId>
|
292
|
+
<artifactId>bundler-maven-plugin</artifactId>
|
293
|
+
</plugin>
|
294
294
|
</plugins>
|
295
295
|
</build>
|
296
296
|
</project>
|
@@ -352,6 +352,17 @@ XML
|
|
352
352
|
</plugins>
|
353
353
|
</build>
|
354
354
|
<profiles>
|
355
|
+
<profile>
|
356
|
+
<id>test</id>
|
357
|
+
<dependencies>
|
358
|
+
<dependency>
|
359
|
+
<groupId>rubygems</groupId>
|
360
|
+
<artifactId>dm-sqlite3-adapter</artifactId>
|
361
|
+
<version>[0.10.0,0.10.99999]</version>
|
362
|
+
<type>gem</type>
|
363
|
+
</dependency>
|
364
|
+
</dependencies>
|
365
|
+
</profile>
|
355
366
|
<profile>
|
356
367
|
<id>development</id>
|
357
368
|
<dependencies>
|
@@ -380,17 +391,6 @@ XML
|
|
380
391
|
</dependency>
|
381
392
|
</dependencies>
|
382
393
|
</profile>
|
383
|
-
<profile>
|
384
|
-
<id>test</id>
|
385
|
-
<dependencies>
|
386
|
-
<dependency>
|
387
|
-
<groupId>rubygems</groupId>
|
388
|
-
<artifactId>dm-sqlite3-adapter</artifactId>
|
389
|
-
<version>[0.10.0,0.10.99999]</version>
|
390
|
-
<type>gem</type>
|
391
|
-
</dependency>
|
392
|
-
</dependencies>
|
393
|
-
</profile>
|
394
394
|
</profiles>
|
395
395
|
</project>
|
396
396
|
XML
|
@@ -439,10 +439,10 @@ XML
|
|
439
439
|
</dependencies>
|
440
440
|
</dependencyManagement>
|
441
441
|
<properties>
|
442
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
442
443
|
<gem.home>${project.build.directory}/rubygems</gem.home>
|
443
444
|
<gem.path>${project.build.directory}/rubygems</gem.path>
|
444
445
|
<jruby.plugins.version>_project.version_</jruby.plugins.version>
|
445
|
-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
446
446
|
</properties>
|
447
447
|
<build>
|
448
448
|
<plugins>
|
@@ -501,30 +501,30 @@ XML
|
|
501
501
|
<lifecycleMappingMetadata>
|
502
502
|
<pluginExecutions>
|
503
503
|
<pluginExecution>
|
504
|
-
<action>
|
505
|
-
<ignore></ignore>
|
506
|
-
</action>
|
507
504
|
<pluginExecutionFilter>
|
505
|
+
<groupId>de.saumya.mojo</groupId>
|
508
506
|
<artifactId>bundler-maven-plugin</artifactId>
|
507
|
+
<versionRange>[0,)</versionRange>
|
509
508
|
<goals>
|
510
509
|
<goal>install</goal>
|
511
510
|
</goals>
|
512
|
-
<groupId>de.saumya.mojo</groupId>
|
513
|
-
<versionRange>[0,)</versionRange>
|
514
511
|
</pluginExecutionFilter>
|
515
|
-
</pluginExecution>
|
516
|
-
<pluginExecution>
|
517
512
|
<action>
|
518
513
|
<ignore></ignore>
|
519
514
|
</action>
|
515
|
+
</pluginExecution>
|
516
|
+
<pluginExecution>
|
520
517
|
<pluginExecutionFilter>
|
518
|
+
<groupId>de.saumya.mojo</groupId>
|
521
519
|
<artifactId>gem-maven-plugin</artifactId>
|
520
|
+
<versionRange>[0,)</versionRange>
|
522
521
|
<goals>
|
523
522
|
<goal>initialize</goal>
|
524
523
|
</goals>
|
525
|
-
<groupId>de.saumya.mojo</groupId>
|
526
|
-
<versionRange>[0,)</versionRange>
|
527
524
|
</pluginExecutionFilter>
|
525
|
+
<action>
|
526
|
+
<ignore></ignore>
|
527
|
+
</action>
|
528
528
|
</pluginExecution>
|
529
529
|
</pluginExecutions>
|
530
530
|
</lifecycleMappingMetadata>
|
@@ -534,6 +534,40 @@ XML
|
|
534
534
|
</pluginManagement>
|
535
535
|
</build>
|
536
536
|
<profiles>
|
537
|
+
<profile>
|
538
|
+
<id>test</id>
|
539
|
+
<dependencies>
|
540
|
+
<dependency>
|
541
|
+
<groupId>rubygems</groupId>
|
542
|
+
<artifactId>ixtlan-core</artifactId>
|
543
|
+
<version>[0,)</version>
|
544
|
+
<type>gem</type>
|
545
|
+
</dependency>
|
546
|
+
</dependencies>
|
547
|
+
</profile>
|
548
|
+
<profile>
|
549
|
+
<id>production</id>
|
550
|
+
<dependencies>
|
551
|
+
<dependency>
|
552
|
+
<groupId>rubygems</groupId>
|
553
|
+
<artifactId>ixtlan-core</artifactId>
|
554
|
+
<version>[0,)</version>
|
555
|
+
<type>gem</type>
|
556
|
+
</dependency>
|
557
|
+
<dependency>
|
558
|
+
<groupId>rubygems</groupId>
|
559
|
+
<artifactId>dm-mysql-adapter</artifactId>
|
560
|
+
<version>[1.0.0,1.0.3)</version>
|
561
|
+
<type>gem</type>
|
562
|
+
</dependency>
|
563
|
+
<dependency>
|
564
|
+
<groupId>rubygems</groupId>
|
565
|
+
<artifactId>dm-postgres-adapter</artifactId>
|
566
|
+
<version>[0,1.0.0]</version>
|
567
|
+
<type>gem</type>
|
568
|
+
</dependency>
|
569
|
+
</dependencies>
|
570
|
+
</profile>
|
537
571
|
<profile>
|
538
572
|
<id>development</id>
|
539
573
|
<dependencies>
|
@@ -562,14 +596,14 @@ XML
|
|
562
596
|
<artifactId>maven-assembly-plugin</artifactId>
|
563
597
|
<version>_assembly.version_</version>
|
564
598
|
<configuration>
|
599
|
+
<descriptorRefs>
|
600
|
+
<descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
|
601
|
+
</descriptorRefs>
|
565
602
|
<archive>
|
566
603
|
<manifest>
|
567
604
|
<mainClass>de.saumya.mojo.assembly.Main</mainClass>
|
568
605
|
</manifest>
|
569
606
|
</archive>
|
570
|
-
<descriptorRefs>
|
571
|
-
<descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
|
572
|
-
</descriptorRefs>
|
573
607
|
</configuration>
|
574
608
|
<executions>
|
575
609
|
<execution>
|
@@ -592,40 +626,6 @@ XML
|
|
592
626
|
</plugins>
|
593
627
|
</build>
|
594
628
|
</profile>
|
595
|
-
<profile>
|
596
|
-
<id>production</id>
|
597
|
-
<dependencies>
|
598
|
-
<dependency>
|
599
|
-
<groupId>rubygems</groupId>
|
600
|
-
<artifactId>ixtlan-core</artifactId>
|
601
|
-
<version>[0,)</version>
|
602
|
-
<type>gem</type>
|
603
|
-
</dependency>
|
604
|
-
<dependency>
|
605
|
-
<groupId>rubygems</groupId>
|
606
|
-
<artifactId>dm-mysql-adapter</artifactId>
|
607
|
-
<version>[1.0.0,1.0.3)</version>
|
608
|
-
<type>gem</type>
|
609
|
-
</dependency>
|
610
|
-
<dependency>
|
611
|
-
<groupId>rubygems</groupId>
|
612
|
-
<artifactId>dm-postgres-adapter</artifactId>
|
613
|
-
<version>[0,1.0.0]</version>
|
614
|
-
<type>gem</type>
|
615
|
-
</dependency>
|
616
|
-
</dependencies>
|
617
|
-
</profile>
|
618
|
-
<profile>
|
619
|
-
<id>test</id>
|
620
|
-
<dependencies>
|
621
|
-
<dependency>
|
622
|
-
<groupId>rubygems</groupId>
|
623
|
-
<artifactId>ixtlan-core</artifactId>
|
624
|
-
<version>[0,)</version>
|
625
|
-
<type>gem</type>
|
626
|
-
</dependency>
|
627
|
-
</dependencies>
|
628
|
-
</profile>
|
629
629
|
</profiles>
|
630
630
|
</project>
|
631
631
|
XML
|
@@ -896,15 +896,15 @@ XML
|
|
896
896
|
<description><![CDATA[a no dependencies project to demonstrat how gemspec2pom works]]></description>
|
897
897
|
<url>http://example.com</url>
|
898
898
|
<developers>
|
899
|
-
<developer>
|
900
|
-
<id>Me_And_The_Corner</id>
|
901
|
-
<name>Me And The Corner</name>
|
902
|
-
</developer>
|
903
899
|
<developer>
|
904
900
|
<id>k_at_example_dot_com</id>
|
905
901
|
<name>Krysh Sample</name>
|
906
902
|
<email>k@example.com</email>
|
907
903
|
</developer>
|
904
|
+
<developer>
|
905
|
+
<id>Me_And_The_Corner</id>
|
906
|
+
<name>Me And The Corner</name>
|
907
|
+
</developer>
|
908
908
|
</developers>
|
909
909
|
<licenses>
|
910
910
|
<license>
|
@@ -919,23 +919,23 @@ XML
|
|
919
919
|
<groupId>de.saumya.mojo</groupId>
|
920
920
|
<artifactId>gem-maven-plugin</artifactId>
|
921
921
|
<configuration>
|
922
|
+
<gemspec>rspec/maven/tools/no-deps.gemspec</gemspec>
|
922
923
|
<autorequire>my</autorequire>
|
923
|
-
<bindir>mybin</bindir>
|
924
924
|
<defaultExecutable>myexe</defaultExecutable>
|
925
|
-
<
|
926
|
-
<extensions>myext</extensions>
|
925
|
+
<testFiles>test/first_test.rb</testFiles>
|
927
926
|
<extraRdocFiles>README.txt</extraRdocFiles>
|
928
|
-
<files>AGPL.txt,README.txt,test/first_test.rb,mybin/hello,myext,lib/first.rb,spec/first_spec.rb,features/first.feature</files>
|
929
|
-
<gemspec>rspec/maven/tools/no-deps.gemspec</gemspec>
|
930
|
-
<platform>java</platform>
|
931
|
-
<postInstallMessage><![CDATA[be happy]]></postInstallMessage>
|
932
927
|
<rdocOptions>--main,README.txt</rdocOptions>
|
933
928
|
<requirePaths>mylib</requirePaths>
|
934
|
-
<
|
929
|
+
<rubyforgeProject>myproject</rubyforgeProject>
|
935
930
|
<requiredRubygemsVersion><![CDATA[= 1.4.2]]></requiredRubygemsVersion>
|
931
|
+
<bindir>mybin</bindir>
|
932
|
+
<requiredRubyVersion><![CDATA[= 1.8.7]]></requiredRubyVersion>
|
933
|
+
<postInstallMessage><![CDATA[be happy]]></postInstallMessage>
|
934
|
+
<executables>hello</executables>
|
935
|
+
<extensions>myext</extensions>
|
936
|
+
<platform>java</platform>
|
937
|
+
<files>AGPL.txt,README.txt,test/first_test.rb,mybin/hello,myext,lib/first.rb,spec/first_spec.rb,features/first.feature</files>
|
936
938
|
<requirements>installed java</requirements>
|
937
|
-
<rubyforgeProject>myproject</rubyforgeProject>
|
938
|
-
<testFiles>test/first_test.rb</testFiles>
|
939
939
|
</configuration>
|
940
940
|
</plugin>
|
941
941
|
</plugins>
|
@@ -1016,10 +1016,10 @@ XML
|
|
1016
1016
|
</pluginRepository>
|
1017
1017
|
</pluginRepositories>
|
1018
1018
|
<properties>
|
1019
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
1019
1020
|
<gem.home>${project.build.directory}/rubygems</gem.home>
|
1020
1021
|
<gem.path>${project.build.directory}/rubygems</gem.path>
|
1021
1022
|
<jruby.plugins.version>_project.version_</jruby.plugins.version>
|
1022
|
-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
1023
1023
|
</properties>
|
1024
1024
|
<build>
|
1025
1025
|
<plugins>
|
@@ -1051,17 +1051,17 @@ XML
|
|
1051
1051
|
<lifecycleMappingMetadata>
|
1052
1052
|
<pluginExecutions>
|
1053
1053
|
<pluginExecution>
|
1054
|
-
<action>
|
1055
|
-
<ignore></ignore>
|
1056
|
-
</action>
|
1057
1054
|
<pluginExecutionFilter>
|
1055
|
+
<groupId>de.saumya.mojo</groupId>
|
1058
1056
|
<artifactId>gem-maven-plugin</artifactId>
|
1057
|
+
<versionRange>[0,)</versionRange>
|
1059
1058
|
<goals>
|
1060
1059
|
<goal>initialize</goal>
|
1061
1060
|
</goals>
|
1062
|
-
<groupId>de.saumya.mojo</groupId>
|
1063
|
-
<versionRange>[0,)</versionRange>
|
1064
1061
|
</pluginExecutionFilter>
|
1062
|
+
<action>
|
1063
|
+
<ignore></ignore>
|
1064
|
+
</action>
|
1065
1065
|
</pluginExecution>
|
1066
1066
|
</pluginExecutions>
|
1067
1067
|
</lifecycleMappingMetadata>
|
@@ -1088,14 +1088,14 @@ XML
|
|
1088
1088
|
<artifactId>maven-assembly-plugin</artifactId>
|
1089
1089
|
<version>_assembly.version_</version>
|
1090
1090
|
<configuration>
|
1091
|
+
<descriptorRefs>
|
1092
|
+
<descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
|
1093
|
+
</descriptorRefs>
|
1091
1094
|
<archive>
|
1092
1095
|
<manifest>
|
1093
1096
|
<mainClass>de.saumya.mojo.assembly.Main</mainClass>
|
1094
1097
|
</manifest>
|
1095
1098
|
</archive>
|
1096
|
-
<descriptorRefs>
|
1097
|
-
<descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
|
1098
|
-
</descriptorRefs>
|
1099
1099
|
</configuration>
|
1100
1100
|
<executions>
|
1101
1101
|
<execution>
|
@@ -8,7 +8,6 @@ describe Maven::Tools::RailsProject do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'should load Gemfile from a simple rails application with applied defaults' do
|
11
|
-
pending "hash is differently orderd in ruby1.8" if nil == (RUBY_VERSION =~ /^1.8/) && !defined? JRUBY_VERSION
|
12
11
|
@project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.simple'))
|
13
12
|
@project.name "test"
|
14
13
|
@project.add_defaults
|
@@ -75,16 +74,35 @@ describe Maven::Tools::RailsProject do
|
|
75
74
|
</dependencies>
|
76
75
|
</dependencyManagement>
|
77
76
|
<properties>
|
78
|
-
<
|
77
|
+
<jruby.version>_jruby.version_</jruby.version>
|
78
|
+
<rails.env>development</rails.env>
|
79
79
|
<gem.includeRubygemsInTestResources>false</gem.includeRubygemsInTestResources>
|
80
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
81
|
+
<gem.home>${project.build.directory}/rubygems</gem.home>
|
80
82
|
<gem.path>${project.build.directory}/rubygems</gem.path>
|
81
83
|
<jruby.plugins.version>_project.version_</jruby.plugins.version>
|
82
|
-
<jruby.version>_jruby.version_</jruby.version>
|
83
|
-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
84
|
-
<rails.env>development</rails.env>
|
85
84
|
</properties>
|
86
85
|
<build>
|
87
86
|
<plugins>
|
87
|
+
<plugin>
|
88
|
+
<groupId>de.saumya.mojo</groupId>
|
89
|
+
<artifactId>bundler-maven-plugin</artifactId>
|
90
|
+
<version>${jruby.plugins.version}</version>
|
91
|
+
</plugin>
|
92
|
+
<plugin>
|
93
|
+
<groupId>de.saumya.mojo</groupId>
|
94
|
+
<artifactId>rails3-maven-plugin</artifactId>
|
95
|
+
<version>${jruby.plugins.version}</version>
|
96
|
+
<executions>
|
97
|
+
<execution>
|
98
|
+
<id>in_phase_validate</id>
|
99
|
+
<phase>validate</phase>
|
100
|
+
<goals>
|
101
|
+
<goal>initialize</goal>
|
102
|
+
</goals>
|
103
|
+
</execution>
|
104
|
+
</executions>
|
105
|
+
</plugin>
|
88
106
|
<plugin>
|
89
107
|
<artifactId>maven-war-plugin</artifactId>
|
90
108
|
<version>_war.version_</version>
|
@@ -95,6 +113,7 @@ describe Maven::Tools::RailsProject do
|
|
95
113
|
</resource>
|
96
114
|
<resource>
|
97
115
|
<directory>.</directory>
|
116
|
+
<targetPath>WEB-INF</targetPath>
|
98
117
|
<includes>
|
99
118
|
<include>app/**</include>
|
100
119
|
<include>config/**</include>
|
@@ -102,39 +121,19 @@ describe Maven::Tools::RailsProject do
|
|
102
121
|
<include>vendor/**</include>
|
103
122
|
<include>Gemfile</include>
|
104
123
|
</includes>
|
105
|
-
<targetPath>WEB-INF</targetPath>
|
106
124
|
</resource>
|
107
125
|
<resource>
|
108
126
|
<directory>${gem.path}</directory>
|
127
|
+
<targetPath>WEB-INF/gems</targetPath>
|
109
128
|
<includes>
|
110
129
|
<include>gems/**</include>
|
111
130
|
<include>specifications/**</include>
|
112
131
|
</includes>
|
113
|
-
<targetPath>WEB-INF/gems</targetPath>
|
114
132
|
</resource>
|
115
133
|
</webResources>
|
116
134
|
<webXml>config/web.xml</webXml>
|
117
135
|
</configuration>
|
118
136
|
</plugin>
|
119
|
-
<plugin>
|
120
|
-
<groupId>de.saumya.mojo</groupId>
|
121
|
-
<artifactId>bundler-maven-plugin</artifactId>
|
122
|
-
<version>${jruby.plugins.version}</version>
|
123
|
-
</plugin>
|
124
|
-
<plugin>
|
125
|
-
<groupId>de.saumya.mojo</groupId>
|
126
|
-
<artifactId>rails3-maven-plugin</artifactId>
|
127
|
-
<version>${jruby.plugins.version}</version>
|
128
|
-
<executions>
|
129
|
-
<execution>
|
130
|
-
<id>in_phase_validate</id>
|
131
|
-
<phase>validate</phase>
|
132
|
-
<goals>
|
133
|
-
<goal>initialize</goal>
|
134
|
-
</goals>
|
135
|
-
</execution>
|
136
|
-
</executions>
|
137
|
-
</plugin>
|
138
137
|
</plugins>
|
139
138
|
<pluginManagement>
|
140
139
|
<plugins>
|
@@ -146,17 +145,17 @@ describe Maven::Tools::RailsProject do
|
|
146
145
|
<lifecycleMappingMetadata>
|
147
146
|
<pluginExecutions>
|
148
147
|
<pluginExecution>
|
149
|
-
<action>
|
150
|
-
<ignore></ignore>
|
151
|
-
</action>
|
152
148
|
<pluginExecutionFilter>
|
149
|
+
<groupId>de.saumya.mojo</groupId>
|
153
150
|
<artifactId>bundler-maven-plugin</artifactId>
|
151
|
+
<versionRange>[0,)</versionRange>
|
154
152
|
<goals>
|
155
153
|
<goal>install</goal>
|
156
154
|
</goals>
|
157
|
-
<groupId>de.saumya.mojo</groupId>
|
158
|
-
<versionRange>[0,)</versionRange>
|
159
155
|
</pluginExecutionFilter>
|
156
|
+
<action>
|
157
|
+
<ignore></ignore>
|
158
|
+
</action>
|
160
159
|
</pluginExecution>
|
161
160
|
</pluginExecutions>
|
162
161
|
</lifecycleMappingMetadata>
|
@@ -179,27 +178,27 @@ describe Maven::Tools::RailsProject do
|
|
179
178
|
</activation>
|
180
179
|
</profile>
|
181
180
|
<profile>
|
182
|
-
<id>
|
181
|
+
<id>test</id>
|
183
182
|
<activation>
|
183
|
+
<activeByDefault>true</activeByDefault>
|
184
184
|
<property>
|
185
185
|
<name>rails.env</name>
|
186
|
-
<value>
|
186
|
+
<value>test</value>
|
187
187
|
</property>
|
188
188
|
</activation>
|
189
|
-
<properties>
|
190
|
-
<gem.home>${project.build.directory}/rubygems-production</gem.home>
|
191
|
-
<gem.path>${project.build.directory}/rubygems-production</gem.path>
|
192
|
-
</properties>
|
193
189
|
</profile>
|
194
190
|
<profile>
|
195
|
-
<id>
|
191
|
+
<id>production</id>
|
196
192
|
<activation>
|
197
|
-
<activeByDefault>true</activeByDefault>
|
198
193
|
<property>
|
199
194
|
<name>rails.env</name>
|
200
|
-
<value>
|
195
|
+
<value>production</value>
|
201
196
|
</property>
|
202
197
|
</activation>
|
198
|
+
<properties>
|
199
|
+
<gem.home>${project.build.directory}/rubygems-production</gem.home>
|
200
|
+
<gem.path>${project.build.directory}/rubygems-production</gem.path>
|
201
|
+
</properties>
|
203
202
|
</profile>
|
204
203
|
</profiles>
|
205
204
|
</project>
|
@@ -207,7 +206,6 @@ XML
|
|
207
206
|
end
|
208
207
|
|
209
208
|
it 'should load Gemfile from a rails application"' do
|
210
|
-
pending "hash is differently orderd in ruby1.8" if nil == (RUBY_VERSION =~ /^1.8/) && !defined? JRUBY_VERSION
|
211
209
|
@project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.rails'))
|
212
210
|
@project.to_xml.should == <<-XML
|
213
211
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
@@ -258,22 +256,22 @@ XML
|
|
258
256
|
</dependencies>
|
259
257
|
</profile>
|
260
258
|
<profile>
|
261
|
-
<id>
|
259
|
+
<id>test</id>
|
262
260
|
<dependencies>
|
263
261
|
<dependency>
|
264
262
|
<groupId>rubygems</groupId>
|
265
|
-
<artifactId
|
263
|
+
<artifactId>rspec</artifactId>
|
266
264
|
<version>[0,)</version>
|
267
265
|
<type>gem</type>
|
268
266
|
</dependency>
|
269
267
|
</dependencies>
|
270
268
|
</profile>
|
271
269
|
<profile>
|
272
|
-
<id>
|
270
|
+
<id>production</id>
|
273
271
|
<dependencies>
|
274
272
|
<dependency>
|
275
273
|
<groupId>rubygems</groupId>
|
276
|
-
<artifactId
|
274
|
+
<artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}mysql</artifactId>
|
277
275
|
<version>[0,)</version>
|
278
276
|
<type>gem</type>
|
279
277
|
</dependency>
|