Apache HTTP Server mime.types for use with Java's MimetypesFileTypeMap
This Maven project simply downloads a mime.types file from the Apache HTTP Server project
and creates a Jar file containing the file META-INF/mime.types.
This makes the mime.types file usable from Java's MimetypesFileTypeMap
just by placing the resultant Jar file on the classpath.
The Java Runtime ships with a built-in mimetypes.default
which is very limited and contains only ~20 definitions.
As we could not find an existing and comprehensive source of MIME Types that were suitable for use with the Java Activation Framework, we decided to publish our own based on the list provided by Apache HTTPD. We hope this will also be of use to other Java developers.
We try and follow the Semantic Versioning convention, whilst also incorporating
the version number of Apache HTTPD from which the mime.types file was taken.
Our release version numbers follow the template:
${apache.httpd.version}+${project.version}
So for Apache HTTP 2.4.46, and the first version of this project (i.e. 1.0.0), our release version is: 2.4.46+1.0.0.
Release artifacts are published to Maven Central.
Add the following to the <dependencies> section of your pom.xml:
<dependency>
<groupId>com.evolvedbinary.thirdparty.org.apache.httpd</groupId>
<artifactId>apache-httpd-mime-types</artifactId>
<version>2.4.46+1.0.0</version>
</dependency>You might also like to use the latest version of the javax.activation API. If so, then also add the following to the <dependencies> section of your pom.xml:
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>2.0.0</version>
</dependency>