Skip to content

Commit

Permalink
Create the appclient export directory if it does not exist or fail
Browse files Browse the repository at this point in the history
Signed-off-by: Scott M Stark <starksm@starkinternational.com>
  • Loading branch information
starksm64 committed Aug 29, 2024
1 parent 1652e39 commit d5b5adf
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public Archive<?> generateDeployment(TestDeployment testDeployment, Collection<P
extractDir = "target/appclient";
}
File appclient = new File(extractDir);
if(!appclient.exists()) {
if(appclient.mkdirs()) {
log.info("Created appclient directory: " + appclient.getAbsolutePath());
} else {
throw new RuntimeException("Failed to create appclient directory: " + appclient.getAbsolutePath());
}
}
File archiveOnDisk = new File(appclient, ear.getName());
final ZipExporter exporter = ear.as(ZipExporter.class);
exporter.exportTo(archiveOnDisk, true);
Expand Down

0 comments on commit d5b5adf

Please sign in to comment.