Hmmm... I retried again and this time the gradle build (within intellij)
failed but the Idea one (that runs via generated ant tasks) passed. I can
also run (some) tests in this mode. Certain tests depend on resources that
live under java sources - these resources are not copied by intellij by
default so won't work.

Back to "gradle" compilation mode - the gradle command IntelliJ uses to
compile sources fails there but succeeds if run from command line. I think
something has changed that interferes with what we have in modules.gradle -
there are conditional classpath settings there that were used to make
intellij compile the sources in modular mode. Something has changed and
this no longer works properly. This may be a trivial change somewhere but
it's a moving target, eh.

Dawid

On Fri, Jun 3, 2022 at 8:53 AM Dawid Weiss <[email protected]> wrote:

>
> Hi Mike,
>
> It used to work all right - something must have changed somewhere that
> caused this regression. :(
>
> I just reimported the latest main branch in IntelliJ with the default
> settings and it compiled fine -
>
> [image: image.png]
>
> This, I think, invokes gradle assemble which in turn causes many
> additional tasks to be invoked (like jar or javadocs). This can be improved
> - we don't need these tasks to be assembled in intellij compilation mode.
> It's hacky but I've done it in the past.
>
> When I switch to (my preferred) intellij compilation, things break. This
> is definitely a regression in IntelliJ somewhere because it used to work
> very recently - until the last update, I think. Everything in the module
> settings seems all right so I don't know...
>
> For now, the relatively easy workaround is to build and run via gradle but
> run tests using intellij (the dialog above). Should work.
>
> Dawid
>
>
> On Thu, Jun 2, 2022 at 4:44 PM Michael Sokolov <[email protected]> wrote:
>
>> In IntelliJ building Lucene main branch I see this:
>>
>> .../workspace/lucene/lucene/core.tests/src/test/module-info.java:23:
>> error: module not found: org.apache.lucene.core.tests.main
>>   requires org.apache.lucene.core.tests.main;
>>                                        ^
>>
>> Am I doing it wrong? Does anybody else encounter this? I tried
>> re-importing the Gradle model, which succeeds, but then when I build
>> the project I get the above error.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

Reply via email to