Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGi bundle not getting uninstalled in case un-installation is done after new version installation of AEM package #68

Closed
sandeepkumar03 opened this issue Apr 25, 2016 · 7 comments
Assignees
Labels

Comments

@sandeepkumar03
Copy link

When we are overwriting a new package with new version, on un-installation the OSGi bundle is not getting removed from web console. Following are the steps to reproduce.

  1. Create a new multimodule project from AEM Plugin
  2. Build and deploy to AEM instance in Package Manager. (OSGi console shows bundle with version A)
  3. Change the version of project created in step 1 to something different say B.
  4. Build and deploy to AEM instance in Package Manager (OSGi console shows bundle with version B)
  5. Uninstall the AEM package from Package Manager.
  6. Notice that OSGi console still shows bundle with version B. It should be version A.

Additional Info - The issue is not reproducible when generating mutimodule project through maven archetype through command line. But for the project generated through AEM plugin gives issue. Had raised ticket with Day Care, they redirected to Github page of AEM plugin.
AEM Version - AEM 6.1

@sandeepkumar03 sandeepkumar03 changed the title OSGi bundle not getting uninstalled in case installation is done after new version installation of AEM package OSGi bundle not getting uninstalled in case un-installation is done after new version installation of AEM package Apr 25, 2016
@rombert rombert self-assigned this Apr 28, 2016
@rombert
Copy link
Collaborator

rombert commented Apr 28, 2016

Just to make sure I understand your issue,are you using the IDE tooling just to create the project from the archetype?

@sandeepkumar03
Copy link
Author

sandeepkumar03 commented Apr 29, 2016

Yes @rombert, I am using IDE tooling to create project from the archetype.

@sandeepkumar03
Copy link
Author

sandeepkumar03 commented May 2, 2016

Some more additional info @rombert ,

From the archetypes list

Following works fine

<groupId>com.day.jcr.vault</groupId>
<artifactId>multimodule-content-package-archetype</artifactId>

While following does not

<groupId>com.adobe.granite.archetypes</groupId>
<artifactId>aem-project-archetype</artifactId>

The aem-project-archetype generates extra exclude pattern

<filter root="/apps/myapp">
    <exclude pattern="/apps/myapp/install" />
</filter>

This exclude pattern is not present in the multimodule-content-package-archetype

Did few tests, after we remove this from filter, the aem-project-archetype works fine, not sure if there would be any side-effects due to this.

Looks like issue with aem-project-archetype. Do you think the same?

@eglistefan
Copy link
Contributor

I think the problem is in the nature of the chosen archetype behavior: @sandeepkumar03, as you pointed out the /apps/myapp/install folder is excluded from the package - with the idea that it gets installed directly by a bundle upload (via org.apache.sling.tooling.support.install bundle). That also means that if you remove the package, that the uploaded bundle is independent and thus doesn't get removed.

@sandeepkumar03
Copy link
Author

sandeepkumar03 commented May 2, 2016

@eglistefan One observation is that, the problem occurs only when we overwrite the package and then uninstall. If we just install package and uninstall package, the OSGi bundle is removed from OSGi console automatically, though filter definition has exclude pattern, still it works fine.

If removing the exclude pattern from filter seems to be fine, would raise an issue with aem-project-archetype

Let me know, if I should close this issue.

@eglistefan
Copy link
Contributor

@sandeepkumar03 - haven't tested the different when creating the projects via maven vs via the eclipse plugin - but what I can see is that uninstalling version B from package manager leaves version A installed - which means it doesn't remove the /apps/myapp/install - which is why the bundle is still there. So deleting after uninstall of B, then also uninstalling A removes the bundle.

@sandeepkumar03
Copy link
Author

Closing this issue, as the issue is raised for archetype separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants