/apps/<project>/install/<core package> not updating

khamat_bn

31-05-2020

Hi Folks,

I have install folder in apps/project/install and it has core Jar file. But when I do mvn clean install -PautoInstallPackage then core jar is not updating. It's only working at the first build.

Also when I replicating ui.apps then I can see install folder and bundle in system/console(in active state) but pages is not fetching bundle classes. Getting Below error

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/myproj/components/content/categoryButtons/

 

So I have again need to deploy in publish instance via cmd 

mvn -PautoInstallPackage clean install -Daem.port=4503

 

My requirement is - when I am replicating ui.apps then core-bundle also needs to go in publish so that I have not to use next command for publisher specifically.

 

Find my pom.xml(project level) https://github.com/NDSoftwareSolutions/AEM/blob/master/pom.xml

 

AEM bundle core

Accepted Solutions (1)

Accepted Solutions (1)

BrianKasingli

MVP

01-06-2020

@khamat_bn 

Seems like a strange issue. Before mvn builld, can you follow these actions:

  1. Visit, http://localhost:4502/system/console/bundles, and delete the bundle from here.
  2. Visit, http://localhost:4502/crx/de/index.jsp, and remove the /apps/project/install/*.jar.
  3. Visit, http://localhost:4502/crx/packmgr/index.jsp, and delete the install package from here.
  4. mvn build.

This is a weird scenario. It shouldn't be behaving like this. I reviewed your pom.xml for ui.apps, and parent pom, and it looks okay. the SNAPSHOT exists; SNAPSHOTS ensures that when new packages are uploaded into AEM, it will allow the content packages + jar files to be overwritten, whereas without the SNAPSHOT label, you are forced to increment the version of the bundle version.

If this is still not working, I'm suggesting that you try to build your code into a new fresh AEM instance, and test out the installation from there.

Answers (4)

Answers (4)

jbrar

Employee

01-06-2020

Few things to try:

 

- If you take the jar file and install it directly via /system/console/bundles, does it work?

- Go to /system/console/osgi-installer and check the status of the jar file after the package is installed

- Also, check if there are any errors in the log files when package is installed.

Veena_Vikram

MVP

31-05-2020

"when I do mvn clean install -PautoInstallPackage then core jar is not updating" -  Is it like the bundle is not reflecting your latest changes each time ? Just make sure that every-time you install your package to any ENV , there should be a version upgrade else sometimes you might not see your updated changes in the bundle 

 

ArpitVarshney

MVP

31-05-2020

Hi @khamat_bn 

Is it possible for you to share a sample of your ui.apps pom.xml? 

 

Regards,

Arpit

Ankur_Khare

MVP

31-05-2020