you do not need org.apache.sling.caconfig.bnd-plugin as direct reference in your - it's only useful as dependency for maven-bundle-plugin or other tooling that used bnd to generate the OSGi SCR metadata, see [1] as an example.
but this should not be the source of your problem - did you deploy the bundles org.apache.sling.caconfig.impl, org.apache.sling.caconfig.api, org.apache.sling.caconfig.spi to your application instance, and are they running (check OSGi console)? if yes, can you give us the full stack trace? stefan [1] http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html#context-aware-configuration-bnd-plugin >-----Original Message----- >From: Gopal Agarwal [mailto:gagar...@adobe.com] >Sent: Thursday, November 17, 2016 4:00 PM >To: users@sling.apache.org >Subject: Need help in implementing Sling Context Aware Configuration > >Hi, > >I am looking to use Sling Context Aware Configuration. >https://sling.apache.org/documentation/bundles/context-aware- >configuration/context-aware-configuration.html > >I have added these in the POM file ><dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.impl</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.api</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.spi</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.bnd- >plugin</artifactId> > <version>1.0.0</version> > </dependency> > > >Java code >ResourceResolver resourceResolver = request.getResourceResolver(); >Resource contentResource = (Resource) >resourceResolver.getResource("/content/ubi/test"); >ValueMap props = >contentResource.adaptTo(ConfigurationBuilder.class).asValueMap(); >String param1 = props.get("param1", String.class); > >Issue: >ConfigurationBuilder Class is not getting resolved. > >Am I missing something? Any help is appreciated.. > > >Regards, >Gopal >