Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repository url blocked on latest maven #122

Open
seanstory opened this issue Dec 15, 2021 · 4 comments
Open

repository url blocked on latest maven #122

seanstory opened this issue Dec 15, 2021 · 4 comments

Comments

@seanstory
Copy link

running mvn clean gem:initialize I was hitting errors like:

[ERROR] Failed to execute goal on project dummy: Could not resolve dependencies for project rubygems:dummy:jar:testing: Failed to collect dependencies at rubygems:rails:gem:2.3.5: Failed to read artifact descriptor for rubygems:rails:gem:2.3.5: Could not transfer artifact rubygems:rails:pom:2.3.5 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [rubygems-proxy (http://rubygems-proxy.torquebox.org/releases, default, releases)] -> [Help 1]

I was able to find this stack overflow post which explained that the repository URL of http://rubygems-proxy.torquebox.org/releases is automatically blocked by maven versions >= 3.8.1

As a workaround, I switched my project to use mvnw with .mvn/wrapper/maven-wrapper.properties using

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip

but it would be great if rubygems-proxy.torquebox.org could use HTTPS and a valid certificate. When I tried to just specify

        <repository>
            <id>rubygems-release</id>
            <url>https://rubygems-proxy.torquebox.org/releases</url> <!-- note the "httpS" -->
        </repository>

I hit:

[ERROR] Failed to execute goal on project dummy: Could not resolve dependencies for project rubygems:dummy:jar:testing: Failed to collect dependencies at rubygems:rails:gem:2.3.5: Failed to read artifact descriptor for rubygems:rails:gem:2.3.5: Could not transfer artifact rubygems:rails:pom:2.3.5 from/to rubygems-proxy (https://rubygems-proxy.torquebox.org/releases): transfer failed for https://rubygems-proxy.torquebox.org/releases/rubygems/rails/2.3.5/rails-2.3.5.pom: Certificate for <rubygems-proxy.torquebox.org> doesn't match any of the subject alternative names: [*.ceylon-lang.org, ceylon-lang.org] -> [Help 1]
@headius
Copy link
Member

headius commented Feb 6, 2025

@mkristian Can you assist here? I guess I did not fully remove the torquebox repository from ruby-tools, and this file still seems to try to use it:

https://github.com/jruby/jruby-maven-plugins/blob/ac6fcff609e312aa045ff831f4b97fec442d9657/ruby-tools/src/main/java/de/saumya/mojo/ruby/gems/DefaultGemManager.java

This doesn't appear to affect released files, but for prerelease files it's falling back on this and of course failing to resolve it. For example, try to run rake specs in jar-dependencies, and it blows up dealing with any gems that have prerelease versions.

@mkristian
Copy link
Member

I will have a look

@mkristian
Copy link
Member

first thing I would do this: jruby/maven-tools#41
as it makes no sense to use torquebox repo if it does not exists.

The default rubygems repo is only needed for this case:
https://github.com/jruby/jruby-maven-plugins/blob/master/jruby-maven-plugin/src/main/java/de/saumya/mojo/jruby/JRubyVersion.java#L88-L91
i.e. for jruby-1.7 and before.

If you agree I would prepare a PR which removes all this code for jruby-1.7 and before - as it will try to use the torquebox repo which does not exit anymore, i.e. it is failing for some time now. Assuming nobody is using this anymore.

@headius
Copy link
Member

headius commented Feb 9, 2025

@mkristian Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants