dweiss commented on a change in pull request #470:
URL: https://github.com/apache/lucene/pull/470#discussion_r757927062



##########
File path: lucene/luke/src/java-module/module-info.java
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** Luke : Lucene toolbox project. */
+@SuppressWarnings({"requires-automatic"})
+module lucene.luke {
+  requires java.desktop;
+  requires org.apache.logging.log4j;

Review comment:
       I added the needed requires directives and also added some blocking code 
so that Luke shows a console error if it can't start up properly. The 
module-launcher version now complains about  missing 'uses' from Lucene core, 
which is good:
   ```
   [2021-11-28T18:22:52,604] ERROR (LukeMain.java:82) - Cannot initialize 
components.
   java.util.ServiceConfigurationError: 
org.apache.lucene.analysis.CharFilterFactory: module lucene.core does not 
declare `uses`
        at java.util.ServiceLoader.fail(ServiceLoader.java:591) ~[?:?]
        at java.util.ServiceLoader.checkCaller(ServiceLoader.java:577) ~[?:?]
        at java.util.ServiceLoader.<init>(ServiceLoader.java:506) ~[?:?]
        at java.util.ServiceLoader.load(ServiceLoader.java:1648) ~[?:?]
        at 
org.apache.lucene.analysis.AnalysisSPILoader.reload(AnalysisSPILoader.java:80) 
~[lucene-core-10.0.0-SNAPSHOT.jar:?]
        at 
org.apache.lucene.analysis.AnalysisSPILoader.<init>(AnalysisSPILoader.java:62) 
~[lucene-core-10.0.0-SNAPSHOT.jar:?]
        at 
org.apache.lucene.analysis.AnalysisSPILoader.<init>(AnalysisSPILoader.java:48) 
~[lucene-core-10.0.0-SNAPSHOT.jar:?]
        at 
org.apache.lucene.analysis.CharFilterFactory.<clinit>(CharFilterFactory.java:30)
 ~[lucene-core-10.0.0-SNAPSHOT.jar:?]
        at 
org.apache.lucene.luke.models.analysis.AnalysisImpl.getAvailableCharFilters(AnalysisImpl.java:84)
 ~[lucene-luke-10.0.0-SNAPSHOT-standalone.jar:?]
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to