@@ -13,6 +13,7 @@ import org.eclipse.aether.util.artifact.JavaScopes
1313import org .eclipse .aether .util .filter .DependencyFilterUtils
1414import stryker4s .log .Logger
1515
16+ import scala .annotation .nowarn
1617import scala .jdk .CollectionConverters .*
1718
1819/** Resolves Maven artifacts (and their transitive runtime dependencies) at plugin runtime via Aether, against the
@@ -28,14 +29,16 @@ class ArtifactResolver(project: MavenProject, session: MavenSession, repoSystem:
2829 * @param coordinates
2930 * `groupId:artifactId[:extension[:classifier]]:version`
3031 */
32+ @ nowarn()
3133 def resolveArtifact (coordinates : String ): IO [Path ] = {
3234 log.debug(s " Resolving artifact $coordinates" )
3335 val request = new ArtifactRequest (new DefaultArtifact (coordinates), repositories, null )
3436 IO .blocking:
35- Path .fromNioPath(repoSystem.resolveArtifact(repoSession, request).getArtifact().getPath ())
37+ Path .fromNioPath(repoSystem.resolveArtifact(repoSession, request).getArtifact().getFile().toPath ())
3638 }
3739
3840 /** Resolve an artifact together with all of its transitive runtime dependencies. */
41+ @ nowarn
3942 def resolveTransitively (coordinates : String ): IO [Seq [Path ]] = {
4043 log.debug(s " Resolving $coordinates with transitive dependencies " )
4144 val root = new Dependency (new DefaultArtifact (coordinates), JavaScopes .RUNTIME )
@@ -49,6 +52,6 @@ class ArtifactResolver(project: MavenProject, session: MavenSession, repoSystem:
4952 .getArtifactResults()
5053 .asScala
5154 .toSeq
52- .map(a => Path .fromNioPath(a.getArtifact().getPath ()))
55+ .map(a => Path .fromNioPath(a.getArtifact().getFile().toPath ()))
5356 }
5457}
0 commit comments