So from what I saw yesterday, the IDE specific Gradle configuration that is
created with the eclipse plugin is not working on main. I tried to fix it,
but I was getting some null-errors and I could not find a way to find
the actual cause. Perhaps it is related to the Gradle version, because we
made JDK and Gradle upgrades on main that are not present in 9x.

However, what I also saw is that Eclipse provides Eclipse Plug-ins for
Gradle <https://projects.eclipse.org/projects/tools.buildship>, which is, I
believe, the recommended way to open / import Gradle projects in Eclipse.
This would probably render the entire content from
gradle/ide/eclipse.gradle obsolete, and we could move forward and remove
IDE specific configurations, at least for Eclipse.

Now, what I would like to know, because I have never used Eclipse, would
the Gradle plugins provided by default in Eclipse solve any issues that are
currently present on the main branch? Because I was able to load and
execute gradle tasks, and was also able to resolve generated classes
without doing anything manually.

See also my comment for some more observations:
https://issues.apache.org/jira/browse/SOLR-17406?focusedCommentId=17912314&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17912314

Best,
Christos

On Mon, Jan 13, 2025 at 1:01 PM Jason Gerlowski <gerlowsk...@gmail.com>
wrote:

> Our gradle build tags the generated files as a 'sourceSet', so it's
> weird that Eclipse doesn't pick them up.
>
> https://github.com/apache/solr/blob/main/solr/solrj/build.gradle#L161-L167
>
> Maybe Eclipse has its own logic for determining sourceSets that
> deviates from Gradle's?
>
> Or maybe it knows they _should_ be a sourceSet but fails to include
> them because of the overlapping package name?  Conceptually, I do
> think the current package makes sense.  It makes sense for all our
> SolrRequest/SolrResponse implementations to be in the same package,
> regardless of their provenance.  But if it's a sticking point, we
> could probably move the generated ones to a "v2" sub-package or
> something similar.  I'd hate to confuse the user experience just to
> fix a quirky IDE, but if it unblocks devs it's prob worth it.
>
> On Sun, Jan 12, 2025 at 11:30 AM Christos Malliaridis
> <c.malliari...@gmail.com> wrote:
> >
> > I'll try to download and troubleshoot Eclipse as well. I'll give my best
> to
> > report back later today or tomorrow.
> >
> > I don't like that we have IDE specific gradle configurations, but it
> seems
> > that it is inevitable.
> >
> > On Sun, 12 Jan 2025, 16:39 Ishan Chattopadhyaya, <
> ichattopadhy...@gmail.com>
> > wrote:
> >
> > > I traced the omission of the eclipse support down to that issue indeed:
> > >
> > >
> https://issues.apache.org/jira/browse/SOLR-17406?focusedCommentId=17912283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17912283
> > >
> > > > Could you check if reverting the "wrapping" (line 24 in
> > > > gradle/ide/eclipse.gradle) of the eclipse-related part resolves the
> > > issue?
> > > > See the changes in eclipse.gradle from
> > > >
> > >
> > >
> https://github.com/apache/solr/commit/c9d3885f2fd0a7edf5efe4a264d0bdc276109eba
> > >
> > > Thanks, I'll try.
> > >
> > >
> > > On Sun, 12 Jan 2025 at 20:26, Ishan Chattopadhyaya <
> > > ichattopadhy...@gmail.com> wrote:
> > >
> > > > > Additionally, I believe missing java files for the API is normal,
> as we
> > > > are
> > > > > generating them during build. So if your project builds correctly,
> the
> > > > > files should be properly generated, I believe inside
> > > > > solrj/build/generated/src.
> > > >
> > > > Right, I found them after running the gradle build manually from
> command
> > > > line first.
> > > > Now, those generated src dir can be added as a source dir, but
> problem is
> > > > that a package by the same name also exists (
> > > > org.apache.solr.client.solrj.request). It would've been ideal if the
> > > > generated sources were to be in a package of their own, then I
> could've
> > > > easily added it as a source dir in Eclipse.
> > > >
> > > > On Sun, 12 Jan 2025 at 18:34, Christos Malliaridis <
> > > > c.malliari...@gmail.com> wrote:
> > > >
> > > >> Perhaps the latest "breaking" change introduced in v10 / main was
> > > related
> > > >> to the migration to version catalogs (#2706)? It may not have been
> > > tested
> > > >> properly and therefore may have broken the eclipse environment.
> > > >>
> > > >> Could you check if reverting the "wrapping" (line 24 in
> > > >> gradle/ide/eclipse.gradle) of the eclipse-related part resolves the
> > > issue?
> > > >> See the changes in eclipse.gradle from
> > > >>
> > > >>
> > >
> https://github.com/apache/solr/commit/c9d3885f2fd0a7edf5efe4a264d0bdc276109eba
> > > >> .
> > > >>
> > > >> Additionally, I believe missing java files for the API is normal,
> as we
> > > >> are
> > > >> generating them during build. So if your project builds correctly,
> the
> > > >> files should be properly generated, I believe inside
> > > >> solrj/build/generated/src.
> > > >>
> > > >> On Sun, Jan 12, 2025 at 11:38 AM Ishan Chattopadhyaya <
> > > >> ichattopadhy...@gmail.com> wrote:
> > > >>
> > > >> > Oh, and on branch_9x (which used to work before), there are tons
> of
> > > >> missing
> > > >> > files because of recent Mustache based generated Java files that
> can't
> > > >> be
> > > >> > found there.
> > > >> >
> > > >> >
> > > >>
> > >
> https://issues.apache.org/jira/browse/SOLR-16825?focusedCommentId=17912254&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17912254
> > > >> >
> > > >> > On Sun, 12 Jan 2025 at 11:16, Ishan Chattopadhyaya <
> > > >> > ichattopadhy...@gmail.com> wrote:
> > > >> >
> > > >> > > I can see that "./gradlew eclipse" works in branch_9x.
> > > >> > > Can someone please point me to any prior discussion around this?
> > > >> > >
> > > >> > > On Sun, 12 Jan 2025 at 11:04, Ishan Chattopadhyaya <
> > > >> > > ichattopadhy...@gmail.com> wrote:
> > > >> > >
> > > >> > >> Hi All,
> > > >> > >> I tried to set up Eclipse using the main branch, and was at a
> loss
> > > of
> > > >> > how
> > > >> > >> to proceed.
> > > >> > >>
> > > >> > >> 1) ./gradlew eclipse doesn't work, was it removed?
> > > >> > >> 2) Importing Solr as a gradle project doesn't work either,
> tons of
> > > >> > >> missing libraries and dependencies.
> > > >> > >>
> > > >> > >> I'm on JDK 22 and Ubuntu 22.04 LTS.
> > > >> > >>
> > > >> > >> Please help!
> > > >> > >> Thanks,
> > > >> > >> Ishan
> > > >> > >>
> > > >> > >
> > > >> >
> > > >>
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org
> For additional commands, e-mail: dev-h...@solr.apache.org
>
>

Reply via email to