mvn2 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mvn2 +3 -2
- data/lib/mvn2/plugin/command.plugin.rb +7 -2
- data/lib/mvn2/plugin.rb +2 -0
- data/lib/mvn2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 307a19e99a0b339ef9a1fa22afc085294f900aa2
|
4
|
+
data.tar.gz: b3eb60acf9ba030fc5041ccbdf4ecd8e87d656a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf6e14bad595696e9c5d226db443139ccfda614605ade358eae6fafa2287f3cb38d94eb2e62989e2790bd9e126dbe7ab3b273e6f4f84d488fe5e352b34426666
|
7
|
+
data.tar.gz: 63ef7c1ca4f00a19726074d308cb0f7ef8d01424c27f0d0d70391c910b94ba55ee02dc15b28dfcd30f3db13b0a8baa2324fea7e6f679334b37de32a554fbac74
|
data/bin/mvn2
CHANGED
@@ -14,8 +14,8 @@ include EverydayPlugins
|
|
14
14
|
|
15
15
|
Plugins.load_plugins 'mvn2'
|
16
16
|
|
17
|
-
#abcd h jkl
|
18
|
-
# efg i m
|
17
|
+
#abcd h jkl nop stuvw y 012 9
|
18
|
+
# efg i m qr x z 345678
|
19
19
|
|
20
20
|
class MyOptions
|
21
21
|
extend OptionUtil
|
@@ -60,6 +60,7 @@ class Mvn2Runner
|
|
60
60
|
def initialize(options)
|
61
61
|
@options = options
|
62
62
|
setup_cmd
|
63
|
+
puts '> ' << @cmd
|
63
64
|
Plugins.set_var :cmd, @cmd
|
64
65
|
Plugins.set_var :cmd_clean, @cmd_clean
|
65
66
|
end
|
@@ -12,6 +12,7 @@ class CommandPlugin
|
|
12
12
|
register :option_with_param, sym: :run_success, names: ['--run-success'], desc: 'run a command after finishing a successful maven build'
|
13
13
|
register :option_with_param, sym: :run_failure, names: ['--run-failure'], desc: 'run a command after finishing an unsuccessful maven build'
|
14
14
|
register :option_with_param, sym: :run_test, names: ['--run-test'], desc: 'run a specific test class or method(s) (support dependent on maven surefire plugin version)'
|
15
|
+
register :option, sym: :test_only, names: %w(-o --test-only), desc: 'instead of cleaning and rebuilding before running tests, only run test-compile before running tests'
|
15
16
|
end
|
16
17
|
|
17
18
|
def_options
|
@@ -19,7 +20,11 @@ class CommandPlugin
|
|
19
20
|
def self.def_others
|
20
21
|
register :goal_override, order: 10, option: :package, goal: 'package'
|
21
22
|
|
22
|
-
register(:goal_override, order: 20) { |options| options[:run_test].nil? ? nil : 'test' }
|
23
|
+
register(:goal_override, order: 20) { |options| (options[:run_test].nil? && !options[:test_only]) ? nil : 'test' }
|
24
|
+
|
25
|
+
register :clean_block, option: :test_only
|
26
|
+
|
27
|
+
register :goal_override, order: 10, option: :test_only, goal: 'test-compile'
|
23
28
|
|
24
29
|
register(:command_flag) { |options, flags| flags << ' -Dtest=' << options[:run_test] << ' -DfailIfNoTests=false' unless options[:run_test].nil? }
|
25
30
|
|
@@ -29,7 +34,7 @@ class CommandPlugin
|
|
29
34
|
|
30
35
|
register(:operation_name, priority: 100) { |options| options[:command_override].nil? ? nil : 'Operation' }
|
31
36
|
|
32
|
-
register(:block_average) { |options| !options[:command_override].nil? || !options[:run_test].nil? }
|
37
|
+
register(:block_average) { |options| !options[:command_override].nil? || !options[:run_test].nil? || options[:test_only] }
|
33
38
|
end
|
34
39
|
|
35
40
|
def_others
|
data/lib/mvn2/plugin.rb
CHANGED
@@ -160,6 +160,7 @@ module Mvn2
|
|
160
160
|
def_command_flag
|
161
161
|
def_command_goal
|
162
162
|
register_type(:operation_name) { |list| get_name(list) || 'Operation' }
|
163
|
+
register_type(:clean_block) { |list| basic_type(list) }
|
163
164
|
end
|
164
165
|
|
165
166
|
def self.def_command_flag
|
@@ -185,6 +186,7 @@ module Mvn2
|
|
185
186
|
goals = complex_filter(list.select { |v| !v[:options][:override_all] }.sort_by { |v| v[:options][:order] }, options, :goal)
|
186
187
|
goals = ['install'] if (goals - ['clean']).empty?
|
187
188
|
goals = ['clean'] + goals unless goals.include?('clean')
|
189
|
+
goals = goals - ['clean'] if Plugins.get(:clean_block)
|
188
190
|
goals.join(' ')
|
189
191
|
else
|
190
192
|
full_overrides.first
|
data/lib/mvn2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvn2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Henderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|