Skip to content

Commit

Permalink
Merge pull request #137 from eclipse-ee4j/issue135
Browse files Browse the repository at this point in the history
Create the appclient export directory if it does not exist or fail
  • Loading branch information
starksm64 authored Aug 29, 2024
2 parents 5d8d68b + d5b5adf commit 0d25bfc
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 0d25bfc

Please sign in to comment.