Skip to content

Commit

Permalink
Allow overwriting resource files in TestResourcesInBuildStepsTest
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Gribov <grossws@gmail.com>
  • Loading branch information
grossws committed Apr 16, 2023
1 parent cd0c04c commit 0014b64
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;

class AcmeExtProcessor {

Expand All @@ -23,9 +24,9 @@ FeatureBuildItem feature(ApplicationArchivesBuildItem appArchivesBuildItem,

final Path output = p.getParent().getParent().getParent().resolve(launchModeBuildItem.getLaunchMode() + "-" + p.getFileName());
try {
Files.copy(p, output);
Files.copy(p, output, StandardCopyOption.REPLACE_EXISTING);
} catch(IOException e) {
throw new IllegalStateException("Failed to copy " + p + " to " + output);
throw new IllegalStateException("Failed to copy " + p + " to " + output, e);
}
return new FeatureBuildItem(FEATURE);
}
Expand Down

0 comments on commit 0014b64

Please sign in to comment.