-
Notifications
You must be signed in to change notification settings - Fork 19
/
Mavenfile
59 lines (49 loc) · 1.96 KB
/
Mavenfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# frozen_string_literal: true
gemfile
plugin_repository id: :mavengems, url: 'mavengem:https://rubygems.org'
jruby_plugin(:minitest, minispecDirectory: 'specs/*_spec.rb') do
execute_goals(:spec)
gem 'ruby-maven', '${ruby-maven.version}'
end
# retrieve the ruby-maven version
gemfile_profile = @model.profiles.detect do |p|
p.id.to_sym == :gemfile
end || @model
ruby_maven = gemfile_profile.dependencies.detect do |d|
d.artifact_id == 'ruby-maven'
end
properties('jruby.versions' => ['${jruby.version}'].join(','),
# just lock the version
'bundler.version' => '2.5.11',
'ruby-maven.version' => ruby_maven.version,
'jruby.version' => '9.4.8.0',
'jruby.plugins.version' => '3.0.2',
'push.skip' => true)
plugin :invoker, '1.8' do
execute_goals(:install, :run,
id: 'integration-tests',
projectsDirectory: 'integration',
streamLogs: true,
goals: ['install'],
preBuildHookScript: 'setup.bsh',
postBuildHookScript: 'verify.bsh',
cloneProjectsTo: '${project.build.directory}',
properties: { 'jar-dependencies.version' => '${project.version}',
# use an old jruby with old ruby-maven here
'jruby.version' => '${jruby.version}',
'jruby.plugins.version' => '${jruby.plugins.version}',
'bundler.version' => '${bundler.version}',
'ruby-maven.version' => '${ruby-maven.version}' })
end
distribution_management do
repository id: :ossrh, url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
end
profile id: :skip do
properties 'maven.test.skip' => true, 'invoker.skip' => true
end
profile id: :release do
properties 'maven.test.skip' => true, 'invoker.skip' => true, 'push.skip' => false
build do
default_goal :deploy
end
end