I would like to override a file extension already registered in the tika-mimetypes.xml file.
I know that the custom-mimetypes.xml file allows to register new custom mimetypes and it works well for new file extenstions (glob pattern) that do not already exist in tika-mimetypes.xml.
Lets take the following entry in tika-mimetypes.xml:
What should I do to override the existing mime-type value to return "application/my-specific-resource" instead of "application/x-dtbresource+xml" ?
We would not normally recommend overriding existing mime-types but if you have to do it you can copy tika-mimetypes.xml and then place it at the front of your classpath in the package/folder org.apache.tika.mime, this will then override the default.