Even if you, as the module user, don't use the TransactionalSharedLuceneLock, there's currently a hard dependency on javax.transaction.api dragged by org.infinispan.lucene.logging.Log
So it's not really possible to use the lucene directory without this being present in the module system, so I did not see an advantage of marking it optional.