[GitHub] [zookeeper] JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)

2019-05-16 Thread GitBox
JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does 
not export all required packages in OSGi (needed for curator)
URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493025000
 
 
   I've sent email to zookeeper-dev mailing list:
   
   ZooKeeper and OSGi (maven)
   
   Hi,
   
   I 've created issue [1] with missing exported packages in osgi for zookeeper 
3.4.10. Then I started to prepare maven OSGi packaging [2] for the higher 
version of ZooKeeper (in the PR for issue).
   
   I've tried to implement OSGi packaging with the low impact. So I've tried to 
create OSGi bundles from Zookeeper-server and from zookeeper-jute modules.
   
   But there is a problem for this solution:
   
   zookeeper-jute has package 'org.apache.zookeeper.data', it has to be 
exported for zookeeper-server to use it
   zookeeper-server contains also package 'org.apache.zookeeper.data', 
which has to be exported, because it is used from packages like 
org.apache.zookeeper, which are exported
   
   -> bundles can not be deployed into osgi as two libraries are exporting the 
same packages
   
   
   Solution:
   
   best solution is to change name of one of these packages (probably in 
module zookeeper-jute - which us used only by zookeeper) - but question is, 
whether this change is feasible
   only other solution is to create only one bundle (e.g. zookeeper-osgi), 
which will contain both libraries together and will expose their both packages 
at the same time (similar approach is used in e.g. hibernate-osgi, 
httpcore-osgi, httpclient-osgi)
   
   Solution #1 is a better solution, I would like to ask for your opinion about 
feasibility of renaming zookeeper-jute generated packages to not collide with 
zookeeper-server. 
   (As these packages are to be used only for zookeeper, it shouldn't cause any 
harm)
   
   If #1 is not acceptable, then we can go with #2. But I highly suggest to 
consider renaming of zookeeper-jute's packages in the nearest point in the 
future as possible and return to solution #1.
   
   Best regards,
   
   jiri
   
   
   [1] https://issues.apache.org/jira/browse/ZOOKEEPER-3389
   [2] https://github.com/apache/zookeeper/pull/945
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)

2019-05-16 Thread GitBox
JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does 
not export all required packages in OSGi (needed for curator)
URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493012808
 
 
   @eolivelli @nkalmar 
   I've found problem with current approach (2 bundles, one is server and 
second is jute)
   Problem:
   - zookeeper-jute has package 'org.apache.zookeeper.data', it has to be 
exported for zookeeper-server to use it
   - zookeeper-server contais also package 'org.apache.zookeeper.data', which 
has to be exported, because it is use from packages like org.apache.zookeeper
   -> bundles can not be deployed into karaf as two libraries are exporting the 
same packages
   
   Solution:
   - best solution is to change name of one of these packages (probably in 
zookeeper-jute - which us used only by zookeeper) - but as @eolivelli wrote: 
"Yes changing the package name is feasible but only for 3.6+."
   - only other solution is to create only one bundle (e.g. zookeeper-osgi), 
which will contain both libraries together and will expose theit both packages 
at the same time
   (simillar approach is used in e.g. hibernate-osgi, httpcore-osgi, 
httpclient-osgi)
   
   But with the fact that in the 3.6+ version renaming is possible so we can 
use solution #1 from 3.6+ as it is a better solution, i would like to ask on 
your opinion about current version.
   Is renaming of jute's packages really unreal. Is creation of zookeeper-osgi 
library the only solution?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)

2019-05-16 Thread GitBox
JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does 
not export all required packages in OSGi (needed for curator)
URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492933860
 
 
   @eolivelli 
   Ok, i'll continue with osgi packaging. I'll apply this also to 
zookeeper-jute and somehow solve "the same package name" problem in the way as 
described in my previous post.
   
   Integration test validating that OSGi is working, would be really nice.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)

2019-05-15 Thread GitBox
JiriOndrusek edited a comment on issue #945: [ZOOKEEPER-3389] Zookeeper does 
not export all required packages in OSGi (needed for curator)
URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492672683
 
 
   @nkalmar @eolivelli
   I'm getting close to the finishing. I just want to clarify some facts and 
also ask for the help.
   - just to be sure, only zookeeper-server jar will be compiled as OSGi 
bundle? (I see also possible modules jute and recipes, so I would like to be 
sure)
   - I'm currently facing a problem with OSGi build, there is a warning that 
zookeeper-server is exporting package, which is also present in different jar - 
zookeeper-jute. (Packages org/apache/zookeeper/server/quorum and 
org/apache/zookeeper/server/persistence)
   It would help me to know, how these packages should be handled. I looked 
into package 'quorum' and it seems, that it contains different classes. But  
even if they are different, it could change in the FUTURE. So I'd like to ask, 
how to face it
  - best solution from OSGi would be to change jute to use different 
package names - but it is probably not possible 
  - best way (from my POV) is to merge packages together (with rule that 
classes from zookeeper-server has to be treated as primary) - but it can remove 
some classes which are needed to run and I have also problems to define it with 
maven-plugin (still not sure why it is not working, I think it should work)
  - may be it is possible also to ignore these packages from zookeeper-jute 
- but it doesn't seem much probable
   
   What do you think about it? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services