CugSupport reference not resolved
I'm trying to use a reference to CugSupport service into an osgi component, like these:
import com.day.cq.auth.impl.CugSupport; ... @Component @Service public class MyComponentImpl implements MyComponent { @Reference private CugSupport cugSupport; ... private String getCugRootLoginPage(final HttpServletRequest request) { // check for a CUG final CugSupport cugSupport = this.cugSupport; if (cugSupport != null) { return cugSupport.getLoginPage(request); } return null; } }I added this maven dependency to my pom:
<dependency>
<groupId>com.adobe.granite</groupId>
<artifactId>com.adobe.granite.auth.authhandler</artifactId>
<version>5.6.2</version>
<scope>provided</scope>
</dependency>
which is the only one I found on Adobe maven repository.
When I try to install my bundle into my AEM instance I have this exception:
05.02.2015 09:10:53.173 *WARN* [OsgiInstallerImpl] Failure loooking up method bindResourceResolverFactory(org.osgi.framework.ServiceReference) Assuming no such method. (java.lang.NoClassDefFoundError: com/day/cq/auth/impl/CugSupport) java.lang.NoClassDefFoundError: com/day/cq/auth/impl/CugSupport
I am using AEM 6 + SP2.
Do you know how can I fix this error?