Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5627

maven-sling-plugin: HTTP Status is not checked correctly when WebConsole install method used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • Maven Sling Plugin 2.1.8
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              peter80 Peter Melnikov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: