adapttoaem.hashnode.devEmbed-Dependency and How to Embed Third-Party JARs in AEMEmbed-Dependency allows you to include external JARs inside your bundle, effectively making them part of your bundle at runtime. It’s similar to “shading” in standard Maven builds, but OSGi-aware. ⚠️ Caution: Overuse can lead to duplicate classes, s...Feb 7·4 min read
adapttoaem.hashnode.devbnd-maven-plugin ConfigurationWhat exactly is a Maven plugin? A Maven plugin is a collection of goals that perform actual work during a build. Maven itself is just a framework + lifecycle.Plugins do everything: compile, test, package, deploy, analyze, generate code. Technically...Feb 5·5 min read
adapttoaem.hashnode.devHow to Use Non-Thread-Safe AEM Objects SafelyJCR and Sling objects are contextual views, not reusable services. They represent: A user A request A moment in time So the rule is simple: Acquire late → Use briefly → Release early 1. ResourceResolver (The Most Misused Object) ❌ What NOT t...Jan 31·3 min read
adapttoaem.hashnode.devThread Safety in AEMThread safety in AEM means ensuring that request-scoped objects (such as ResourceResolver, Session, and Resource) are never shared across threads. AEM handles many requests concurrently, and many core APIs are not designed for concurrent access. This...Jan 31·5 min read
adapttoaem.hashnode.devadaptTo() in Apache Sling: How It Works, When to Use It, and All Possible AdaptationsIn Apache Sling and AEM, adaptTo() is one of the most fundamental yet often misunderstood concepts. Almost every advanced feature in AEM like Sling Models, JCR access, services, rendering - relies on it in some way. Understanding adaptTo() properly h...Jan 21·5 min read