You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by bo...@apache.org on 2016/09/10 04:44:09 UTC
tika git commit: TIKA-2073 - Tika Language Detect Project should
include Bundle Activator and packaging consistent with other modules
Repository: tika
Updated Branches:
refs/heads/2.x 7a0280c77 -> f8092d3bd
TIKA-2073 - Tika Language Detect Project should include Bundle Activator
and packaging consistent with other modules
Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/f8092d3b
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/f8092d3b
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/f8092d3b
Branch: refs/heads/2.x
Commit: f8092d3bd9fb85d5c87983de562643632e7ddd7d
Parents: 7a0280c
Author: Bob Paulin <bo...@apache.org>
Authored: Fri Sep 9 23:43:56 2016 -0500
Committer: Bob Paulin <bo...@apache.org>
Committed: Fri Sep 9 23:43:56 2016 -0500
----------------------------------------------------------------------
tika-langdetect/pom.xml | 28 +++++++++++++++++++-
.../tika/langdetect/internal/Activator.java | 18 +++++++++++++
2 files changed, 45 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tika/blob/f8092d3b/tika-langdetect/pom.xml
----------------------------------------------------------------------
diff --git a/tika-langdetect/pom.xml b/tika-langdetect/pom.xml
index abaef98..7a93e44 100644
--- a/tika-langdetect/pom.xml
+++ b/tika-langdetect/pom.xml
@@ -45,6 +45,20 @@
<artifactId>language-detector</artifactId>
<version>0.5</version>
</dependency>
+
+ <!-- Optional OSGi dependencies, used only when running within OSGi -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
<!-- Test dependencies -->
<dependency>
@@ -69,8 +83,20 @@
<instructions>
<Bundle-DocURL>${project.url}</Bundle-DocURL>
<Bundle-Activator>
- org.apache.tika.parser.internal.Activator
+ org.apache.tika.langdetect.internal.Activator
</Bundle-Activator>
+ <Embed-Dependency>
+ language-detector,
+ guava,
+ jsonic,
+ annotations,
+ commons-io,
+ commons-codec
+ </Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Export-Package>
+ org.apache.tika.langdetect.*
+ </Export-Package>
<Import-Package>
org.w3c.dom,
org.apache.tika.*,
http://git-wip-us.apache.org/repos/asf/tika/blob/f8092d3b/tika-langdetect/src/main/java/org/apache/tika/langdetect/internal/Activator.java
----------------------------------------------------------------------
diff --git a/tika-langdetect/src/main/java/org/apache/tika/langdetect/internal/Activator.java b/tika-langdetect/src/main/java/org/apache/tika/langdetect/internal/Activator.java
new file mode 100644
index 0000000..1d6ea55
--- /dev/null
+++ b/tika-langdetect/src/main/java/org/apache/tika/langdetect/internal/Activator.java
@@ -0,0 +1,18 @@
+package org.apache.tika.langdetect.internal;
+
+import org.apache.tika.osgi.TikaAbstractBundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends TikaAbstractBundleActivator {
+
+ @Override
+ public void start(BundleContext context) {
+ registerAllTikaServiceLoaders(context, Activator.class.getClassLoader());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+}