Mavenfile in jruby-jars-1.7.15 vs Mavenfile in jruby-jars-1.7.16
- old
+ new
@@ -1,10 +1,14 @@
#-*- mode: ruby -*-
gemspec
-inherit "org.jruby:jruby-artifacts:#{model.version.sub( /.dev$/, '-SNAPSHOT' )}"
+ruby_version = model.version
+inherit "org.jruby:jruby-artifacts:#{ruby_version.sub( /.dev$/, '-SNAPSHOT' )}"
+
+model.version = nil
+
name "JRuby Jars Gem"
jar 'org.jruby:jruby-core-complete', '${project.parent.version}'
jar 'org.jruby:jruby-stdlib-complete', '${project.parent.version}'
@@ -25,11 +29,15 @@
:gemspec => 'jruby-jars.gemspec',
:includeDependencies => true ) do
execute_goals :id => 'default-push', :skip => true
end
-#plugin :install, :skip => true
+build do
+ final_name "${project.artifactId}-#{ruby_version}"
+end
+# TODO remove once gem-maven-plugin honors the final_name
+plugin :install, :skip => true
execute 'rename gem file', :verify do |ctx|
require 'fileutils'
FileUtils.rm_rf(Dir["#{ctx.project.build.directory}/*.gem"])
FileUtils.mv(Dir["#{ctx.project.basedir}/*.gem"], ctx.project.build.directory)
end