[
https://issues.apache.org/jira/browse/SLING-6392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15747520#comment-15747520
]
Konrad Windszus commented on SLING-6392:
----------------------------------------
After thinking about it a littlebit more, this should probably be implemented
in the OSGi installer rather than in each provider separately.
The installer should take care, that when for the same url the entity id has
changed (i.e. there are still installed entities with a different id but the
same url), any previously installed entities having the same url should be
uninstalled.
This step can only happen after {{transformResources()}} (because only there
the entity id of the new resource is determined) but before {{computeTasks()}}.
That way there is no change on the persisted resource list (i.e. url stays the
path as previously) and this has to be implemented only once.
> JCR Installer: Symbolic name changes on an existing bundle file is not
> properly supported
> -----------------------------------------------------------------------------------------
>
> Key: SLING-6392
> URL: https://issues.apache.org/jira/browse/SLING-6392
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: JCR Installer 3.1.18, File Installer 1.1.2
> Reporter: Konrad Windszus
>
> After deploying bundle with symbolic name {{A}} to JCR location
> {{/apps/myapp/install/mybundle.jar}} or somewhere in the filesystem it is
> correctly being picked up by the JcrInstaller or FileInstaller and deployed
> in Apache Felix. Now the symbolic name has been changed to {{B}} and the
> updated JAR has been deployed to the same location in the JCR
> {{/apps/myapp/install/mybundle.jar}} or to the file system the updated bundle
> is not correctly deployed.
> The OSGI installer console exposes that both bundles {{A}} and {{B}} are in
> state {{Installed}} but the /system/console/bundle only shows bundle {{A}}
> but not {{B}}.
> It would actually be expected that {{A}} is uninstalled, while {{B}} is
> getting installed!
> Such a change can happen if you use the {{maven-bundle-plugin}} with a
> default configuration and you just change the groupId of the underlying maven
> project. That will not affect the finalName of the artifact (by default
> artifactId) but the symbolic name of the bundle (see
> http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#default-behavior).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)