Skip to content

Commit

Permalink
Update jruby-maven-plugins to new group and version
Browse files Browse the repository at this point in the history
This update is necessary to get JRuby 9.4.3.0 running throughout
the JRuby/Maven stack, which is necessary to move to the new
mavengems.

See jruby/jruby-maven-plugins#126

See jruby/mavengem#9

There are also changes to replace the use of `jruby_plugin` in
several poms with a normal `plugin` DSL call, due to the former
hardcoding an old package for the jruby-maven-plugins.

See jruby/maven-tools#37
  • Loading branch information
headius committed Aug 3, 2023
1 parent df8cb6d commit 3f7f7e8
Show file tree
Hide file tree
Showing 30 changed files with 51 additions and 58 deletions.
2 changes: 1 addition & 1 deletion lib/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def log(message=nil)

properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,
'jruby.plugins.version' => '1.1.2',
'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'gem.home' => '${basedir}/ruby/gems/shared',
# we copy everything into the target/classes/META-INF
# so the jar plugin just packs it - see build/resources below
Expand Down
2 changes: 1 addition & 1 deletion lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DO NOT MODIFY - GENERATED CODE
<gem.home>${basedir}/ruby/gems/shared</gem.home>
<jruby.complete.gems>${jruby.complete.home}/lib/ruby/gems/shared</jruby.complete.gems>
<jruby.complete.home>${project.build.outputDirectory}/META-INF/jruby.home</jruby.complete.home>
<jruby.plugins.version>1.1.2</jruby.plugins.version>
<jruby.plugins.version>3.0.0-SNAPSHOT</jruby.plugins.version>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
</properties>
Expand Down
8 changes: 4 additions & 4 deletions lifecycle-mapping-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>de.saumya.mojo</groupId>
<groupId>org.jruby.maven</groupId>
<artifactId>gem-maven-plugin</artifactId>
<versionRange>1.0.0-rc</versionRange>
<versionRange>3.0.0-SNAPSHOT</versionRange>
<goals>
<goal>initialize</goal>
</goals>
Expand All @@ -42,9 +42,9 @@
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>de.saumya.mojo</groupId>
<groupId>org.jruby.maven</groupId>
<artifactId>gem-maven-plugin</artifactId>
<versionRange>1.0.0-rc2</versionRange>
<versionRange>3.0.0-SNAPSHOT</versionRange>
<goals>
<goal>initialize</goal>
</goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<extension>
<groupId>org.jruby.maven</groupId>
<artifactId>mavengem-wagon</artifactId>
<version>1.0.3</version>
<version>2.0.0-SNAPSHOT</version>
</extension>
</extensions>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion maven/jruby-complete/src/it/extended/Mavenfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-*- mode: ruby -*-

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8',
'jruby.home' => '${basedir}/../../../../..' )

Expand Down
6 changes: 3 additions & 3 deletions maven/jruby-complete/src/it/runnable/Mavenfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#-*- mode: ruby -*-

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
'mavengem.wagon.version' => '1.0.3',
'jruby.version' => '9.0.5.0' )
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'mavengem.wagon.version' => '2.0.0-SNAPSHOT',
'jruby.version' => '9.4.3.0' )

gemfile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
packaging 'bundle'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
# needed bundle plugin
'polyglot.dump.pom' => 'pom.xml' )

jruby_plugin! :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
plugin! 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'

plugin( 'org.apache.felix:maven-bundle-plugin', '2.4.0',
:instructions => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
packaging :pom

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8' )

modules [ 'gems-bundle', 'scripts-bundle', 'test' ]
4 changes: 2 additions & 2 deletions maven/jruby-jars/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end

properties( 'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true,
'jruby.plugins.version' => '1.1.8',
'jruby.plugins.version' => '3.0.0-SNAPSHOT',
# we share the already installed gems
'gem.home' => '${jruby_home}/lib/ruby/gems/shared',
# need jruby_home but not jruby.home as name otherwise
Expand All @@ -51,7 +51,7 @@ end
# do not push the gem during deploy phase
# the bang reuses the plugin declaration which is already in place and
# adds the extra execute_goal to it
jruby_plugin!( :gem,
plugin!('org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}',
:gemspec => 'jruby-jars.gemspec',
# tell maven to include the jar files into gem
:includeDependencies => true,
Expand Down
7 changes: 2 additions & 5 deletions maven/jruby-jars/src/it/integrity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@
<build>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
<groupId>org.jruby.maven</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>1.0.5</version>
<version>3.0.0-SNAPSHOT</version>
<executions>
<execution>
<goals><goal>initialize</goal></goals>
</execution>
</executions>
<configuration>
<jrubyVersion>1.7.22</jrubyVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/j2ee_jetty/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8' )

pom( 'org.jruby:jruby', '${jruby.version}' )
Expand All @@ -13,7 +13,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/j2ee_jetty_rack/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packaging 'war'

# get jruby dependencies
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8',
'public.dir' => '${basedir}/public' )

Expand All @@ -19,7 +19,7 @@ gem 'flickraw', '0.9.7'
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/j2ee_tomcat/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8' )

pom( 'org.jruby:jruby', '${jruby.version}' )
Expand All @@ -13,7 +13,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/j2ee_tomcat_rack/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packaging 'war'

# get jruby dependencies
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8',
'public.dir' => '${basedir}/public' )

Expand All @@ -19,7 +19,7 @@ gem 'flickraw', '0.9.7'
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/j2ee_wildfly/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'wildfly.version' => '9.0.2.Final',
'project.build.sourceEncoding' => 'utf-8' )

Expand All @@ -14,7 +14,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/jetty/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8',
'public.dir' => '${basedir}/public' )

