diff --git a/pom.xml b/pom.xml
index 92b9d62..fce56f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,23 +80,6 @@
-
- org.apache.maven.plugins
- maven-invoker-plugin
- 3.6.0
-
- ${project.build.directory}/it
-
-
-
- integration-test
-
- install
- run
-
-
-
-
org.apache.maven.plugins
maven-surefire-plugin
@@ -104,6 +87,26 @@
+
+
+
+ org.apache.maven.plugins
+ maven-invoker-plugin
+ 3.6.0
+
+ ${project.build.directory}/it
+
+
+
+ integration-test
+
+ install
+ run
+
+
+
+
+
diff --git a/src/it/tests/deploy-eba-it/windows/build.xml b/src/it/tests/deploy-eba-it/windows/build.xml
index 88a4a2b..73418d4 100644
--- a/src/it/tests/deploy-eba-it/windows/build.xml
+++ b/src/it/tests/deploy-eba-it/windows/build.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/src/main/java/io/openliberty/tools/ant/install/ArchiveInstaller.java b/src/main/java/io/openliberty/tools/ant/install/ArchiveInstaller.java
index 5f980ac..e30eb06 100644
--- a/src/main/java/io/openliberty/tools/ant/install/ArchiveInstaller.java
+++ b/src/main/java/io/openliberty/tools/ant/install/ArchiveInstaller.java
@@ -82,7 +82,7 @@ private void install(InstallLibertyTask task, File cacheDir, String url) throws
task.checkLicenseSet();
// download Liberty jar
- task.downloadFile(downloadURL, cachedFile);
+ task.downloadFile(downloadURL, cachedFile, true);
// do license check
task.checkLicense(getLicenseCode(cachedFile));
@@ -91,7 +91,7 @@ private void install(InstallLibertyTask task, File cacheDir, String url) throws
task.installLiberty(cachedFile);
} else {
// download zip file
- task.downloadFile(downloadURL, cachedFile);
+ task.downloadFile(downloadURL, cachedFile, true);
// unzip
task.unzipLiberty(cachedFile);
diff --git a/src/main/java/io/openliberty/tools/ant/install/InstallLibertyTask.java b/src/main/java/io/openliberty/tools/ant/install/InstallLibertyTask.java
index f85ba30..c2d2327 100644
--- a/src/main/java/io/openliberty/tools/ant/install/InstallLibertyTask.java
+++ b/src/main/java/io/openliberty/tools/ant/install/InstallLibertyTask.java
@@ -98,10 +98,14 @@ private void doExecute() throws Exception {
}
protected void downloadFile(URL source, File dest) throws IOException {
+ downloadFile(source, dest, false);
+ }
+
+ protected void downloadFile(URL source, File dest, boolean skipExisting) throws IOException {
if (offline) {
offlineDownload(source, dest);
} else {
- onlineDownload(source, dest);
+ onlineDownload(source, dest, skipExisting);
}
}
@@ -113,13 +117,15 @@ private void offlineDownload(URL source, File dest) throws IOException {
}
}
- private void onlineDownload(URL source, File dest) throws IOException {
+ private void onlineDownload(URL source, File dest, boolean skipExisting) throws IOException {
Get get = (Get) getProject().createTask("get");
DownloadProgress progress = null;
if (verbose) {
progress = new Get.VerboseProgress(System.out);
}
- get.setUseTimestamp(true);
+ if (skipExisting) {
+ get.setSkipExisting(true);
+ }
get.setUsername(username);
get.setPassword(password);
get.setMaxTime(maxDownloadTime);
diff --git a/src/main/java/io/openliberty/tools/ant/install/OpenLibertyInstaller.java b/src/main/java/io/openliberty/tools/ant/install/OpenLibertyInstaller.java
index 1f98779..787e58b 100644
--- a/src/main/java/io/openliberty/tools/ant/install/OpenLibertyInstaller.java
+++ b/src/main/java/io/openliberty/tools/ant/install/OpenLibertyInstaller.java
@@ -53,7 +53,7 @@ public void install(InstallLibertyTask task) throws Exception {
String versionUrl = baseUrl + version + "/";
URL runtimeInfoUrl = new URL(versionUrl + "info.json");
File runtimeInfoFile = new File(cacheDir, version + ".json");
- task.downloadFile(runtimeInfoUrl, runtimeInfoFile);
+ task.downloadFile(runtimeInfoUrl, runtimeInfoFile, true);
// Parse JSON
InputStream runtimeInfoIs = new FileInputStream(runtimeInfoFile);
@@ -93,7 +93,7 @@ public void install(InstallLibertyTask task) throws Exception {
URL runtimeUrl = new URL(runtimeUrlString);
File runtimeFile = new File(versionCacheDir, InstallUtils.getFile(runtimeUrl));
- task.downloadFile(runtimeUrl, runtimeFile);
+ task.downloadFile(runtimeUrl, runtimeFile, true);
if(runtimeUrlString.endsWith(".jar")) {
task.installLiberty(runtimeFile);
diff --git a/src/main/java/io/openliberty/tools/ant/install/WasDevInstaller.java b/src/main/java/io/openliberty/tools/ant/install/WasDevInstaller.java
index c5dda3e..b504e7f 100644
--- a/src/main/java/io/openliberty/tools/ant/install/WasDevInstaller.java
+++ b/src/main/java/io/openliberty/tools/ant/install/WasDevInstaller.java
@@ -103,7 +103,7 @@ public void install(InstallLibertyTask task) throws Exception {
// download license
URL licenseURL = new URL(selectedVersion.getLicenseUri());
File licenseFile = new File(versionCacheDir, InstallUtils.getFile(licenseURL));
- task.downloadFile(licenseURL, licenseFile);
+ task.downloadFile(licenseURL, licenseFile, true);
// do license check
task.checkLicense(InstallUtils.getLicenseCode(licenseFile, LICENSE_REGEX));
@@ -111,7 +111,7 @@ public void install(InstallLibertyTask task) throws Exception {
// download Liberty jar
URL libertyURL = new URL(uri);
File libertyFile = new File(versionCacheDir, InstallUtils.getFile(libertyURL));
- task.downloadFile(libertyURL, libertyFile);
+ task.downloadFile(libertyURL, libertyFile, true);
// install Liberty jar
task.installLiberty(libertyFile);
@@ -119,7 +119,7 @@ public void install(InstallLibertyTask task) throws Exception {
// download zip file
URL libertyURL = new URL(uri);
File libertyFile = new File(versionCacheDir, InstallUtils.getFile(libertyURL));
- task.downloadFile(libertyURL, libertyFile);
+ task.downloadFile(libertyURL, libertyFile, true);
// unzip
task.unzipLiberty(libertyFile);