Re: Exporting ServletResolverConstants in org.apache.sling.servlets.resolver

2016-11-07 Thread Konrad Windszus
Since the constant also does not appear in the Javadoc and with the advent of 
OSGi 6 annotations it is more common to not use Felix SCR annotations I opened 
a ticket for moving this class somewhere else in 
https://issues.apache.org/jira/browse/SLING-6249 
.
Konrad

Exporting ServletResolverConstants in org.apache.sling.servlets.resolver

2015-04-24 Thread Dirk Rudolph
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

dirk.rudo...@netcentric.biz | www.netcentric.biz




Re: Exporting ServletResolverConstants in org.apache.sling.servlets.resolver

2015-04-24 Thread Konrad Windszus
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 dirk.rudo...@netcentric.biz:
 
 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
 
 dirk.rudo...@netcentric.biz | www.netcentric.biz