Expand All @@ -19,7 +19,7 @@ gem 'flickraw', '0.9.7'
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInTestResources => false, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInTestResources => false, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
2 changes: 1 addition & 1 deletion maven/jruby/src/it/many_jars_with_embedded_gems/app/pom.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# two jars with embedded gems
jar 'de.saumya.mojo:maven-tools', '1.0.0.rc1'
jar 'org.jruby.maven:maven-tools', '3.0.0-SNAPSHOT'
jar 'org.rubygems:zip', '2.0.2'

# jruby scripting container
Expand Down
2 changes: 1 addition & 1 deletion maven/jruby/src/it/many_jars_with_embedded_gems/pom.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-*- mode: ruby -*-

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10' )
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT' )

packaging :pom

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

id 'org.rubygems:zip', VERSION

jruby_plugin! :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
plugin! 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

id 'org.rubygems:gem1', '1'

jruby_plugin! :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
plugin! 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

id 'org.rubygems:gem2', '2'

jruby_plugin! :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
plugin! 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
2 changes: 1 addition & 1 deletion maven/jruby/src/it/many_jars_with_embedded_gems_ng/pom.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-*- mode: ruby -*-

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10' )
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT' )

packaging :pom

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</repositories>

<properties>
<jruby.plugins.version>1.0.10</jruby.plugins.version>
<jruby.plugins.version>>3.0.0-SNAPSHOT</jruby.plugins.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -42,22 +42,19 @@
<extension>
<groupId>org.jruby.maven</groupId>
<artifactId>mavengem-wagon</artifactId>
<version>1.0.3</version>
<version>2.0.0-SNAPSHOT</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
<groupId>org.jruby.maven</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>${jruby.plugins.version}</version>
<executions>
<execution>
<goals><goal>initialize</goal></goals>
</execution>
</executions>
<configuration>
<jrubyVersion>1.7.22</jrubyVersion>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/it/tomcat/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8' )

pom( 'org.jruby:jruby', '${jruby.version}' )
Expand All @@ -15,7 +15,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInTestResources => false, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInTestResources => false, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/templates/hellowarld/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name '${cmd} ${framework} from ${package}'
packaging 'pom'

# TODO add extension to .mvn/extensions.xml
extension 'de.saumya.mojo', 'jruby9-extensions', '${jruby9.plugins.version}'
extension 'org.jruby.maven', 'jruby9-extensions', '${jruby9.plugins.version}'

properties( 'jruby.plugins.version' => '1.1.0',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'jruby9.plugins.version' => '0.2.0' )

# integration tests
Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/templates/j2ee_wlp/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
packaging 'war'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'project.build.sourceEncoding' => 'utf-8' )

pom( 'org.jruby:jruby', '${jruby.version}' )
Expand All @@ -13,7 +13,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
plugin 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end

Expand Down
4 changes: 2 additions & 2 deletions maven/jruby/src/templates/osgi_all_inclusive/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
packaging 'bundle'

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
properties( 'jruby.plugins.version' => '3.0.0-SNAPSHOT',
'exam.version' => '3.0.3',
'url.version' => '1.5.2',
'logback.version' => '1.0.13',
Expand All @@ -17,7 +17,7 @@
extension 'org.jruby.maven:mavengem-wagon:2.0.0-SNAPSHOT'
repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

jruby_plugin! :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'
plugin! 'org.jruby.maven:gem-maven-plugin:${jruby.plugins.version}', :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0'

# add some ruby scripts to bundle
resource :directory => 'src/main/ruby'
Expand Down
2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'github.global.server' => 'github',
'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => 'true',
'jruby.plugins.version' => '1.0.10',
'jruby.plugins.version' => '3.0.0-SNAPSHOT',

# versions for default gems with bin executables
# used in ./lib/pom.rb and ./maven/jruby-stdlib/pom.rb
Expand Down
Loading

0 comments on commit 3f7f7e8

Please sign in to comment.