Search code examples
aemaem-6

What is the use of SNAPSHOT in POM file AEM/CQ?


This is a very basic question but what exactly happens when we add suffix SNAPSHOT to POM.xml file of an AEM project?

<version>1.0.0-SNAPSHOT</version>

<version>1.0.0</version>

I am asking with respect to the behavior of the OSGi container Apache Felix used in AEM. I believe this has something to do with picking up of bundles as fresh bundle or not.


Solution

  • The OSGi installer always tries to install the highest version of a bundle if several bundles with same symbolic name is present.

    However, when you reinstall an existing bundle which has a release version (and not a snapshot), the OSGi installer would ignore the bundle even if there were changes within the bundle.

    Whereas, the OSGi installer would update the bundle with all the new changes if you are reinstalling a bundle with a snapshot version.

    Bundle Handling section of Apache Sling OSGi installer would give more insights on this.