Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Can't see changes when reinstalling same snapshot bundle

stefanoc8972186
Level 2
Level 2

Hello,

I am trying to install a bundle through the usual mvn clean install -PautoInstallBundle profile. The bundle is xyz-1.2-SNAPSHOT.jar

The problem is that when I try to reinstall the same bundle I can't see any changes as if the bundle is not installed at all.

These are the only information I can get from the logs:

16.06.2017 10:24:07.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl Detected a change at /apps/xyz/install/xyz-1.2-SNAPSHOT.jar, rebuilding the beans information

16.06.2017 10:24:07.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl starting looking for bundles...

16.06.2017 10:24:08.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl Detected a change at /apps/xyz/install/xyz-1.2-SNAPSHOT.jar, rebuilding the beans information

16.06.2017 10:24:08.410 INFO  com.adobe.aem.sightly.ide.impl.SightlyBeanFinderImpl starting looking for bundles...

Do you know why I can't see the changes?

Thank you for your help

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Veena,

If you replace a bundle "mybundle-1.2.3.jar" with a newer bundle, but the same version number (in the Osgi metadata), this new bundle will never be started, but it will be ignored.

You have to increase the version number of the bundle to make it work. In a development mode you can also use SNAPSHOT versions; and for these the situation is different. Installing a fresh mybundle-1.2.3-SNAPSHOT.jar will replace an already existing mybundle-1.2.3-SNAPSHOT.jar

kind regards,

Jörg

View solution in original post

9 Replies
smacdonald2008
Level 10
Level 10

Try - mvn -PautoInstallPackage install

As you can see in articles like this:  Adobe Experience Manager Help | Creating your first Adobe Experience Manager 6.2 Project using Adobe...

This is the Maven command used to deploy.

Jörg_Hoh
Employee
Employee

What version of AEM are you using? Do you see any messages in the log related to the OsgiInstaller thread?

kind regards,
Jörg

Tuhin_Ghosh
Level 7
Level 7

Hello

are you not able to see the changes particularly for a class or nothing is getting change. Kindly download the jar and see if you are able to the changes there in a decompiler.

worth would be to deleting the bundle from crxde and deploy again.

if it's only for a specific class adding immediate = true might help.

most probably you have done all these but worth a shot if not

thanks

smacdonald2008
Level 10
Level 10

Another option is to deploy bundle manually.

Jörg_Hoh
Employee
Employee

Check if you have a node below /system/sling/installer/jcr/pauseInstallation in the repository. If there is a node, remove it.

kind regards,

Jörg

Veena_Vikram
Community Advisor
Community Advisor

We have faced similar issues with almost all versions of AEM. Most of the time when we install a  bundle with same version number as previous never picks up the changes, mostly in our servers . I have sometimes faced this issue in my local too. But then I have the option of going to my felix console , delete the bundle and install the new bundle which I think should not be a good practice.

Normally, for every deployment, we increase our version number (that's a REM practice too ), (even if it is a minor fix or hardly a fix ) so that the bundles are refreshed properly. 

I never got a chance to dig into the cause of this issue, but I would be happy to know that too

Thanks

Veena

Jörg_Hoh
Correct answer by
Employee
Employee

Veena,

If you replace a bundle "mybundle-1.2.3.jar" with a newer bundle, but the same version number (in the Osgi metadata), this new bundle will never be started, but it will be ignored.

You have to increase the version number of the bundle to make it work. In a development mode you can also use SNAPSHOT versions; and for these the situation is different. Installing a fresh mybundle-1.2.3-SNAPSHOT.jar will replace an already existing mybundle-1.2.3-SNAPSHOT.jar

kind regards,

Jörg

View solution in original post

Veena_Vikram
Community Advisor
Community Advisor

oh waw Jorg. ! that resolves my dilemma. Now I have an answer .

So this answers why our servers never picked a bundle installation with same jar version ( as for any deployment, we should remove the SNAPSHOT and none of our bundles have those for a real deployment )

Thanks a lot Jörg Hoh​ .

Thanks

Veena

Veena_Vikram
Community Advisor
Community Advisor

I would really love to have a share option for the answers we get here as in Stack Overflow