diff --git a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java index 5525239..f0582f4 100644 --- a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java +++ b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java @@ -38,7 +38,6 @@ */ import javax.inject.Inject; -import javax.inject.Named; import java.io.File; import java.io.IOException; @@ -381,17 +380,15 @@ public class JLinkMojo extends AbstractJLinkMojo { /** * The JAR archiver needed for archiving the environments. */ - private final ZipArchiver zipArchiver; + private final ZipArchiver zipArchiver = new ZipArchiver(); @Inject public JLinkMojo( MavenProjectHelper projectHelper, ToolchainManager toolchainManager, - @Named("zip") ZipArchiver zipArchiver, MavenResourcesFiltering mavenResourcesFiltering, LocationManager locationManager) { super(toolchainManager); - this.zipArchiver = zipArchiver; this.mavenResourcesFiltering = mavenResourcesFiltering; this.projectHelper = projectHelper; this.locationManager = locationManager; diff --git a/src/test/java/org/apache/maven/plugins/jlink/JLinkMojoTest.java b/src/test/java/org/apache/maven/plugins/jlink/JLinkMojoTest.java index eed3ae6..b6cfc33 100644 --- a/src/test/java/org/apache/maven/plugins/jlink/JLinkMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/jlink/JLinkMojoTest.java @@ -33,7 +33,7 @@ public class JLinkMojoTest { - private JLinkMojo mojo = new JLinkMojo(null, null, null, null, null); + private JLinkMojo mojo = new JLinkMojo(null, null, null, null); @BeforeEach public void setUp() throws NoSuchFieldException, IllegalAccessException { diff --git a/src/test/java/org/apache/maven/plugins/jlink/MultipleLauncherTest.java b/src/test/java/org/apache/maven/plugins/jlink/MultipleLauncherTest.java index c8530d7..5a49cbf 100644 --- a/src/test/java/org/apache/maven/plugins/jlink/MultipleLauncherTest.java +++ b/src/test/java/org/apache/maven/plugins/jlink/MultipleLauncherTest.java @@ -32,7 +32,7 @@ public class MultipleLauncherTest { - private JLinkMojo mojo = new JLinkMojo(null, null, null, null, null); + private JLinkMojo mojo = new JLinkMojo(null, null, null, null); @Test void testSingleLauncher() throws Exception {