You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2023/09/27 15:56:15 UTC
[tika] 01/01: TIKA-4143 -- initial work on tika-app for a thin-jar distribution
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch TIKA-4143
in repository https://gitbox.apache.org/repos/asf/tika.git
commit 1b2ff3f87913123f17d26dccd88470fcde404b7e
Author: tballison <ta...@apache.org>
AuthorDate: Wed Sep 27 11:56:05 2023 -0400
TIKA-4143 -- initial work on tika-app for a thin-jar distribution
---
tika-app/assembly.xml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
tika-app/pom.xml | 36 +++++++++++++++++++++++++---
2 files changed, 98 insertions(+), 3 deletions(-)
diff --git a/tika-app/assembly.xml b/tika-app/assembly.xml
new file mode 100644
index 000000000..2e97520cd
--- /dev/null
+++ b/tika-app/assembly.xml
@@ -0,0 +1,65 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd">
+
+ <id>bin</id>
+ <!-- Specifies that our binary distribution is a zip package -->
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- Adds the dependencies of our application to the lib directory -->
+ <dependencySets>
+ <dependencySet>
+ <!--
+ Project artifact is not copied under library directory since
+ it is added to the root directory of the zip package.
+ -->
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>lib</outputDirectory>
+ <unpack>false</unpack>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <!--
+ Adds startup scripts to the root directory of zip package. The startup
+ scripts are copied from the src/main/scripts directory.
+
+ <fileSet>
+ <directory>${project.build.scriptSourceDirectory}</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>startup.*</include>
+ </includes>
+ </fileSet>-->
+ <!--
+ Adds the jar file of our example application to the root directory
+ of the created zip package.
+ -->
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>original-*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
diff --git a/tika-app/pom.xml b/tika-app/pom.xml
index 68ac79477..27d099b06 100644
--- a/tika-app/pom.xml
+++ b/tika-app/pom.xml
@@ -106,6 +106,7 @@
</resource>
</resources>
<plugins>
+
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.version}</version>
@@ -135,15 +136,15 @@
<exclude>CHANGES</exclude>
<exclude>README</exclude>
<exclude>builddef.lst</exclude>
- <!-- clutter not needed in jar -->
+ <!-- clutter not needed in jar -->
<exclude>resources/grib1/nasa/README*.pdf</exclude>
<exclude>resources/grib1/**/readme*.txt</exclude>
<exclude>resources/grib2/**/readme*.txt</exclude>
- <!-- TIKA-763: Workaround to avoid including LGPL classes -->
+ <!-- TIKA-763: Workaround to avoid including LGPL classes -->
<exclude>ucar/nc2/iosp/fysat/Fysat*.class</exclude>
<exclude>ucar/nc2/dataset/transform/VOceanSG1*class</exclude>
<exclude>ucar/unidata/geoloc/vertical/OceanSG*.class</exclude>
- <!-- https://issues.apache.org/jira/browse/TIKA-3650-->
+ <!-- https://issues.apache.org/jira/browse/TIKA-3650 -->
<exclude>javax/**/*</exclude>
</excludes>
@@ -177,6 +178,30 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <configuration>
+ <appendAssemblyId>true</appendAssemblyId>
+ <finalName>tika-app</finalName>
+ <descriptors>
+ <descriptor>assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <!-- bind to the packaging phase -->
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -185,6 +210,11 @@
<manifestEntries>
<Automatic-Module-Name>org.apache.tika.app</Automatic-Module-Name>
</manifestEntries>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <mainClass>org.apache.tika.cli.TikaCLI</mainClass>
+ </manifest>
</archive>
</configuration>
<executions>