Skip to content

Conversation

@tballison
Copy link
Contributor

Thanks for your contribution to Apache Tika! Your help is appreciated!

Before opening the pull request, please verify that

  • there is an open issue on the Tika issue tracker which describes the problem or the improvement. We cannot accept pull requests without an issue because the change wouldn't be listed in the release notes.
  • the issue ID (TIKA-XXXX)
    • is referenced in the title of the pull request
    • and placed in front of your commit messages surrounded by square brackets ([TIKA-XXXX] Issue or pull request title)
  • commits are squashed into a single one (or few commits for larger changes)
  • Tika is successfully built and unit tests pass by running mvn clean test
  • there should be no conflicts when merging the pull request branch into the recent main branch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulled main branch
  • if you add new module that downstream users will depend upon add it to relevant group in tika-bom/pom.xml.

We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the Tika mailing list. Thanks!

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
<modelVersion>4.1.0</modelVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for model version change, Maven 4 is happy with model 4.0 as well. Worth keeping it at model version 4.0 if you want to keep both, ability to build with Maven 3 and Maven 4. Once only Maven 4 is used, you can up model as well (of course, if you do want new features and insist on Maven4-only, model change is okay too, but then Maven 3 is not usable anymore to build Tika)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was done automatically by mvnup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, I see because of the settings I used, based on the documentation for upgrading.

<modules>
<module>tika-bundle-standard</module>
</modules>
<subprojects>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IF you remain on model 4.0 (to allow both, use of Maven 3 and Maven 4 to build Tika) undo this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was done by mvnup automatically. Should I undo that throughout?

@cstamas
Copy link
Member

cstamas commented Nov 10, 2025

@gnodet ping

@tballison did you use mvnup to "upgrade"?

@tballison
Copy link
Contributor Author

I tried to update to use nisse, and i"m still getting the error.

I set eclipseP2RepoId to http://something.com in the pom that brings in uimaj4-parent, and I got the same failure.

I acknowledge that I may have messed up both fixes...lol...

Thank you @cstamas !

@tballison
Copy link
Contributor Author

tballison commented Nov 10, 2025

@gnodet ping

@tballison did you use mvnup to "upgrade"?

Y. I tried to follow directions. 🤣

./mvnup check --model-version 4.1.0 --directory ~/Intellij/tika-main/
./mvnup apply --model-version 4.1.0 --directory ~/Intellij/tika-main/

@gnodet
Copy link

gnodet commented Nov 10, 2025

@gnodet ping

@tballison did you use mvnup to "upgrade"?

Y. I tried to follow directions. 🤣


./mvnup check --model-version 4.1.0 --directory ~/Intellij/tika-main/

./mvnup apply --model-version 4.1.0 --directory ~/Intellij/tika-main/

So if you upgrade to model 4.1.0, you need Maven 4. The build error comes from Maven 3 not supporting this model version.
That's up to the project to decide...

@tballison
Copy link
Contributor Author

The point of this is to see if we can upgrade once 4.0.0 is released. I'm not expecting a clean ci/cd build atm. Thank you, again!

@cstamas
Copy link
Member

cstamas commented Nov 10, 2025

@tballison see #2391
With that in place, you can build Tika w/ both, Maven 3 and Maven 4

@tballison
Copy link
Contributor Author

Awesome. Merged. Thank you @cstamas !

@THausherr
Copy link
Contributor

The last change makes it fail on our CI:

[INFO] --- protobuf:0.6.1:compile (default) @ tika-grpc ---
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.25.8/protoc-3.25.8-$%7Bos.detected.classifier%7D.exe
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project tika-grpc: Unable to resolve artifact: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.25.8

looking for that error message, I see that it suggests to add exactly the segment that was removed in the tika-grpc pom.xml
https://stackoverflow.com/questions/47477194/

@THausherr
Copy link
Contributor

Oops I see now that this was mentioned in the JIRA ticket, that this plugin no longer works.

@cstamas
Copy link
Member

cstamas commented Nov 11, 2025

It was replaced with Nisse.
See #2391

cstamas and others added 2 commits November 11, 2025 07:23
This is the set of minimal changes to make the build work with Maven 4

Changes:
* drop unmaintained extension, replace with Nisse
* move ossindex plugin to verify (was at validate) -- makes dep resolution mandatory
* fix using user properties the P2 repo without repo.id (makes Maven 4 fail)

(cherry picked from commit a8e7f9f)
@tballison
Copy link
Contributor Author

@THausherr sorry for the noise. I just merged @cstamas 's PR into this branch and I got a local clean build with maven 4.0.0-rc5.

Once maven 4.0.0 is released, we can merge this and update our ci/cd? Unless there's an easy way to configure 4.0.0-rc5 for a separate build now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants