Peter Melnikov created SLING-5627:
-------------------------------------
Summary: maven-sling-plugin: HTTP Status is not checked correctly
when WebConsole install method used
Key: SLING-5627
URL: https://issues.apache.org/jira/browse/SLING-5627
Project: Sling
Issue Type: Bug
Components: Maven Plugins and Archetypes
Affects Versions: Maven Sling Plugin 2.1.8
Environment: AEM 6.1 sp1
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
2015-04-22T14:57:37+03:00)
Maven home: d:\Java\apache-maven-3.3.3\bin\..
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.8.0_66\jre
Default locale: ru_RU, platform encoding: Cp1251
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
Reporter: Peter Melnikov
Maven Sling Plugin fails upon bundle installation on a fresh instance:
[ERROR] Failed to execute goal
org.apache.sling:maven-sling-plugin:2.1.8:install (install-bundle) on project
core: Insta
llation on http://localhost:4502/apps/beneteau/install failed, cause:
Installation failed, cause: Created -> [Help 1]
Accordingly to the code in AbstractBundleInstallMojo.java the HTTP result is
expected 200 OK while for HTTP POST the status 201 Created is also a valid
status of normal execution:
int status = getHttpClient().executeMethod(filePost);
if (status == HttpStatus.SC_OK) {
getLog().info("Bundle installed");
} else {
Proposed fix is to add also condition status == HttpStatus.SC_CREATED
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)