Skip to content

Commit

Permalink
Fix test-distribution classpath re resolver (#8187)
Browse files Browse the repository at this point in the history
* Fix test-distribution classpath re resolver

As currently it seems mixed versions of resolver artifacts are
present on classpath. Resolver 1.8.0 introduces a binary
breakage.

Anyway, this fixes the thing, as impl was actually coming in
as transitive dep of maven-resolver-provider, that is NOT
the same version as the rest of resolver dependencies.

Relying on transitive while fixing other versions is wrong.

* Update to resolver 1.8.1

And add exclusion to banned dependency, that is used when
running in SISU container.
  • Loading branch information
cstamas committed Jun 21, 2022
1 parent 5fddbf9 commit 3fabe54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -107,7 +107,7 @@
<mariadb.version>3.0.5</mariadb.version>
<mariadb.docker.version>10.3.6</mariadb.docker.version>
<maven-artifact-transfer.version>0.13.1</maven-artifact-transfer.version>
<maven.resolver.version>1.8.0</maven.resolver.version>
<maven.resolver.version>1.8.1</maven.resolver.version>
<maven.version>3.8.4</maven.version>
<mongodb.version>3.12.11</mongodb.version>
<openpojo.version>0.9.1</openpojo.version>
Expand Down
12 changes: 12 additions & 0 deletions tests/test-distribution/pom.xml
Expand Up @@ -48,6 +48,18 @@
<artifactId>maven-resolver-spi</artifactId>
<version>${maven.resolver.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
<version>${maven.resolver.version}</version>
<exclusions>
<!-- Used when running in SISU container to manage beans lifecycle (of locking factories) -->
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
Expand Down

1 comment on commit 3fabe54

@olamy
Copy link
Member

@olamy olamy commented on 3fabe54 Jun 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyway we will have to find an alternative of maven-resolver as it looks to be schedule to get rid of what we need here (e.g ServicesLocator cf https://cwiki.apache.org/confluence/display/MAVEN/Maven+Ecosystem+Cleanup ) "Phase 2"

Please sign in to comment.