title: How to add a custom MIME type and override a default extension pattern?
body: <p>I am trying to add a custom mime type to Apache Tika.</p>
  
  <p>I have the following <code>custom-mimetypes.xml</code> document in <code>org.apache.tika.mime</code> :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;mime-info&gt;
      &lt;mime-type type="text/stringtemplategroup"&gt;
          &lt;glob pattern="*.stg"/&gt;
      &lt;/mime-type&gt;
      &lt;mime-type type="text/stringtemplate"&gt;
          &lt;glob pattern="*.st"/&gt;
      &lt;/mime-type&gt;
  &lt;/mime-info&gt;
  </code></pre>
  
  <p>I am getting an error about a <code>Conflicting extension pattern .st</code>:</p>
  
  <pre><code>Caused by: org.apache.tika.mime.MimeTypeException: Conflicting extension pattern: .st
      at org.apache.tika.mime.MimeTypesReader.startElement(MimeTypesReader.java:166)
      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  </code></pre>
  
  <p><strong>How do I override the default entry for <code>*.st</code> extension and have it use my own?</strong></p>