- When you’re working on AEM customizations, you would need to have a deeper understanding of OOTB functionalities as it would help in implementing customizations easily. So, you can decompile the OOTB bundles and take a look at how the OOTB functionalities have been implemented.
- There will be times when you might get NPE or other exceptions coming from the internal AEM APIs and you are clueless about what could be wrong. If you happen to have the JAR of the related the feature you can easily decompile the JAR and take a look at what exactly might be causing the error or debug it.
This searching and decompiling JAR can be easily done using Apache Felix Search Web Console Plugin.
This plugin works on OSGi distributions based on Apache Felix such as Apache Sling, Apache Karaf, Apache ServiceMix, etc. and it saves a lot of the time required for debugging purposes.
Plugin features:
Using the above plugin you can:- Search for bundles
- Decompile classes
- View services
- Quickly enter configurations.
Download and setup:
To know how to set up this plugin and start using the above features, please go through this README – https://github.com/neva-dev/felix-search-webconsole-plugin/blob/develop/README.mdOnce the setup is done, you are ready to explore these awesome features.
Example:
Let us see an example of how we can search and decompile classes.- Let us consider the Breadcrumb core component (i.e. /apps/core/wcm/components/breadcrumb/v1/breadcrumb/breadcrumb.html)
- Go to http://localhost:4502/system/console/search
- Search for some phrase. For example, search for “Breadcrumb” in this case. You will see the search result something as shown in the below screenshot.
Select the relevant class you are searching for as shown in the above screenshot. You will see three icons in the “Actions” column. They are –
1st icon – Download bundle
2nd icon – Show details
3rd icon – Decompile class
Click on the decompile class icon. You will see the decompiled class as shown in the below screenshot.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.