Author: rombert
Date: Tue Feb 17 23:29:58 2015
New Revision: 1660537
URL: http://svn.apache.org/r1660537
Log:
SLING-4405 - Unable to install new bundle using the jar upload mechanism
Make sure the bundles uploaded as jar files have a location set.
Modified:
sling/trunk/tooling/support/install/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
Modified:
sling/trunk/tooling/support/install/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
URL:
http://svn.apache.org/viewvc/sling/trunk/tooling/support/install/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java?rev=1660537&r1=1660536&r2=1660537&view=diff
==============================================================================
---
sling/trunk/tooling/support/install/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
(original)
+++
sling/trunk/tooling/support/install/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
Tue Feb 17 23:29:58 2015
@@ -136,17 +136,20 @@ public class InstallServlet extends Http
}
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);