maven-tools 0.34.5 → 1.0.0.rc2

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 (47) hide show
  1. checksums.yaml +7 -0
  2. data/lib/maven/tools/artifact.rb +18 -12
  3. data/lib/maven/tools/dsl.rb +282 -121
  4. data/lib/maven/tools/gemfile_lock.rb +0 -6
  5. data/lib/maven/tools/model.rb +78 -69
  6. data/lib/maven/tools/pom.rb +8 -8
  7. data/lib/maven/tools/version.rb +1 -1
  8. data/lib/maven/tools/versions.rb +4 -4
  9. data/lib/maven/tools/visitor.rb +2 -2
  10. data/spec/gemfile_with_lock/bouncy-castle-version.rb +4 -0
  11. data/spec/pom_maven_alternative_style/pom.rb +116 -169
  12. data/spec/pom_maven_hash_style/pom.rb +134 -100
  13. data/spec/pom_maven_style/pom.rb +160 -163
  14. data/spec/pom_spec.rb +3 -1
  15. metadata +12 -90
  16. data/lib/maven/model/dependencies.rb +0 -249
  17. data/lib/maven/model/model.rb +0 -618
  18. data/lib/maven/model/utils.rb +0 -393
  19. data/lib/maven/tools/execute_in_phase.rb +0 -28
  20. data/lib/maven/tools/gem_project.rb +0 -513
  21. data/lib/maven/tools/maven_project.rb +0 -72
  22. data/lib/maven/tools/minimal_project.rb +0 -84
  23. data/lib/maven/tools/pom_generator.rb +0 -83
  24. data/lib/maven/tools/rails_project.rb +0 -133
  25. data/rspec/maven/model/dependencies_spec.rb +0 -260
  26. data/rspec/maven/model/model_spec.rb +0 -714
  27. data/rspec/maven/tools/Gemfile.gems +0 -11
  28. data/rspec/maven/tools/Gemfile.groups +0 -15
  29. data/rspec/maven/tools/Gemfile.ignored +0 -30
  30. data/rspec/maven/tools/Gemfile.lockfile +0 -8
  31. data/rspec/maven/tools/Gemfile.lockfile.lock +0 -53
  32. data/rspec/maven/tools/Gemfile.minimal +0 -1
  33. data/rspec/maven/tools/Gemfile.nolock +0 -1
  34. data/rspec/maven/tools/Gemfile.rails +0 -16
  35. data/rspec/maven/tools/Gemfile.simple +0 -7
  36. data/rspec/maven/tools/Gemfile.withlock +0 -1
  37. data/rspec/maven/tools/Gemfile.withlock.lock +0 -28
  38. data/rspec/maven/tools/Jarfile.with +0 -2
  39. data/rspec/maven/tools/Jarfile.with.lock +0 -1
  40. data/rspec/maven/tools/Jarfile.without +0 -2
  41. data/rspec/maven/tools/deps.gemspec +0 -8
  42. data/rspec/maven/tools/gem_project_spec.rb +0 -1126
  43. data/rspec/maven/tools/maven-tools.gemspec +0 -17
  44. data/rspec/maven/tools/minimal.gemspec +0 -5
  45. data/rspec/maven/tools/no-deps.gemspec +0 -27
  46. data/rspec/maven/tools/rails_project_spec.rb +0 -284
  47. data/rspec/maven/tools/spec_helper.rb +0 -22
@@ -54,109 +54,143 @@ project :name => 'my name', :url => 'example.com' do
54
54
  prerequisites :maven => '3.0.5'
55
55
 
56
56
  modules 'part1', 'part2'
57
+
58
+ scm( :connection => 'scm:git:git://github.com/torquebox/maven-tools.git',
59
+ :developer_connection => 'scm:git:ssh://git@github.com/torquebox/maven-tools.git',
60
+ :tag => 'first',
61
+ :url => 'http://github.com/torquebox/maven-tools' )
62
+ issue_management( :system => 'jira',
63
+ :url => 'https://issues.sonatype.org/' )
64
+ ci_management( :system => 'travis',
65
+ :url => 'travis-ci.org/jruby/jruby' ) do
66
+ notifier( :type => 'email',
67
+ :address => 'mail2@example.com' )
68
+ notifier( :type => 'email',
69
+ :send_on_error => true,
70
+ :send_on_failure => false,
71
+ :send_on_success =>true,
72
+ :send_on_warning => false,
73
+ :address => 'mail@example.com',
74
+ :configuration => { :key1 => 'value1',
75
+ :key2 => 'value2' } )
76
+ end
77
+ distribution( :status => 'active',
78
+ :download_url => 'http://dev.example.com/downloads' ) do
79
+ repository( :unique_version => 123,
80
+ :id => 'first',
81
+ :name => 'First',
82
+ :url => 'http://repo.example.com',
83
+ :layout => 'legacy' ) do
84
+ releases( :enabled => true,
85
+ :update_policy => 'daily',
86
+ :checksum_policy => :strict )
87
+ snapshots( :enabled =>false,
88
+ :update_policy => :never,
89
+ :checksum_policy => 'none' )
90
+ end
91
+ snapshot_repository( :unique_version => 1234,
92
+ :id => 'snapshots',
93
+ :name => 'First Snapshots',
94
+ :url => 'http://snaphots.example.com',
95
+ :layout => 'legacy' ) do
96
+ releases( :enabled => false,
97
+ :update_policy => 'daily',
98
+ :checksum_policy => :strict )
99
+ snapshots( :enabled =>true,
100
+ :update_policy => :never,
101
+ :checksum_policy => 'none' )
102
+ end
103
+ site( :id => 'first',
104
+ :name => 'dev site',
105
+ :url => 'http://dev.example.com' )
106
+ relocation( :group_id => 'org.group',
107
+ :artifact_id => 'artifact',
108
+ :version => '1.2.3',
109
+ :message => 'follow the maven convention' )
110
+ end
111
+ properties :key1 => 'value1', 'key2' => :value2
112
+ dependency_management do
113
+ jar( :group_id => 'com.example',
114
+ :artifact_id => 'tools',
115
+ :version => '1.2.3',
116
+ :classifier => 'super',
117
+ :scope => 'provided',
118
+ :system_path => '/home/development/tools.jar',
119
+ :exclusions => [ { :group_id => 'org.example',
120
+ :artifact_id => 'some' },
121
+ { :group_id => 'org.example',
122
+ :artifact_id => 'something' } ],
123
+ :optional => true )
124
+ end
125
+ war( :group_id => 'com.example',
126
+ :artifact_id => 'tools',
127
+ :version => '2.3',
128
+ :classifier => 'super',
129
+ :scope => 'provided',
130
+ :system_path => '/home/development/wartools.jar',
131
+ :exclusions => [ { :group_id => 'org.example',
132
+ :artifact_id => 'some' },
133
+ { :group_id => 'org.example',
134
+ :artifact_id => 'something' } ],
135
+ :optional => false )
136
+ repository( :id => 'first',
137
+ :url => 'http://repo.example.com',
138
+ :name => 'First',
139
+ :unique_version => 123,
140
+ :layout => 'legacy' ) do
141
+ releases( :enabled => true,
142
+ :update_policy => 'daily',
143
+ :checksum_policy => :strict )
144
+ snapshots( :enabled => false,
145
+ :update_policy => :never,
146
+ :checksum_policy => 'none' )
147
+ end
148
+ snapshot_repository( :id => 'snapshots',
149
+ :url => 'http://snaphots.example.com',
150
+ :name => 'First Snapshots',
151
+ :unique_version => 12345,
152
+ :layout => 'legacy' ) do
153
+ releases( :update_policy => 'daily',
154
+ :checksum_policy => :strict )
155
+ snapshots( :update_policy => :never,
156
+ :checksum_policy => 'none' )
157
+ end
158
+ plugin_repository( :id => :first,
159
+ :url => 'http://pluginrepo.example.com',
160
+ :name => 'First',
161
+ :unique_version => 12,
162
+ :layout => 'legacy' ) do
163
+ releases( :enabled => true,
164
+ :update_policy => 'daily',
165
+ :checksum_policy => :strict )
166
+ snapshots( :enabled => false,
167
+ :update_policy => :never,
168
+ :checksum_policy => 'none' )
169
+ end
170
+ build do
171
+ source_directory 'src'
172
+ script_source_directory 'script'
173
+ test_source_directory 'test'
174
+ output_directory 'pkg'
175
+ test_output_directory 'pkg/test'
176
+ default_goal :install
177
+ extension( :group_id => 'org.group',
178
+ :artifact_id => 'gem-extension',
179
+ :version => '1.2' )
180
+ resource( :target_path => 'target',
181
+ :filtering => true,
182
+ :directory => 'resources',
183
+ :includes => [ '**/*' ],
184
+ :excludes => [ '*~' ] )
185
+ test_resource( :target_path => 'target/test',
186
+ :filtering => false,
187
+ :directory => 'testresources',
188
+ :includes => [ '**/*' ],
189
+ :excludes => [ '*~' ] )
190
+ end
57
191
  end
58
- # <scm>
59
- # <connection/>
60
- # <developerConnection/>
61
- # <tag/>
62
- # <url/>
63
- # </scm>
64
- # <issueManagement>
65
- # <system/>
66
- # <url/>
67
- # </issueManagement>
68
- # <ciManagement>
69
- # <system/>
70
- # <url/>
71
- # <notifiers>
72
- # <notifier>
73
- # <type/>
74
- # <sendOnError/>
75
- # <sendOnFailure/>
76
- # <sendOnSuccess/>
77
- # <sendOnWarning/>
78
- # <address/>
79
- # <configuration>
80
- # <key>value</key>
81
- # </configuration>
82
- # </notifier>
83
- # </notifiers>
84
- # </ciManagement>
85
192
 
86
- # <distributionManagement>
87
- # <repository>
88
- # <uniqueVersion/>
89
- # <releases>
90
- # <enabled/>
91
- # <updatePolicy/>
92
- # <checksumPolicy/>
93
- # </releases>
94
- # <snapshots>
95
- # <enabled/>
96
- # <updatePolicy/>
97
- # <checksumPolicy/>
98
- # </snapshots>
99
- # <id/>
100
- # <name/>
101
- # <url/>
102
- # <layout/>
103
- # </repository>
104
- # <snapshotRepository>
105
- # <uniqueVersion/>
106
- # <releases>
107
- # <enabled/>
108
- # <updatePolicy/>
109
- # <checksumPolicy/>
110
- # </releases>
111
- # <snapshots>
112
- # <enabled/>
113
- # <updatePolicy/>
114
- # <checksumPolicy/>
115
- # </snapshots>
116
- # <id/>
117
- # <name/>
118
- # <url/>
119
- # <layout/>
120
- # </snapshotRepository>
121
- # <site>
122
- # <id/>
123
- # <name/>
124
- # <url/>
125
- # </site>
126
- # <downloadUrl/>
127
- # <relocation>
128
- # <groupId/>
129
- # <artifactId/>
130
- # <version/>
131
- # <message/>
132
- # </relocation>
133
- # <status/>
134
- # </distributionManagement>
135
-
136
- # <properties>
137
- # <key>value</key>
138
- # </properties>
139
193
 
140
- # <dependencyManagement>
141
- # <dependencies>
142
- # <dependency>
143
- # <groupId/>
144
- # <artifactId/>
145
- # <version/>
146
- # <type/>
147
- # <classifier/>
148
- # <scope/>
149
- # <systemPath/>
150
- # <exclusions>
151
- # <exclusion>
152
- # <artifactId/>
153
- # <groupId/>
154
- # </exclusion>
155
- # </exclusions>
156
- # <optional/>
157
- # </dependency>
158
- # </dependencies>
159
- # </dependencyManagement>
160
194
  # <dependencies>
161
195
  # <dependency>
162
196
  # <groupId/>
@@ -67,171 +67,168 @@ project do
67
67
  end
68
68
 
69
69
  modules 'part1', 'part2'
