maven-tools 0.32.0 → 0.32.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/maven-tools.rb +20 -0
- data/lib/maven/model/dependencies.rb +21 -1
- data/lib/maven/model/model.rb +21 -1
- data/lib/maven/model/utils.rb +21 -1
- data/lib/maven/tools/coordinate.rb +21 -1
- data/lib/maven/tools/execute_in_phase.rb +20 -1
- data/lib/maven/tools/gem_project.rb +39 -3
- data/lib/maven/tools/gemfile_lock.rb +21 -1
- data/lib/maven/tools/jarfile.rb +21 -1
- data/lib/maven/tools/minimal_project.rb +21 -1
- data/lib/maven/tools/pom_generator.rb +21 -1
- data/lib/maven/tools/rails_project.rb +23 -2
- data/lib/maven/tools/version.rb +21 -1
- data/lib/maven/tools/versions.rb +25 -5
- data/lib/maven_tools.rb +20 -0
- data/rspec/maven/model/dependencies_spec.rb +260 -0
- data/rspec/maven/model/model_spec.rb +713 -0
- data/rspec/maven/tools/Gemfile.gems +11 -0
- data/rspec/maven/tools/Gemfile.groups +15 -0
- data/rspec/maven/tools/Gemfile.ignored +30 -0
- data/rspec/maven/tools/Gemfile.lockfile +8 -0
- data/rspec/maven/tools/Gemfile.lockfile.lock +53 -0
- data/rspec/maven/tools/Gemfile.minimal +1 -0
- data/rspec/maven/tools/Gemfile.nolock +1 -0
- data/rspec/maven/tools/Gemfile.rails +16 -0
- data/rspec/maven/tools/Gemfile.simple +7 -0
- data/rspec/maven/tools/Gemfile.withlock +1 -0
- data/rspec/maven/tools/Gemfile.withlock.lock +28 -0
- data/rspec/maven/tools/Jarfile.with +2 -0
- data/rspec/maven/tools/Jarfile.with.lock +1 -0
- data/rspec/maven/tools/Jarfile.without +2 -0
- data/rspec/maven/tools/deps.gemspec +8 -0
- data/rspec/maven/tools/gem_project_spec.rb +1127 -0
- data/rspec/maven/tools/maven-tools.gemspec +17 -0
- data/rspec/maven/tools/minimal.gemspec +5 -0
- data/rspec/maven/tools/no-deps.gemspec +27 -0
- data/rspec/maven/tools/rails_project_spec.rb +286 -0
- data/rspec/maven/tools/spec_helper.rb +22 -0
- metadata +66 -3
data/lib/maven-tools.rb
CHANGED
@@ -1 +1,21 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
require 'maven_tools'
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
# TODO make nice require after ruby-maven uses the same ruby files
|
2
22
|
require File.join(File.dirname(__FILE__), 'utils.rb')
|
3
23
|
require File.join(File.dirname(File.dirname(__FILE__)), 'tools', 'coordinate.rb')
|
@@ -226,4 +246,4 @@ module Maven
|
|
226
246
|
end
|
227
247
|
end
|
228
248
|
end
|
229
|
-
end
|
249
|
+
end
|
data/lib/maven/model/model.rb
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
# TODO make nice require after ruby-maven uses the same ruby files
|
2
22
|
require File.join(File.dirname(__FILE__), 'dependencies.rb')
|
3
23
|
#require 'maven/model/dependencies'
|
@@ -598,4 +618,4 @@ module Maven
|
|
598
618
|
end
|
599
619
|
end
|
600
620
|
end
|
601
|
-
end
|
621
|
+
end
|
data/lib/maven/model/utils.rb
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
module Maven
|
2
22
|
module Model
|
3
23
|
class Tag
|
@@ -369,4 +389,4 @@ EOF
|
|
369
389
|
end
|
370
390
|
end
|
371
391
|
end
|
372
|
-
end
|
392
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
module Maven
|
2
22
|
module Tools
|
3
23
|
module Coordinate
|
@@ -89,4 +109,4 @@ module Maven
|
|
89
109
|
end
|
90
110
|
end
|
91
111
|
end
|
92
|
-
end
|
112
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
require File.join(File.dirname(__FILE__), 'gem_project.rb')
|
2
22
|
|
3
23
|
proj = Maven::Tools::GemProject.new("in_phase_execution")
|
@@ -6,4 +26,3 @@ proj.load_mavenfile(ARGV[0])
|
|
6
26
|
|
7
27
|
block = proj.executions_in_phase[ARGV[1]]
|
8
28
|
block.call if block
|
9
|
-
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
# TODO make nice require after ruby-maven uses the same ruby files
|
2
22
|
require File.join(File.dirname(File.dirname(__FILE__)), 'model', 'model.rb')
|
3
23
|
require File.join(File.dirname(__FILE__), 'gemfile_lock.rb')
|
@@ -125,7 +145,14 @@ module Maven
|
|
125
145
|
# use this construct to get the same result in 1.8.x and 1.9.x
|
126
146
|
req.collect{ |i| i.to_s }.join
|
127
147
|
end
|
128
|
-
|
148
|
+
add_gem(dep.name, versions).scope = scope
|
149
|
+
if @lock
|
150
|
+
# add its dependencies as well to have the version
|
151
|
+
# determine by the dependencyManagement
|
152
|
+
@lock.dependency_hull(dep.name).map.each do |d|
|
153
|
+
add_gem(d[0], d[1]).scope = scope unless gem? d[0]
|
154
|
+
end
|
155
|
+
end
|
129
156
|
end
|
130
157
|
|
131
158
|
spec.requirements.each do |req|
|
@@ -175,6 +202,15 @@ module Maven
|
|
175
202
|
|
176
203
|
# we have a Gemfile so we add the bundler plugin
|
177
204
|
plugin(:bundler)
|
205
|
+
|
206
|
+
# cleanup versions from deps
|
207
|
+
if @lock
|
208
|
+
dependencies.each do |d|
|
209
|
+
if d.group_id == 'rubygems' && @lock.keys.member?( d.artifact_id )
|
210
|
+
d.version = nil
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
178
214
|
else
|
179
215
|
self
|
180
216
|
end
|
@@ -280,7 +316,7 @@ module Maven
|
|
280
316
|
bundler = plugin(:bundler)
|
281
317
|
bundler.version = "${jruby.plugins.version}" unless bundler.version
|
282
318
|
unless gem?(:bundler)
|
283
|
-
gem("bundler")
|
319
|
+
gem("bundler").scope :test
|
284
320
|
end
|
285
321
|
end
|
286
322
|
|
@@ -506,4 +542,4 @@ if $0 == __FILE__
|
|
506
542
|
proj.load(ARGV[1] || 'Mavenfile')
|
507
543
|
proj.add_defaults
|
508
544
|
puts proj.to_xml
|
509
|
-
end
|
545
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
module Maven
|
2
22
|
module Tools
|
3
23
|
class GemfileLock < Hash
|
@@ -67,4 +87,4 @@ if $0 == __FILE__
|
|
67
87
|
lockfile = Maven::Tools::GemfileLock.new(File.new(ARGV[0] || 'Gemfile.lock'))
|
68
88
|
p lockfile
|
69
89
|
p lockfile.dependency_hull("rails")
|
70
|
-
end
|
90
|
+
end
|
data/lib/maven/tools/jarfile.rb
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
require File.join(File.dirname(__FILE__), 'coordinate.rb')
|
2
22
|
module Maven
|
3
23
|
module Tools
|
@@ -92,4 +112,4 @@ module Maven
|
|
92
112
|
end
|
93
113
|
|
94
114
|
end
|
95
|
-
end
|
115
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
# TODO make nice require after ruby-maven uses the same ruby files
|
2
22
|
require 'maven/model/model'
|
3
23
|
require 'maven/tools/versions'
|
@@ -60,4 +80,4 @@ module Maven
|
|
60
80
|
end
|
61
81
|
end
|
62
82
|
end
|
63
|
-
end
|
83
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
require File.join(File.dirname(__FILE__), 'rails_project.rb')
|
2
22
|
module Maven
|
3
23
|
module Tools
|
@@ -60,4 +80,4 @@ when 4
|
|
60
80
|
puts generator.send("read_#{ARGV[0]}".to_sym, ARGV[1], ARGV[2], ARGV[3])
|
61
81
|
else
|
62
82
|
generator
|
63
|
-
end
|
83
|
+
end
|
@@ -1,3 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
require File.join(File.dirname(__FILE__), 'gem_project.rb')
|
2
22
|
module Maven
|
3
23
|
module Tools
|
@@ -53,6 +73,8 @@ module Maven
|
|
53
73
|
"gem.includeRubygemsInTestResources" => false
|
54
74
|
}.merge(self.properties)
|
55
75
|
|
76
|
+
dependencies.find { |d| d.artifact_id == 'bundler' }.scope = nil
|
77
|
+
|
56
78
|
plugin(:rails3) do |rails|
|
57
79
|
rails.version = "${jruby.plugins.version}" unless rails.version
|
58
80
|
rails.in_phase(:validate).execute_goal(:initialize)
|
@@ -97,7 +119,6 @@ module Maven
|
|
97
119
|
"gem.path" => "${project.build.directory}/rubygems-production"
|
98
120
|
}.merge(prod.properties)
|
99
121
|
end
|
100
|
-
|
101
122
|
end
|
102
123
|
end
|
103
124
|
end
|
@@ -109,4 +130,4 @@ if $0 == __FILE__
|
|
109
130
|
proj.load(ARGV[1] || 'Mavenfile')
|
110
131
|
proj.add_defaults
|
111
132
|
puts proj.to_xml
|
112
|
-
end
|
133
|
+
end
|
data/lib/maven/tools/version.rb
CHANGED
@@ -1,5 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
module Maven
|
2
22
|
module Tools
|
3
|
-
VERSION = '0.32.
|
23
|
+
VERSION = '0.32.1'.freeze
|
4
24
|
end
|
5
25
|
end
|
data/lib/maven/tools/versions.rb
CHANGED
@@ -1,15 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
1
21
|
module Maven
|
2
22
|
module Tools
|
3
23
|
unless defined? VERSIONS
|
4
24
|
VERSIONS = {
|
5
|
-
:jruby_rack => "1.1.
|
25
|
+
:jruby_rack => "1.1.13.1",
|
6
26
|
:assembly_plugin => "2.3",
|
7
27
|
:war_plugin => "2.2",
|
8
28
|
:jar_plugin => "2.4",
|
9
|
-
:jruby_plugins => "0.29.
|
10
|
-
:bundler_version => "1.
|
11
|
-
:jruby_version => defined?(JRUBY_VERSION) ? JRUBY_VERSION : "1.
|
29
|
+
:jruby_plugins => "0.29.2",
|
30
|
+
:bundler_version => "1.2.3",
|
31
|
+
:jruby_version => defined?(JRUBY_VERSION) ? JRUBY_VERSION : "1.7.2"
|
12
32
|
}.freeze
|
13
33
|
end
|
14
34
|
end
|
15
|
-
end
|
35
|
+
end
|