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

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

Avatar

Level 4

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

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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.

View solution in original post

8 Replies

Avatar

Level 4

Hi @Ankur_Khare  , Thanks for responding. I have snapshot version present in all pom.xml and i tried by changing the version no. as well then also the changes are not refelecting in my publish env.

 

<modelVersion>4.0.0</modelVersion>
<groupId>com.myProj.id</groupId>
<artifactId>myProj-promo</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

 

Avatar

Community Advisor

Hi @khamat_bn 

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

 

Regards,

Arpit

Avatar

Community Advisor

Hi @khamat_bn 

 

Your pom files look fine. However please verify the below points:

 

  • The command mvn clean install -PautoInstallPackage will install only in default 4502 port. For deploying in publish having a port 4503, you might have a profile autoInstallPackagePublish which can be used or you can replicate the ui.apps package from author to publisher or for any different port you can give like mvn clean install -PautoInstallPackage -Daem.port=5503
  • Please verify your filter.xml if the below entry is present without any mode property.
    <filter root="/apps/myprojpromo"/>

     

Regards,

Arpit

Avatar

Community Advisor

"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 

 

Avatar

Employee Advisor

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.

Avatar

Correct answer by
Community Advisor

@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.