70
- end
71
- # <scm>
72
- # <connection/>
73
- # <developerConnection/>
74
- # <tag/>
75
- # <url/>
76
- # </scm>
77
- # <issueManagement>
78
- # <system/>
79
- # <url/>
80
- # </issueManagement>
81
- # <ciManagement>
82
- # <system/>
83
- # <url/>
84
- # <notifiers>
85
- # <notifier>
86
- # <type/>
87
- # <sendOnError/>
88
- # <sendOnFailure/>
89
- # <sendOnSuccess/>
90
- # <sendOnWarning/>
91
- # <address/>
92
- # <configuration>
93
- # <key>value</key>
94
- # </configuration>
95
- # </notifier>
96
- # </notifiers>
97
- # </ciManagement>
98
-
99
- # <distributionManagement>
100
- # <repository>
101
- # <uniqueVersion/>
102
- # <releases>
103
- # <enabled/>
104
- # <updatePolicy/>
105
- # <checksumPolicy/>
106
- # </releases>
107
- # <snapshots>
108
- # <enabled/>
109
- # <updatePolicy/>
110
- # <checksumPolicy/>
111
- # </snapshots>
112
- # <id/>
113
- # <name/>
114
- # <url/>
115
- # <layout/>
116
- # </repository>
117
- # <snapshotRepository>
118
- # <uniqueVersion/>
119
- # <releases>
120
- # <enabled/>
121
- # <updatePolicy/>
122
- # <checksumPolicy/>
123
- # </releases>
124
- # <snapshots>
125
- # <enabled/>
126
- # <updatePolicy/>
127
- # <checksumPolicy/>
128
- # </snapshots>
129
- # <id/>
130
- # <name/>
131
- # <url/>
132
- # <layout/>
133
- # </snapshotRepository>
134
- # <site>
135
- # <id/>
136
- # <name/>
137
- # <url/>
138
- # </site>
139
- # <downloadUrl/>
140
- # <relocation>
141
- # <groupId/>
142
- # <artifactId/>
143
- # <version/>
144
- # <message/>
145
- # </relocation>
146
- # <status/>
147
- # </distributionManagement>
148
-
149
- # <properties>
150
- # <key>value</key>
151
- # </properties>
152
-
153
- # <dependencyManagement>
154
- # <dependencies>
155
- # <dependency>
156
- # <groupId/>
157
- # <artifactId/>
158
- # <version/>
159
- # <type/>
160
- # <classifier/>
161
- # <scope/>
162
- # <systemPath/>
163
- # <exclusions>
164
- # <exclusion>
165
- # <artifactId/>
166
- # <groupId/>
167
- # </exclusion>
168
- # </exclusions>
169
- # <optional/>
170
- # </dependency>
171
- # </dependencies>
172
- # </dependencyManagement>
173
- # <dependencies>
174
- # <dependency>
175
- # <groupId/>
176
- # <artifactId/>
177
- # <version/>
178
- # <type/>
179
- # <classifier/>
180
- # <scope/>
181
- # <systemPath/>
182
- # <exclusions>
183
- # <exclusion>
184
- # <artifactId/>
185
- # <groupId/>
186
- # </exclusion>
187
- # </exclusions>
188
- # <optional/>
189
- # </dependency>
190
- # </dependencies>
191
-
192
- # <repositories>
193
- # <repository>
194
- # <releases>
195
- # <enabled/>
196
- # <updatePolicy/>
197
- # <checksumPolicy/>
198
- # </releases>
199
- # <snapshots>
200
- # <enabled/>
201
- # <updatePolicy/>
202
- # <checksumPolicy/>
203
- # </snapshots>
204
- # <id/>
205
- # <name/>
206
- # <url/>
207
- # <layout/>
208
- # </repository>
209
- # </repositories>
210
- # <pluginRepositories>
211
- # <pluginRepository>
212
- # <releases>
213
- # <enabled/>
214
- # <updatePolicy/>
215
- # <checksumPolicy/>
216
- # </releases>
217
- # <snapshots>
218
- # <enabled/>
219
- # <updatePolicy/>
220
- # <checksumPolicy/>
221
- # </snapshots>
222
- # <id/>
223
- # <name/>
224
- # <url/>
225
- # <layout/>
226
- # </pluginRepository>
227
- # </pluginRepositories>
228
70
 
