You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:30:37 UTC

[sling-org-apache-sling-tooling-support-install] 09/18: SLING-4405 - Unable to install new bundle using the jar upload mechanism

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tooling-support-install.git

commit 3082373133dcf79a031f6393afc36a202d823f1e
Author: rombert <ro...@unknown>
AuthorDate: Tue Feb 17 23:29:58 2015 +0000

    SLING-4405 - Unable to install new bundle using the jar upload mechanism
    
    Make sure the bundles uploaded as jar files have a location set.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1660537 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/tooling/support/install/impl/InstallServlet.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
index 9eea9e5..8eee97d 100644
--- a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
+++ b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
@@ -136,17 +136,20 @@ public class InstallServlet extends HttpServlet {
                 }
 
                 final String symbolicName = manifest.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME);
+
                 if (symbolicName == null) {
                     logAndWriteError("Manifest does not have a " + Constants.BUNDLE_SYMBOLICNAME, resp);
                     return;
                 }
 
+                final String version = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
+
                 // the JarInputStream is used only for validation, we need a fresh input stream for updating
                 rawInput = item.getInputStream();
 
                 Bundle found = getBundle(symbolicName);
                 try {
-                    installOrUpdateBundle(found, rawInput, null);
+                    installOrUpdateBundle(found, rawInput, "inputstream:" + symbolicName + "-" + version + ".jar");
 
                     result = new InstallationResult(true, null);
                     resp.setStatus(200);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.