From 8a4b9cfedc1811e74cdd386b7f651334487f35a1 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 20 Jun 2022 12:51:47 +0200 Subject: [PATCH 1/5] [gitflow-maven-plugin] Update for next development version 2.1.3-SNAPSHOT --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 530dcd3..4ca1c50 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ io.wcm.tooling.commons io.wcm.tooling.commons.crx-packmgr-helper - 2.1.2 + 2.1.3-SNAPSHOT jar CRX Package Manager Helper @@ -48,7 +48,7 @@ tooling/commons/crx-packmgr-helper - 2022-06-20T10:50:19Z + 2022-06-20T10:51:43Z From d7463845251215cc0d6a4b2f5e9f08fbe2a49b56 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 23 Jun 2022 16:04:39 +0200 Subject: [PATCH 2/5] switch maven central badge to shields.io to avoid out-of-sync issues with maven index --- README.md | 2 +- src/site/markdown/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7bec5e5..7e5dbd7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ CRX Package Manager Helper ====== [![Build](https://github.com/wcm-io/io.wcm.tooling.commons.crx-packmgr-helper/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io/io.wcm.tooling.commons.crx-packmgr-helper/actions?query=workflow%3ABuild+branch%3Adevelop) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper) +[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper)](https://repo1.maven.org/maven2/io/wcm/tooling/commons/io.wcm.tooling.commons.crx-packmgr-helper) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=wcm-io_io.wcm.tooling.commons.crx-packmgr-helper&metric=coverage)](https://sonarcloud.io/summary/new_code?id=wcm-io_io.wcm.tooling.commons.crx-packmgr-helper) Java Library for uploading and downloading AEM content packages via CRX Package Manager. diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 0ecb14e..78e5eea 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -2,7 +2,7 @@ Java Library for uploading and downloading AEM content packages via CRX Package Manager. -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper) +[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper)](https://repo1.maven.org/maven2/io/wcm/tooling/commons/io.wcm.tooling.commons.crx-packmgr-helper) ### Documentation From 8dbba4ad8beb84ac84a1a8b80b7faeb51eac8a14 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 24 Jun 2022 10:50:58 +0200 Subject: [PATCH 3/5] Check bundle status before package manager install status as the latter may report errors if certain bundles are restarted. --- changes.xml | 6 ++++++ .../tooling/commons/packmgr/install/PackageInstaller.java | 4 ++-- .../commons/packmgr/install/crx/CrxPackageInstaller.java | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/changes.xml b/changes.xml index 73584fe..f7a7dd9 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,12 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> + + + Check bundle status before package manager install status as the latter may report errors if certain bundles are restarted. + + + Add explicit handling for responses with invalid JSON payload for packager manager install status and bundle status calls. diff --git a/src/main/java/io/wcm/tooling/commons/packmgr/install/PackageInstaller.java b/src/main/java/io/wcm/tooling/commons/packmgr/install/PackageInstaller.java index ee6e19f..1e11956 100644 --- a/src/main/java/io/wcm/tooling/commons/packmgr/install/PackageInstaller.java +++ b/src/main/java/io/wcm/tooling/commons/packmgr/install/PackageInstaller.java @@ -100,10 +100,10 @@ private void installFile(PackageFile packageFile, CloseableHttpClient httpClient throw new PackageManagerException("File does not exist: " + file.getAbsolutePath()); } - // before install: if packages are still installing, wait for completion - pkgmgr.waitForPackageManagerInstallStatusFinished(httpClient, packageManagerHttpClientContext); // before install: if bundles are still stopping/starting, wait for completion pkgmgr.waitForBundlesActivation(httpClient, consoleHttpClientContext); + // before install: if packages are still installing, wait for completion + pkgmgr.waitForPackageManagerInstallStatusFinished(httpClient, packageManagerHttpClientContext); if (packageFile.isInstall()) { log.info("Upload and install {}{} to {}", packageFile.isForce() ? "(force) " : "", file.getName(), props.getPackageManagerUrl()); diff --git a/src/main/java/io/wcm/tooling/commons/packmgr/install/crx/CrxPackageInstaller.java b/src/main/java/io/wcm/tooling/commons/packmgr/install/crx/CrxPackageInstaller.java index 8fc48ee..2b6b0e1 100644 --- a/src/main/java/io/wcm/tooling/commons/packmgr/install/crx/CrxPackageInstaller.java +++ b/src/main/java/io/wcm/tooling/commons/packmgr/install/crx/CrxPackageInstaller.java @@ -131,10 +131,10 @@ public void installPackage(PackageFile packageFile, boolean replicate, PackageMa // delay further processing after install (if activated) delay(packageFile.getDelayAfterInstallSec()); - // after install: if packages are still installing, wait for completion - pkgmgr.waitForPackageManagerInstallStatusFinished(httpClient, packageManagerHttpClientContext); // after install: if bundles are still stopping/starting, wait for completion pkgmgr.waitForBundlesActivation(httpClient, consoleHttpClientContext); + // after install: if packages are still installing, wait for completion + pkgmgr.waitForPackageManagerInstallStatusFinished(httpClient, packageManagerHttpClientContext); } else { log.info("Package uploaded successfully to {} (without installing).", path); From 8062368412d0c9d979607526656e3a38a5b04c89 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 15 Aug 2022 12:53:59 +0200 Subject: [PATCH 4/5] prepare release --- changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes.xml b/changes.xml index f7a7dd9..5f27706 100644 --- a/changes.xml +++ b/changes.xml @@ -23,7 +23,7 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> - + Check bundle status before package manager install status as the latter may report errors if certain bundles are restarted. From 93c608b804083092044d9edbf64f4ef8e25a56a2 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 15 Aug 2022 12:54:31 +0200 Subject: [PATCH 5/5] [gitflow-maven-plugin] Update versions for release 2.1.4 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4ca1c50..5bd96a2 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ io.wcm.tooling.commons io.wcm.tooling.commons.crx-packmgr-helper - 2.1.3-SNAPSHOT + 2.1.4 jar CRX Package Manager Helper @@ -48,7 +48,7 @@ tooling/commons/crx-packmgr-helper - 2022-06-20T10:51:43Z + 2022-08-15T10:54:28Z