private File[] resolveArtifact(String artifact, String... exclusions) {
MavenDependencyResolver mvnDependencyResolver = DependencyResolvers.use(MavenDependencyResolver.class);
if (isMavenUsed()) {
mvnDependencyResolver.loadMetadataFromPom(SpringExtensionConstants.POM_XML);
}
return mvnDependencyResolver.artifacts(artifact).exclusions(exclusions).resolveAsFiles();
}