return Maven.resolver.resolve(artifact).withTransitivity().asFile() should do the same job