Hi Dirk, that class only contains constants. If you reference those constants within your own bundle they are usually inlined (i.e. there is no run-time dependency to the providing package). Therefore it is totally fine to add that dependency to your Maven module and to directly use those constants in your code. In the end though (i.e. during run-time) there is no longer a dependency (http://blog.bjhargrave.com/2014/04/java-8-bnd-and-references-to-compile.html, http://www.javaspecialists.eu/archive/Issue114.html). Therefore I don’t think there is a need to move this package somewhere else, although the package name org.apache.sling.servlets.resolver.internal might be confusing. Cheers, Konrad
> Am 24.04.2015 um 10:09 schrieb Dirk Rudolph <[email protected]>: > > Hi devs, > > why is the class ServletResolverConstants in the Apache Sling Servlet > Resolver not accessible in an exported package? > > I’m currently implementing a SCR component that registers multiple Services > based on some configurations shared between them. One of this Services > implements javax.servlet.Servlet as a Sling Servlet. Now I was wondering why > those constants are not exported, because I think it can be a quite common > use case to register services not using SCR (especially the @SlingServlet > annotation). > > Cheers, > > Dirk Rudolph | Senior Software Engineer > > Netcentric AG > > M: +41 79 642 37 11 > D: +49 174 966 84 34 > > [email protected] | www.netcentric.biz > >
