jruby / ruby-maven

Eclipse Public License 2.0
1 stars 5 forks source link

No bundler warnings #4

Closed deivid-rodriguez closed 3 years ago

deivid-rodriguez commented 3 years ago

Avoid using method deprecated in recent bundler versions.

I also added MacOS to the CI because I can't reproduce the CI issues locally and I'm using MacOS, so I want to double check whether it could be related to the OS somehow.

deivid-rodriguez commented 3 years ago

Ok, I can repro test failures now, will work on this.

deivid-rodriguez commented 3 years ago

I built https://github.com/takari/polyglot-maven/pull/236 locally with the idea of using it here to see if that fixes the CI, but got the following error:

[ERROR] Failed to execute goal de.saumya.mojo:gem-maven-plugin:2.0.0-1:initialize (default) on project polyglot-ruby: Execution default of goal de.saumya.mojo:gem-maven-plugin:2.0.0-1:initialize failed: Unable to load the mojo 'initialize' in the plugin 'de.saumya.mojo:gem-maven-plugin:2.0.0-1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: de/saumya/mojo/gem/InitializeMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Could it be that gem-maven-plugin:2.0.0-1 has actually dropped support for Java 8 while adding support for Java 11? Does that make sense?

kares commented 3 years ago

@deivid-rodriguez that is actually correct - seems that the parent (for gem-maven-plugin) is compiling with 11 (not sure why)

deivid-rodriguez commented 3 years ago

It was because of an incorrect change I made that somehow sneaked into the 2.0.0 release. I think it was just an oversight. I was just working on a WIP PR on adding Java 11 support but didn't intend to drop support for java 8 at all. Hopefully we can get the changes in https://github.com/torquebox/jruby-maven-plugins/pull/119 released to get support for Java 8 restored!

deivid-rodriguez commented 3 years ago

jruby-maven-plugins 2.0.1 was released and I updated https://github.com/takari/polyglot-maven/pull/236 to use it, but even using a locally built polyglot-ruby using that, old dependencies are still being pulled and I'm unsure why. In particular,mavengem-wagon 0.2.1, which brings gem-maven-plugins 1.1.5, which we want to avoid. 🤔

deivid-rodriguez commented 3 years ago

I'm pretty sure it's coming from here: https://github.com/torquebox/maven-tools/blob/b52405ed1bb73fec626c631a18ea40045d6b6816/lib/maven/tools/versions.rb#L27-L32.

We most likely also need to bump those dependencies, get a new version out, and then bump polyglot-ruby dependency on it as well.

deivid-rodriguez commented 3 years ago

I created another PR for maven-tools: https://github.com/torquebox/maven-tools/pull/34. That one was tricky because building maven-tools locally was using the broken latest release of maven-tools. To fix this chicken-and-egg issue, I migrated maven-tools to use a plain pom.xml file instead of a Mavenfile.

deivid-rodriguez commented 3 years ago

I will verify it later, but I think now once https://github.com/takari/polyglot-maven/pull/237 is merged and released and we bump the polyglot-ruby dependency here, we'll have a green CI.

deivid-rodriguez commented 3 years ago

It tested locally against a locally built version of polyglot-ruby including https://github.com/takari/polyglot-maven/pull/237, and it's all green 🎉.

So we just need to wait for https://github.com/takari/polyglot-maven/pull/237 to be released.

deivid-rodriguez commented 3 years ago

polyglot-ruby 0.4.8 has been released and I updated ruby-maven to use it, but now CI fails sometimes and passes others. I'll try figure out why.

deivid-rodriguez commented 3 years ago

Alright, so test errors didn't suggest any issues with this library. Tests were running mvn commands and checking different things being included in the output, however, the log file where the output was being saved (passed through the -l parameter to mvn) sometimes was not getting generated for some reason (my guess is some issue with mvn itself).

Since passing -l or using the CatchStdout class that would change $stdout and $stderr were being used inconsistently, I switched both to a more standard approach of using minitest methods capture_subprocess_io or capture_io and now everything is green 🎉.

@headius With the changes in this PR, there should no longer be any issues when releasing version 3.3.13. Let me know!

headius commented 3 years ago

Thanks so much for the footwork here, @deivid-rodriguez! I will merge this.

headius commented 3 years ago

@mkristian Are you still out there? We still are willing to help take over maintenance if we can get a tour and all the appropriate push rights.

mkristian commented 3 years ago

@headius I am still out there and did help @deivid-rodriguez as much I could the recent weeks. but we also can schedule some meeting so I give you guys some tour !

deivid-rodriguez commented 3 years ago

Thanks @headius and @mkristian!

@headius You are an owner of this gem as per https://rubygems.org/gems/ruby-maven, so you should be all good for releasing. I don't think releasing this gem needs anything to be pushed to maven servers, in case you're lacking some push rights there.