Skip to content

Commit bc74d11

Browse files
authored
TIKA-4344 -- add a magika wrapper (#2036)
* TIKA-4344 -- add a magika wrapper
1 parent 36e877a commit bc74d11

File tree

12 files changed

+738
-1
lines changed

12 files changed

+738
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Release 4.0.0-BETA1 - ???
33

44
Release 3.1.0 - ??
55

6+
* Add a wrapper for Google's magika detector (TIKA-4344).
7+
68
* Add support for MachO via Alexey Pelykh (TIKA-4309).
79

810
* Add logic to inject spaces in XPS files based on font widths via Ruairidh Williamson (TIKA-4315).

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<module>tika-bom</module>
4040
<module>tika-core</module>
4141
<module>tika-serialization</module>
42+
<module>tika-detectors</module>
4243
<module>tika-parsers</module>
4344
<module>tika-bundles</module>
4445
<module>tika-xmp</module>
@@ -54,7 +55,6 @@
5455
<module>tika-translate</module>
5556
<module>tika-example</module>
5657
<module>tika-java7</module>
57-
<module>tika-detectors</module>
5858
<module>tika-handlers</module>
5959
</modules>
6060

tika-detectors/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535

3636
<modules>
3737
<module>tika-detector-siegfried</module>
38+
<module>tika-detector-magika</module>
3839
</modules>
3940
</project>
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<parent>
22+
<artifactId>tika-detectors</artifactId>
23+
<groupId>org.apache.tika</groupId>
24+
<version>4.0.0-SNAPSHOT</version>
25+
</parent>
26+
<modelVersion>4.0.0</modelVersion>
27+
28+
<artifactId>tika-detector-magika</artifactId>
29+
<name>Apache Tika magika wrapper</name>
30+
31+
<dependencies>
32+
<dependency>
33+
<groupId>${project.groupId}</groupId>
34+
<artifactId>tika-core</artifactId>
35+
<version>${project.version}</version>
36+
<scope>provided</scope>
37+
</dependency>
38+
<dependency>
39+
<groupId>com.fasterxml.jackson.core</groupId>
40+
<artifactId>jackson-databind</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.apache.logging.log4j</groupId>
44+
<artifactId>log4j-core</artifactId>
45+
<scope>test</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.apache.logging.log4j</groupId>
49+
<artifactId>log4j-slf4j2-impl</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>${project.groupId}</groupId>
54+
<artifactId>tika-core</artifactId>
55+
<version>${project.version}</version>
56+
<type>test-jar</type>
57+
<scope>test</scope>
58+
</dependency>
59+
</dependencies>
60+
<build>
61+
<plugins>
62+
<plugin>
63+
<artifactId>maven-shade-plugin</artifactId>
64+
<executions>
65+
<execution>
66+
<phase>package</phase>
67+
<goals>
68+
<goal>shade</goal>
69+
</goals>
70+
<configuration>
71+
<createDependencyReducedPom>
72+
false
73+
</createDependencyReducedPom>
74+
<filters>
75+
<filter>
76+
<artifact>*:*</artifact>
77+
<excludes>
78+
<exclude>module-info.class</exclude>
79+
<exclude>module-info.class</exclude>
80+
<exclude>META-INF/*.SF</exclude>
81+
<exclude>META-INF/*.DSA</exclude>
82+
<exclude>META-INF/*.RSA</exclude>
83+
<exclude>META-INF/*.txt</exclude>
84+
</excludes>
85+
</filter>
86+
</filters>
87+
<transformers>
88+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
89+
<manifestEntries>
90+
<Multi-Release>true</Multi-Release>
91+
</manifestEntries>
92+
</transformer>
93+
</transformers>
94+
</configuration>
95+
</execution>
96+
</executions>
97+
</plugin>
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-jar-plugin</artifactId>
101+
<configuration>
102+
<archive>
103+
<manifestEntries>
104+
<Automatic-Module-Name>org.apache.tika.detector.magika</Automatic-Module-Name>
105+
</manifestEntries>
106+
</archive>
107+
</configuration>
108+
</plugin>
109+
</plugins>
110+
</build>
111+
112+
</project>

0 commit comments

Comments
 (0)