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

JRuby gem inclusion from pom.xml failing #7194

Closed
jacaetevha opened this issue May 5, 2022 · 7 comments
Closed

JRuby gem inclusion from pom.xml failing #7194

jacaetevha opened this issue May 5, 2022 · 7 comments
Milestone

Comments

@jacaetevha
Copy link

Environment Information

  • JRuby version: 9.2.17.0 to 9.3.4.0
  • OS: Mac/Linux/Windows

Expected Behavior

  • mavengems.jruby.org/releases should be valid

Actual Behavior

  • The Maven repo at http://mavengems.jruby.org/releases is no longer responding. There is a parked domain page there saying that the domain has expired. Also, later versions of Maven require https.
@jacaetevha
Copy link
Author

I tried creating a failing POM, but this works for me when building locally, and only fails in a Docker image we're using in our locally hosted GitLab instance. So, it's got to be some weird environmental issue. But, I'm keeping this open because I think that repo needs to be restored. Feel free to close this issue if you think that's a bad assumption.

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo</groupId>
  <artifactId>bar</artifactId>
  <name>bar</name>
  <version>SNAPSHOT</version>
  <packaging>jar</packaging>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <repositories>
    <repository>
      <id>mavengems</id>
      <url>mavengem:https://rubygems.org</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby</artifactId>
      <version>9.3.4.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/de.saumya.mojo/gem-maven-plugin -->
    <dependency>
      <groupId>de.saumya.mojo</groupId>
      <artifactId>gem-maven-plugin</artifactId>
      <version>2.0.1</version>
      <exclusions>
        <exclusion>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/de.saumya.mojo/gem-maven-plugin -->

    <!-- rubygems -->
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>json-schema</artifactId>
      <version>2.8.1</version>
      <type>gem</type>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>redis</artifactId>
      <version>4.0.3</version>
      <type>gem</type>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>sequel</artifactId>
      <version>5.15.0</version>
      <type>gem</type>
    </dependency>
    <!-- rubygems -->
  </dependencies>

  <build>
    <extensions>
      <extension>
        <groupId>org.torquebox.mojo</groupId>
        <artifactId>mavengem-wagon</artifactId>
        <version>1.0.3</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.saumya.mojo</groupId>
        <artifactId>gem-maven-plugin</artifactId>
        <version>2.0.1</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>initialize</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <jrubyVersion>9.3.4.0</jrubyVersion>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.saumya.mojo</groupId>
        <artifactId>gem-maven-plugin</artifactId>
        <version>2.0.1</version>
        <extensions>true</extensions>
        <configuration>
          <includeRubygemsInResources>true</includeRubygemsInResources>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>initialize</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

@jacaetevha
Copy link
Author

I believe I've tracked down the issue of failures within our Docker image. Not only is that repo no longer available, but there's an old version of json-schema that is unresolvable via the GemInstaller bit of that de.saumya.mojo:gem-maven-plugin.

I can see the 2.8.1 version that we depend on in rubygems.org, but for some reason the Maven plugin is failing to see it.

So, upgrading to json-schema:3.0.0 makes our builds pass.

@enebo
Copy link
Member

enebo commented May 5, 2022

mavengems.jruby.org -> rubygems-proxy.torquebox.org. It appears torquebox.org is finally gone. We thought everything needed was moved elsewhere but I personally know almost nothing about this infrastructure. If this was moved (which I thought it had been) then this may just be changing the CNAME to whatever that is.

@enebo
Copy link
Member

enebo commented May 5, 2022

I am doubly confused: asciidoctor/asciidoctorj#896

So we made a new CNAME which just points back to the source which is going away. Still digging.

@jacaetevha
Copy link
Author

The main fix for this on our end was to remove the repository configuration that pointed to mavengems.jruby.org/releases and use only the mavengems wagon protocol:

    <repository>
      <id>mavengems</id>
      <url>mavengem:https://rubygems.org</url>
    </repository>

@enebo
Copy link
Member

enebo commented May 5, 2022

As a note since I am pretty bad on maven things. This more or less now does this without a proxy server and does the creation/resolution on the fly.

@jacaetevha
Copy link
Author

Correct @enebo. I forgot to close before, so closing this ticket now.

@enebo enebo added this to the Non-Release milestone May 5, 2022
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

2 participants