Skip to content

Commit 2848c12

Browse files
committed
Create Maven download directory if it does not exist
1 parent e453f87 commit 2848c12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/Maven3Version.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ private void downloadMavenZip() throws IOException {
6060
URL url = new URL(urlAsString);
6161
ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream());
6262
String mavenZipFilePath = findMavenZipFilePath();
63+
File mavenDownloadDir = new File(BenchProperties.INSTANCE.getMavenBinariesPath());
64+
if(!mavenDownloadDir.exists()) {
65+
mavenDownloadDir.mkdir();
66+
}
6367
FileOutputStream fileOutputStream = new FileOutputStream(mavenZipFilePath);
6468
FileChannel fileChannel = fileOutputStream.getChannel();
6569
fileChannel.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);

0 commit comments

Comments
 (0)