diff --git a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/impl/MavenInvoker.java b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/impl/MavenInvoker.java index 9e12ab2a..97fbe222 100644 --- a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/impl/MavenInvoker.java +++ b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/impl/MavenInvoker.java @@ -1,10 +1,10 @@ package io.jenkins.tools.pluginmodernizer.core.impl; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; @@ -172,7 +172,8 @@ private void validateMavenVersion() { private InvocationRequest createInvocationRequest(String pluginPath, List goals) { InvocationRequest request = new DefaultInvocationRequest(); - request.setPomFile(new File(pluginPath, "pom.xml")); + Path pomPath = Paths.get(pluginPath, "pom.xml"); + request.setPomFile(pomPath.toFile()); request.setGoals(goals); return request; }