linkage-checker-enforcer-rules incompatible with maven 3.9? ClassNotFound: org/eclipse/aether/connector/basic/BasicRepositoryConnectorFactory

Open
#2,457 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start with the minimal pom.xml in the issue and reproduce the linkage-check execution using Maven 3.9.* and 3.8.9. Investigate why linkage-checker-enforcer-rules 1.5.15 cannot load BasicRepositoryConnectorFactory under Maven 3.9; done means the check runs without the missing-class failure on the affected Maven versions.

Written by the indexing model from the issue text.

Description

I am trying to get the plugin working with a minimal pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>it.neckar</groupId>
  <artifactId>test-project</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.10.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.2</version>

        <dependencies>
          <dependency>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>linkage-checker-enforcer-rules</artifactId>
            <version>1.5.15</version>
          </dependency>
        </dependencies>

        <executions>
          <execution>
            <id>linkage-check</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <rules>
                <LinkageCheckerRule
                  implementation="com.google.cloud.tools.dependencies.enforcer.LinkageCheckerRule" />
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>

Execution linkage-check of goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.2:enforce failed: A required class was missing while executing org.apache.maven.plugins:maven-enforcer-plugin:3.6.2:enforce: org/eclipse/aether/connector/basic/BasicRepositoryConnectorFactory

It fails with

  • mvn 3.9.*

Works up until

  • mvn 3.8.9
Dominant language
Java
Stars
163
Forks
81
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GoogleCloudPlatform/cloud-opensource-java

All issues in GoogleCloudPlatform/cloud-opensource-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.