Niveau 1
Niveau 2
Se connecter à la communauté
Connectez-vous pour voir tous les badges
Hi All,
We have a requirement to have classes related to components to be with in the component folder it self. And after I compile a java class in CRXDE lite where will be the class files gets generated? and how can we access this?
Also if we have to write JUnit test classes for the same how do I do it? We are using AEM 6.1 and sightly for our components
Vues
Réponses
Nombre de J’aime
That requirement is not best practice when working with AEM. Best practice is to place Java into OSGi bundles and build OSGi bundles using Maven. See this article on how to use Maven Archetype 10:
https://helpx.adobe.com/experience-manager/using/first-arch10.html
For community members reading this thread and using an earlier version of AEM (ie 6) - see:
https://helpx.adobe.com/experience-manager/using/first-osgi.html
Hope this helps
Vues
Réponses
Nombre de J’aime
Sightly Java should definitely go into an OSGi bundle - see this article:
https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html
Vues
Réponses
Nombre de J’aime
Has this changed. The Adobe document recommends writing the java class within the component if the use class is specific to the component. here is the link HTL Java Use-API
Any comments?
Vues
Réponses
Nombre de J’aime
Never use CRXDE lite to write Java Classes for an HTL Component - always build your Java using a Maven Project and deploy to AEM. See Adobe Experience Manager Help | Creating an Adobe Experience Manager HTML Template Language componen...
Vues
Réponses
Nombre de J’aime
We will log a bug for that document!
Vues
Réponses
Nombre de J’aime
Thanks, That document was confusing me. But writing JavaScript Use-API is valid right?
Vues
Réponses
Nombre de J’aime
YEs -- when working with AEM HTL component - you can use these development techniques:
1 - WCMUsePojo -- see this article: Adobe Experience Manager Help | Creating an Adobe Experience Manager HTML Template Language componen...
2 - Sling Models -- see this article: Creating a custom Touch UI Grid Component for Adobe Experience Manager
3 - JS USE API - see: Creating a Tab layout component for Adobe Experience Manager
Hope this helps ....
Vues
Réponses
Nombre de J’aime
Hi
You do you want tohave "classes related to components to be with in the component folder it self" ? It is not a recommended way.
Please have a look at :- https://helpx.adobe.com/experience-manager/using/first-arch10.html
This article covers :-
Some Reference article for Junit Testing :-
Link:- http://aempodcast.com/2015/testing/unit-testing-wcmuse-classes-using-mockito/#.V3Svn_l97RY
Link:- http://wcm.io/testing/aem-mock/usage.html
Link:- https://docs.adobe.com/docs/en/aem/6-1/develop/components/hobbes.html
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Vues
Réponses
Nombre de J’aime