Skip to content

Commit

Permalink
Merge pull request #31 from dkfellows/patch-1
Browse files Browse the repository at this point in the history
Replace existing files when generating executable
  • Loading branch information
hgschmie authored Mar 11, 2023
2 parents 5979a87 + 4099231 commit 2f30b59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/skife/waffles/ReallyExecutableJarMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -143,7 +144,7 @@ public void execute() throws MojoExecutionException {
File file = files.get(0);
File dir = file.getParentFile();
File exec = new File(dir, programFile);
Files.copy(file.toPath(), exec.toPath());
Files.copy(file.toPath(), exec.toPath(), StandardCopyOption.REPLACE_EXISTING);
makeExecutable(exec);
if (attachProgramFile) {
projectHelper.attachArtifact(project, programFileType, exec);
Expand Down

0 comments on commit 2f30b59

Please sign in to comment.