Skip to content

Commit

Permalink
adds windows build
Browse files Browse the repository at this point in the history
mkristian committed Sep 17, 2017
1 parent c07da80 commit 9e6f01d
Showing 5 changed files with 52 additions and 2 deletions.
29 changes: 29 additions & 0 deletions maven/jruby-windows/pom.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require 'fileutils'
project 'JRuby Windows' do

version = ENV['JRUBY_VERSION'] ||
File.read( File.join( basedir, '..', '..', 'VERSION' ) ).strip

model_version '4.0.0'
id "org.jruby:jruby-windows:#{version}"
inherit "org.jruby:jruby-artifacts:#{version}"
packaging 'pom'

# we have no sources and attach an empty jar later in the build to
# satisfy oss.sonatype.org upload
plugin( :source, 'skipSource' => 'true' )

phase 'package' do
execute :build_windows_bits do |ctx|
windows = File.join(ctx.project.build.directory, 'jruby.exe')
FileUtils.mkdir_p(File.dirname(windows))
File.write(windows, 'example')
end

plugin 'org.codehaus.mojo:build-helper-maven-plugin', '3.0.0' do
execute_goal :'attach-artifact', artifacts: [{file: 'target/jruby.exe',
type: 'exe'}]
end
end
end

Binary file added maven/jruby-windows/src/empty.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion maven/pom.rb
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@
map = { 'jruby' => [ :apps, :release, :main, :osgi, :j2ee, :snapshots ],
'jruby-complete' => [ :release, :complete, :osgi, :'jruby_complete_jar_extended', :snapshots],
'jruby-jars' => [ :release, :'jruby-jars', :snapshots ],
'jruby-dist' => [ :release, :dist, :snapshots ]
'jruby-dist' => [ :release, :dist, :snapshots ],
'jruby-windows' => [ :release, :'jruby-windows', :snapshots ]
}

profile :all do
2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
@@ -198,7 +198,7 @@
end
end

[ 'jruby-jars', 'main', 'complete', 'dist' ].each do |name|
[ 'jruby-jars', 'main', 'complete', 'dist', 'windows' ].each do |name|

profile name do

20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -642,6 +642,26 @@ DO NOT MODIFIY - GENERATED CODE
<module>maven</module>
</modules>
</profile>
<profile>
<id>windows</id>
<build>
<defaultGoal>install</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>maven</module>
</modules>
</profile>
<profile>
<id>osgi</id>
<build>

0 comments on commit 9e6f01d

Please sign in to comment.