71
+ scm do
72
+ connection 'scm:git:git://github.com/torquebox/maven-tools.git'
73
+ developer_connection 'scm:git:ssh://git@github.com/torquebox/maven-tools.git'
74
+ tag 'first'
75
+ url 'http://github.com/torquebox/maven-tools'
76
+ end
77
+ issue_management do
78
+ system 'jira'
79
+ url 'https://issues.sonatype.org/'
80
+ end
81
+ ci_management do
82
+ url 'travis-ci.org/jruby/jruby'
83
+ system 'travis'
84
+ notifier do
85
+ type 'email'
86
+ address 'mail2@example.com'
87
+ end
88
+ notifier do
89
+ type 'email'
90
+ address 'mail@example.com'
91
+ send_on_error true
92
+ send_on_failure false
93
+ send_on_success true
94
+ send_on_warning false
95
+ configuration :key1 => 'value1', :key2 => 'value2'
96
+ end
97
+ end
98
+ distribution do
99
+ status 'active'
100
+ download_url 'http://dev.example.com/downloads'
101
+ repository do
102
+ id :first
103
+ url 'http://repo.example.com'
104
+ name 'First'
105
+ unique_version 123
106
+ layout 'legacy'
107
+ releases do
108
+ enabled true
109
+ update_policy 'daily'
110
+ checksum_policy :strict
111
+ end
112
+ snapshots do
113
+ enabled false
114
+ update_policy :never
115
+ checksum_policy 'none'
116
+ end
117
+ end
118
+ snapshot_repository( 'snapshots',
119
+ 'http://snaphots.example.com',
120
+ 'First Snapshots',
121
+ :unique_version => 1234,
122
+ :layout => 'legacy' ) do
123
+ releases( :enabled => false,
124
+ :update_policy => 'daily',
125
+ :checksum_policy => :strict )
126
+ snapshots( :enabled =>true,
127
+ :update_policy => :never,
128
+ :checksum_policy => 'none' )
129
+ end
130
+ site do
131
+ id 'first'
132
+ url 'http://dev.example.com'
133
+ name 'dev site'
134
+ end
135
+ relocation( 'org.group:artifact:1.2.3' ) do
136
+ message 'follow the maven convention'
137
+ end
138
+ end
139
+ properties :key1 => 'value1', 'key2' => :value2
140
+ dependency_management do
141
+ jar( 'com.example:tools:1.2.3' ) do
142
+ classifier 'super'
143
+ scope 'provided'
144
+ system_path '/home/development/tools.jar'
145
+ optional true
146
+ exclusion 'org.example:some'
147
+ exclusion 'org.example', 'something'
148
+ end
149
+ end
150
+ war( 'com.example:tools', '2.3' ) do
151
+ classifier 'super'
152
+ scope 'provided'
153
+ system_path '/home/development/wartools.jar'
154
+ optional false
155
+ exclusion 'org.example:some'
156
+ exclusion 'org.example', 'something'
157
+ end
158
+ repository do
159
+ id :first
160
+ url 'http://repo.example.com'
161
+ name 'First'
162
+ unique_version 123
163
+ layout 'legacy'
164
+ releases do
165
+ enabled true
166
+ update_policy 'daily'
167
+ checksum_policy :strict
168
+ end
169
+ snapshots do
170
+ enabled false
171
+ update_policy :never
172
+ checksum_policy 'none'
173
+ end
174
+ end
175
+ snapshot_repository do
176
+ id 'snapshots'
177
+ url 'http://snaphots.example.com'
178
+ name 'First Snapshots'
179
+ unique_version 12345
180
+ layout 'legacy'
181
+ releases do
182
+ update_policy 'daily'
183
+ checksum_policy :strict
184
+ end
185
+ snapshots do
186
+ update_policy :never
187
+ checksum_policy 'none'
188
+ end
189
+ end
190
+ plugin_repository do
191
+ id :first
192
+ url 'http://pluginrepo.example.com'
193
+ name 'First'
194
+ unique_version 12
195
+ layout 'legacy'
196
+ releases do
197
+ enabled true
198
+ update_policy 'daily'
199
+ checksum_policy :strict
200
+ end
201
+ snapshots do
202
+ enabled false
203
+ update_policy :never
204
+ checksum_policy 'none'
205
+ end
206
+ end
207
+ build do
208
+ source_directory 'src'
209
+ script_source_directory 'script'
210
+ test_source_directory 'test'
211
+ output_directory 'pkg'
212
+ test_output_directory 'pkg/test'
213
+ default_goal :install
214
+ extension 'org.group:gem-extension:1.2'
215
+ resource do
216
+ target_path 'target'
217
+ filtering true
218
+ directory 'resources'
219
+ includes [ '**/*' ]
220
+ excludes [ '*~' ]
221
+ end
222
+ test_resource do
223
+ target_path 'target/test'
224
+ filtering false
225
+ directory 'testresources'
226
+ includes [ '**/*' ]
227
+ excludes [ '*~' ]
228
+ end
229
+ end
230
+ end
229
231
  # <build>
230
- # <sourceDirectory/>
231
- # <scriptSourceDirectory/>
232
- # <testSourceDirectory/>
233
- # <outputDirectory/>
234
- # <testOutputDirectory/>
235
232
  # <extensions>
236
233
  # <extension>
237
234
  # <groupId/>