[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240604#comment-17240604
 ] 

Uwe Schindler edited comment on LUCENE-9623 at 11/30/20, 9:38 AM:
------------------------------------------------------------------

We also need some testing of the artifacts! Our standard test environment can't 
do testing of module system. This needs some "integration" tests: A project 
using the JAR files on module path - no classpath. And here it must be JAR 
files, the non-packaged class files won't work as far as I remember.

When doing this, you will figure out that the SPI classes (codecs, analyzers) 
won't work on module path. Because we do not only need to open the packages in 
our modules, the contents on META-INF/services need to be added as "native 
services" to the module info (using "provides"). Every module-info file must 
list all class names that are services explicit. The META-INF/services files 
are not read in module mode:

See this blog post: 
[https://blog.frankel.ch/migrating-serviceloader-java-9-module-system/]

I am not sure if JDEPS figures this out automatically!


was (Author: thetaphi):
We also need some testing of the artifacts! Our standard test environment can't 
do testing of module system. This needs some "integration" tests: A project 
using the JAR files on module path - no classpath. And here it must be JAR 
files, the non-packaged class files won't work as far as I remember.

When doing this, you will figure out that the SPI classes (codecs, analyzers) 
won't work on module path. Because we do not only need to open the packages in 
our modules, the contents on META-INF/servisices need to be added as "native 
services" to the module info. Every module-info file must list all class names 
that are services explicit. The META-INF/service files are not read in module 
mode:

See this blog post: 
[https://blog.frankel.ch/migrating-serviceloader-java-9-module-system/]

I am not sure if JDEPS figures this out automatically!

> Add module descriptor (module-info.java) to lucene jars
> -------------------------------------------------------
>
>                 Key: LUCENE-9623
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9623
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: general/build
>    Affects Versions: master (9.0)
>            Reporter: Tomoko Uchida
>            Priority: Major
>         Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to