Maven Resolver Issue with Transitive Dependencies in Plugin Development After Update 2024.3

Answered

Hi everyone,

I’m currently developing a plugin for working with DSLs, and part of its functionality involves using Maven Resolver to download libraries from repositories following Maven schemes, but without requiring a pom.xml.

Everything was working perfectly until the update to IntelliJ IDEA 2024.3. After the update, I noticed that transitive dependencies for certain libraries are no longer being downloaded. I’ve tested this with the examples provided at Apache Maven Resolver GitHub, and I observe the same behavior.

For example, with the following dependency:

<dependency>
    <groupId>com.esotericsoftware</groupId>
    <artifactId>kryo</artifactId>
    <version>5.4.0</version>
</dependency>

Only the main artifact (com.esotericsoftware:kryo:5.4.0) gets downloaded, but none of its transitive dependencies are resolved.

 

Interestingly, if I create a project with a pom.xml in IntelliJ IDEA, the built-in Maven plugin resolves and downloads everything as expected, including transitive dependencies.

 

This makes me wonder:

• Is there a platform API or mechanism provided by IntelliJ IDEA that I could leverage to handle this issue?

• Has anyone else encountered a similar problem with Maven Resolver after the 2024.3 update?

 

Any guidance or suggestions would be greatly appreciated. Thank you in advance!

 

Best regards,

 

Octavio Roncal

 

0
1 comment

Hi Octavio,

 

Are you using some IntelliJ IDEA API methods that worked before, but stopped working in 2024.3? If so, please let us know which.

 

You could try org.jetbrains.idea.maven.server.MavenEmbedderWrapper#resolveArtifactsTransitively

val embedder = mavenEmbeddersManager.getEmbedder(MavenEmbeddersManager.FOR_DEPENDENCIES_RESOLVE, baseDir)

embedder.resolveArtifactsTransitively(…)

 

0

Please sign in to leave a comment.