Skip to content

Commit 52d4d9d

Browse files
committedJul 6, 2018
adds windows installer to jruby-dist
1 parent 63f1c34 commit 52d4d9d

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed
 

Diff for: ‎maven/jruby-dist/pom.rb

+21-20
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,10 @@
2424
'outputDirectory' => '${project.build.directory}' } ] )
2525
end
2626

27-
execute :pack200 do |ctx|
28-
jruby_home = Dir[ File.join( ctx.project.build.directory.to_pathname,
29-
'META-INF/jruby.home/**/*.jar' ) ]
30-
gem_home = Dir[ File.join( ctx.project.build.directory.to_pathname,
31-
'rubygems-provided/**/*.jar' ) ]
32-
lib_dir = Dir[ File.join( ctx.basedir.to_pathname,
33-
'../../lib/*.jar' ) ]
34-
35-
(jruby_home + gem_home + lib_dir).each do |f|
36-
file = f.sub /.jar$/, ''
37-
unless File.exists?( file + '.pack.gz' )
38-
puts "pack200 #{f.sub(/.*jruby.home./, '').sub(/.*rubygems-provided./, '')}"
39-
system('pack200', "#{file}.pack.gz", "#{file}.jar")
40-
end
41-
end
27+
execute :install4j do |ctx|
28+
script = File.join(ctx.basedir.to_s, 'create_windows_installer.sh')
29+
outputfile = File.join(ctx.project.build.directory.to_pathname, "#{ctx.project.build.finalName}-windows.exe")
30+
`#{script} #{outputfile}`
4231
end
4332

4433
execute :fix_executable_bits do |ctx|
@@ -58,9 +47,15 @@
5847
:tarLongFileMode => 'gnu' ) do
5948
execute_goals( :single, :id => 'bin.tar.gz and bin.zip',
6049
:descriptors => [ 'src/main/assembly/bin.xml' ] )
61-
execute_goals( :single, :id => 'bin200.tar.gz',
62-
:attach => false,
63-
:descriptors => [ 'src/main/assembly/bin200.xml' ] )
50+
end
51+
52+
plugin 'org.codehaus.mojo:build-helper-maven-plugin' do
53+
execute_goal( 'attach-artifact',
54+
:id => 'attach-windows-artifacts',
55+
:artifacts => [ { :file => '${project.build.directory}/${project.build.finalName}-windows.exe',
56+
:type => 'exe',
57+
:classifier => 'windows' } ] )
58+
6459
end
6560
end
6661

@@ -91,7 +86,13 @@
9186
type: 'zip.sha256'},
9287
{ file: '${project.build.directory}/jruby-dist-${project.version}-src.zip.sha512',
9388
classifier: :src,
94-
type: 'zip.sha512'} ] )
89+
type: 'zip.sha512'},
90+
{ file: '${project.build.directory}/jruby-dist-${project.version}-windows.exe.sha256',
91+
classifier: :windows,
92+
type: 'exe.sha256'},
93+
{ file: '${project.build.directory}/jruby-dist-${project.version}-windows.exe.sha512',
94+
classifier: :windows,
95+
type: 'exe.sha512'} ] )
9596
end
9697
end
9798

@@ -123,7 +124,7 @@
123124
end
124125
plugin 'org.codehaus.mojo:build-helper-maven-plugin' do
125126
execute_goal( 'attach-artifact',
126-
:id => 'attach-artifacts',
127+
:id => 'attach-src-artifacts',
127128
:artifacts => [ { :file => '${project.build.directory}/${project.build.finalName}-src.zip',
128129
:type => 'zip',
129130
:classifier => 'src' } ] )

0 commit comments

Comments
 (0)
Please sign in to comment.