I am setting up the asset share commons, I have aem 6.5.0 instance, I downloaded asset-share-commons-ui.apps-1.9.4 version, asset-share-commons-ui.content-1.9.4 version.
I have requirement to write sling model using query builder in that for that I downloaded source code from https://github.com/adobe/asset-share-commons/tree/asset-share-commons-1.9.4 but the source code is with 6.3.1 version But my instance version is 6.5.0, Please help me to fix this issue.
In general the fact that 1.9.4 contains dependency to uberjar 6.3.1 should not be an issue, according to official documentation 1.9.4 is compatible with AEM 6.5. You can also switch to version 2.x but please be aware that those version are not including uberjar 6.5.x anyway.
I am not sure how you wanted to approach with extending Asset Share Commons. But if you have planned to checkout the code and change it, then this will be incorrect way. Any customization should be done via API exposed by Asset Share Commons. You should create new project using Adobe archetype and include Asset Share Commons as a Maven dependency. Please have a look into official guidelines to get all the details:
I would suggest to explore Asset Share Commons documentation first, to get familiar with technical design concept. It will definitely simplify any development work.
Hi @lukasz-m ,
I created project using this command
mvn -B archetype:generate -D archetypeGroupId="com.adobe.aem" -D archetypeArtifactId="aem-project-archetype" -D archetypeVersion=26 -D appTitle=" YP POC Site" -D appId="YP-POC" -D groupId="com.yppocsite" -D aemVersion="6.5.0"
And I am following this guide https://opensource.adobe.com/asset-share-commons/pages/development/1-x/guide/ that you shared I added dependecies and subpackages in ui.apps inside content package-maven plugin as per the article like this
When I run mvn clean install -PautoInstallPackage I am getting errors like this
Can you please help me how to fix this.
I was able to successfully build project using commands you have shared and follow instructions presented in the official guide. I can see that your pom has some additional entries that are not included in the guide.
Base on the documentation I would expect that content-package-maven-plugin section in ui.apps module will look like this
<plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <verbose>true</verbose> <failOnError>true</failOnError> <subPackages> <subPackage> <groupId>com.adobe.aem.commons</groupId> <artifactId>assetshare.ui.apps</artifactId> <filter>true</filter> </subPackage> </subPackages> </configuration> </plugin>
I am not sure why you have added additional entries.
Nevertheless I would suggest following steps:
I created project using this cmnd mvn -B archetype:generate -D archetypeGroupId="com.adobe.aem" -D archetypeArtifactId="aem-project-archetype" -D archetypeVersion=26 -D appTitle="My Asset Share" -D appId="my-asset-share" -D groupId="com.myassetshare" -D aemVersion="6.5.0" and added the asset share common dependencies to this project I deployed this project and the build got sucess
I got My Asset Share website in site console but the problem is asset share common things like dark, lite themes and the templates like search template,search dark templaates no templates related to asset share commons didnt appear in My asset share website and in crxd also I didnt see anything related to asset share the website looking like this
In crxd you can see there is no clientlib theme in my asset share Please help me on this.
Looking on first screen it seems you do not have Asset Share Commons installed on your AEM instance. You can expect something like this:
Please be aware that Asset Share Commons dependencies on project level (according to documentation) are in provided scope. That means they will not be included in your package and will be used only during compilation/build process. So you have to take care by yourself to install Asset Share Commons on AEM properly.
In other words make sure you have installed below packages on your AEM instance:
Elements like ASC templates will not appear in your project you have to create theme by yourself, assuming you want to customize it. Documentation that covers those aspects:
Regarding theme clientlibs.
Assuming you have above Asset Share Commons package installed on your instance correctly, you will find it under /apps/asset-share-commons/clientlibs/clientlib-theme.
There is dedicated section that describes how to extend Asset Share Commons theme:
Theming related code examples:
Last but not least, I would like encourage you to explore Asset Share Commons documentation, and code examples that it provides - it's written pretty well, and I am sure you will find all necessary information there.
By just adding dependencies in the project we don't get asset share commons things like templates,themes in our project, I have to download the asset-share-commons-packages(ui.apps, ui.content) in aem instance.
In order to use them in my project I have to create those things by referring asset share commons in my project right?
One more things in my project I added asset share dependency version is 1.6.2 will this version work with aem 6.5.0
And also I have to download asset share commons package 1.6.2 right in aem instance using crxd.