Hi Andi,

> Or is there an easy way for me to request from the Lucene Gradle build
that these external jar files be put somewhere more accessible

It's a trivial problem to solve but the question isn't stated right - I
think you should decide which specific subprojects from Lucene you need
binary dependencies of. Then we can do any of the following:

1) prepare either a special task for you to collect everything for pylucene
or (perhaps better)
2) a separate project that would include all of Lucene sources, build them
and prepare the above binaries,
3) a separate project that would only depend on Lucene binaries and fetch
whatever else is needed based on POMs.

I haven't looked at PyLucene's makefiles but if you let me know which one
of the above works best for you, I'll prepare something on the gradle side.

Dawid


On Sat, Jan 1, 2022 at 6:37 PM Andi Vajda <[email protected]> wrote:

>
> Thank you, Uwe.
>
> On Fri, 31 Dec 2021, Uwe Schindler wrote:
>
> > As a Gradle project you can depend on Lucene artifacts and use Gradle
> Apis
> > in your build files.
>
> Until 8.x, PyLucene is built via a Makefile that:
>    - calls Ant to build Lucene, building a bunch of jars individually
>    - calls Ant to build Lucene extensions (Java classes extending some
> Lucene
>      classes with native methods that are then implemented in Python)
>    - calls JCC to generate and compile C++/Python PyLucene
>
> Now, with the Lucene Gradle build, the Makefile:
>    - inserts the Lucene extension classes into Lucene's Gradle build via a
>      new subproject called 'extensions'
>    - calls Gradle to build all Lucene jars and the extra extensions.jar in
>      one command: ./gradlew jar
>    - calls JCC to generate and compile C++/Python PyLucene
>
> But the antlr, asm, asm-commons and hppc jar files are no longer available.
> They were made available via Ivy before, in the old Lucene ant build.
>
> As you suggested, fishing around ~/.gradle, I can find them all in there
> but
> that seems very brittle as there are multiple versions present there.
>
> If at all possible, I'd like to not create a Maven project (PyLucene is
> not
> a Java project), mess with pom.xml files or create a new Gradle project
> for
> PyLucene.
>
> But maybe I should actually create a new Gradle project for PyLucene that
> replaces its Makefile ? Or is there an easy way for me to request from the
> Lucene Gradle build that these external jar files be put somewhere more
> accessible ? Uwe, you say that they are present in the Luke .tgz ? What is
> the task that produces the Luke .tgz ? I might just be able to fish the
> .jar
> files out of it then. I tried assembleBinaryTgz but that only makes the
> Lucene one and assembleRelease fails for me on checkWorkingCopyClean since
> I
> have a bunch of changes not ready to be checked in...
>
> Thank you for your insights !
>
> Andi..
>
> > If you have the state of your work (do you use Gradle to build already?)
> > we may be able to help you. You may need to write a Gradle task that
> calls
> > your compiler. See ECJ (calls Java) or Changes2html (calls python) tasks
> > as examples.
> >
> > BTW, the jar files are hidden in the Gradle cache folder somewhere in
> your
> > home dir. Bit to access them you need Gradle Apis.
> >
> > Uwe
> >
> > Am 31. Dezember 2021 18:24:47 UTC schrieb Uwe Schindler <[email protected]
> >:
> >> Hi,
> >>
> >> The Lucene 9.0 binary tgz no longer contains 3rd party dependencies,
> unless they are needed to run Luke.
> >>
> >> Generally we expect people to parse the pom.xml files and download
> artifacts as part of a downstream build. If you are able to use Maven, I'd
> recommend to create a small Maven Java Project listing the Lucene
> dependencies and ask it to make a complete distribution.
> >>
> >> If you have the source distribution, I'd recommend to make pylucene
> also use Gradle to build and then you can consume dependencies.
> >>
> >> Uwe
> >>
> >> Am 31. Dezember 2021 18:12:55 UTC schrieb Andi Vajda <[email protected]
> >:
> >>>
> >>>  Hi,
> >>>
> >>> I've begun adapting PyLucene to Lucene 9.0 and switching it to using
> gradle.
> >>>
> >>> The expressions sub-project depends on antlr4 and asm and I'm able to
> build
> >>> all of Lucene 9.0 without explicitely downloading these jar files.
> >>>
> >>> The PyLucene build needs these jar files then to produce wrappers for
> the
> >>> entrypoints into the expressions sub-project classes.
> >>>
> >>> Where are these jar files stored ?
> >>> $ find lucene-java-9.0.0 -name '*.jar' | grep antlr
> >>> produces nothing.
> >>>
> >>> Thanks !
> >>>
> >>> Andi..
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [email protected]
> >>> For additional commands, e-mail: [email protected]
> >>>
> >>
> >> --
> >> Uwe Schindler
> >> Achterdiek 19, 28357 Bremen
> >> https://www.thetaphi.de
> > --
> > Uwe Schindler
> > Achterdiek 19, 28357 Bremen
> > https://www.thetaphi.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to