Recently, I had the opportunity to upgrade a project to AEM 6.0 sp2. I did the usual updating maven dependency versions, but no matter what I tried I could not get a Fragment to start.
After further investigation, I discovered two important changes made to AEM 6 ...
Important changes to AEM 6
Maven-bundle-plugin "wrap" goal
I upgraded the maven-bundle-plugin to version 2.5.3. After doing so, the project would no longer build and kept telling me wrap goal is no longer supported. I removed the wrap goal and the build ran successfully.
Fragment Host bundle name
After the build was successful, I checked to ensure the fragment had been loaded in the system/console. Fragment was only installed. After some time and digging I found this:
In CQ 5.6.1, looking at components in system console. I searched for the fragment host: com.day.crx.sling.server. I could see that there were a few components that came from a bundle with the same name. Repeating these same steps in AEM 6. I found this: I found that this bundle does not exist anymore and bundle's name has been changed in AEM 6.
Changed fragment pom.xml:
<Fragment-Host>com.adobe.granite.repository</Fragment-Host>
That is all it took.
It is also possible to find this same information in the localhost:4502/system/console/depfinder enter com.day.crx.sling.server.* in the box and you will see the granite repository.