Repository: tika Updated Branches: refs/heads/2.x 4ed7c9f7e -> 3962ceb7a
TIKA-1860 - Enable osgi integration tests. Added explicit jar path from dependencies. Project: http://git-wip-us.apache.org/repos/asf/tika/repo Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/3962ceb7 Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/3962ceb7 Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/3962ceb7 Branch: refs/heads/2.x Commit: 3962ceb7a11cabc2eb0c2364908ea430c208efeb Parents: 4ed7c9f Author: Bob Paulin <[email protected]> Authored: Sun Feb 28 00:55:58 2016 -0600 Committer: Bob Paulin <[email protected]> Committed: Sun Feb 28 00:55:58 2016 -0600 ---------------------------------------------------------------------- tika-parser-modules/pom.xml | 20 +++++++++--- .../tika-parser-advanced-module/pom.xml | 3 ++ .../java/org/apache/tika/module/BundleIT.java | 7 ++-- .../test-bundles.xml | 34 ++++++++++++++++++++ .../tika-parser-cad-module/pom.xml | 3 ++ .../java/org/apache/tika/module/BundleIT.java | 6 ++-- .../tika-parser-cad-module/test-bundles.xml | 34 ++++++++++++++++++++ .../tika-parser-code-module/pom.xml | 3 ++ .../java/org/apache/tika/module/BundleIT.java | 7 ++-- .../tika-parser-code-module/test-bundles.xml | 34 ++++++++++++++++++++ .../tika-parser-crypto-module/pom.xml | 3 ++ .../java/org/apache/tika/module/BundleIT.java | 7 ++-- .../tika-parser-crypto-module/test-bundles.xml | 34 ++++++++++++++++++++ .../tika-parser-multimedia-module/pom.xml | 3 ++ .../java/org/apache/tika/module/BundleIT.java | 6 ++-- .../test-bundles.xml | 34 ++++++++++++++++++++ 16 files changed, 214 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/pom.xml b/tika-parser-modules/pom.xml index 43f2cd4..ce5edd3 100644 --- a/tika-parser-modules/pom.xml +++ b/tika-parser-modules/pom.xml @@ -213,13 +213,25 @@ <name>project.bundle.file</name> <value>target/${project.build.finalName}-bundle.jar</value> </property> - <property> - <name>tika.core.version</name> - <value>${project.version}</value> - </property> </systemProperties> </configuration> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <phase>pre-integration-test</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptor>test-bundles.xml</descriptor> + <finalName>test</finalName> + <attach>false</attach> + </configuration> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-advanced-module/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-advanced-module/pom.xml b/tika-parser-modules/tika-parser-advanced-module/pom.xml index b9d27ca..14da26a 100644 --- a/tika-parser-modules/tika-parser-advanced-module/pom.xml +++ b/tika-parser-modules/tika-parser-advanced-module/pom.xml @@ -104,6 +104,9 @@ <plugin> <artifactId>maven-failsafe-plugin</artifactId> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-advanced-module/src/test/java/org/apache/tika/module/BundleIT.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-advanced-module/src/test/java/org/apache/tika/module/BundleIT.java b/tika-parser-modules/tika-parser-advanced-module/src/test/java/org/apache/tika/module/BundleIT.java index cdfac0a..c446ee8 100644 --- a/tika-parser-modules/tika-parser-advanced-module/src/test/java/org/apache/tika/module/BundleIT.java +++ b/tika-parser-modules/tika-parser-advanced-module/src/test/java/org/apache/tika/module/BundleIT.java @@ -58,16 +58,15 @@ public class BundleIT { private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; - private static final String TIKA_CORE_VERSION = "tika.core.version"; - @Inject private BundleContext bc; @Configuration public Option[] configuration() throws IOException, URISyntaxException { String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP); - String tikaCoreVersion = System.getProperty(TIKA_CORE_VERSION); - return options(junitBundles(), mavenBundle("org.apache.tika", "tika-core", tikaCoreVersion), + + return options(junitBundles(), + bundle(new File("target/test-bundles/tika-core.jar").toURI().toURL().toString()), bundle(new File(bundleFileName).toURI().toString())); } http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-advanced-module/test-bundles.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-advanced-module/test-bundles.xml b/tika-parser-modules/tika-parser-advanced-module/test-bundles.xml new file mode 100644 index 0000000..53bb6e4 --- /dev/null +++ b/tika-parser-modules/tika-parser-advanced-module/test-bundles.xml @@ -0,0 +1,34 @@ +<!-- + 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/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bundles</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory/> + <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping> + <includes> + <include>org.apache.tika:tika-core</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-cad-module/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-cad-module/pom.xml b/tika-parser-modules/tika-parser-cad-module/pom.xml index 7e81e6c..89ddcd4 100644 --- a/tika-parser-modules/tika-parser-cad-module/pom.xml +++ b/tika-parser-modules/tika-parser-cad-module/pom.xml @@ -79,6 +79,9 @@ <plugin> <artifactId>maven-failsafe-plugin</artifactId> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-cad-module/src/test/java/org/apache/tika/module/BundleIT.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-cad-module/src/test/java/org/apache/tika/module/BundleIT.java b/tika-parser-modules/tika-parser-cad-module/src/test/java/org/apache/tika/module/BundleIT.java index 394df11..6f696b1 100644 --- a/tika-parser-modules/tika-parser-cad-module/src/test/java/org/apache/tika/module/BundleIT.java +++ b/tika-parser-modules/tika-parser-cad-module/src/test/java/org/apache/tika/module/BundleIT.java @@ -58,16 +58,14 @@ public class BundleIT { private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; - private static final String TIKA_CORE_VERSION = "tika.core.version"; - @Inject private BundleContext bc; @Configuration public Option[] configuration() throws IOException, URISyntaxException { String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP); - String tikaCoreVersion = System.getProperty(TIKA_CORE_VERSION); - return options(junitBundles(), mavenBundle("org.apache.tika", "tika-core", tikaCoreVersion), + return options(junitBundles(), + bundle(new File("target/test-bundles/tika-core.jar").toURI().toURL().toString()), bundle(new File(bundleFileName).toURI().toString())); } http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-cad-module/test-bundles.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-cad-module/test-bundles.xml b/tika-parser-modules/tika-parser-cad-module/test-bundles.xml new file mode 100644 index 0000000..53bb6e4 --- /dev/null +++ b/tika-parser-modules/tika-parser-cad-module/test-bundles.xml @@ -0,0 +1,34 @@ +<!-- + 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/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bundles</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory/> + <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping> + <includes> + <include>org.apache.tika:tika-core</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-code-module/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-code-module/pom.xml b/tika-parser-modules/tika-parser-code-module/pom.xml index 8c46554..c804f8d 100644 --- a/tika-parser-modules/tika-parser-code-module/pom.xml +++ b/tika-parser-modules/tika-parser-code-module/pom.xml @@ -106,6 +106,9 @@ <plugin> <artifactId>maven-failsafe-plugin</artifactId> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-code-module/src/test/java/org/apache/tika/module/BundleIT.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-code-module/src/test/java/org/apache/tika/module/BundleIT.java b/tika-parser-modules/tika-parser-code-module/src/test/java/org/apache/tika/module/BundleIT.java index af1fa22..e1570ee 100644 --- a/tika-parser-modules/tika-parser-code-module/src/test/java/org/apache/tika/module/BundleIT.java +++ b/tika-parser-modules/tika-parser-code-module/src/test/java/org/apache/tika/module/BundleIT.java @@ -57,16 +57,15 @@ import org.xml.sax.ContentHandler; public class BundleIT { private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; - - private static final String TIKA_CORE_VERSION = "tika.core.version"; + @Inject private BundleContext bc; @Configuration public Option[] configuration() throws IOException, URISyntaxException { String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP); - String tikaCoreVersion = System.getProperty(TIKA_CORE_VERSION); - return options(junitBundles(), mavenBundle("org.apache.tika", "tika-core", tikaCoreVersion), + return options(junitBundles(), + bundle(new File("target/test-bundles/tika-core.jar").toURI().toURL().toString()), bundle(new File(bundleFileName).toURI().toString())); } http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-code-module/test-bundles.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-code-module/test-bundles.xml b/tika-parser-modules/tika-parser-code-module/test-bundles.xml new file mode 100644 index 0000000..53bb6e4 --- /dev/null +++ b/tika-parser-modules/tika-parser-code-module/test-bundles.xml @@ -0,0 +1,34 @@ +<!-- + 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/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bundles</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory/> + <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping> + <includes> + <include>org.apache.tika:tika-core</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-crypto-module/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-crypto-module/pom.xml b/tika-parser-modules/tika-parser-crypto-module/pom.xml index 636d008..0838a00 100644 --- a/tika-parser-modules/tika-parser-crypto-module/pom.xml +++ b/tika-parser-modules/tika-parser-crypto-module/pom.xml @@ -88,6 +88,9 @@ <plugin> <artifactId>maven-failsafe-plugin</artifactId> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-crypto-module/src/test/java/org/apache/tika/module/BundleIT.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-crypto-module/src/test/java/org/apache/tika/module/BundleIT.java b/tika-parser-modules/tika-parser-crypto-module/src/test/java/org/apache/tika/module/BundleIT.java index 441baa5..46c4b4e 100644 --- a/tika-parser-modules/tika-parser-crypto-module/src/test/java/org/apache/tika/module/BundleIT.java +++ b/tika-parser-modules/tika-parser-crypto-module/src/test/java/org/apache/tika/module/BundleIT.java @@ -57,16 +57,15 @@ import org.xml.sax.ContentHandler; public class BundleIT { private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; - - private static final String TIKA_CORE_VERSION = "tika.core.version"; + @Inject private BundleContext bc; @Configuration public Option[] configuration() throws IOException, URISyntaxException { String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP); - String tikaCoreVersion = System.getProperty(TIKA_CORE_VERSION); - return options(junitBundles(), mavenBundle("org.apache.tika", "tika-core", tikaCoreVersion), + return options(junitBundles(), + bundle(new File("target/test-bundles/tika-core.jar").toURI().toURL().toString()), bundle(new File(bundleFileName).toURI().toString())); } http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-crypto-module/test-bundles.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-crypto-module/test-bundles.xml b/tika-parser-modules/tika-parser-crypto-module/test-bundles.xml new file mode 100644 index 0000000..53bb6e4 --- /dev/null +++ b/tika-parser-modules/tika-parser-crypto-module/test-bundles.xml @@ -0,0 +1,34 @@ +<!-- + 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/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bundles</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory/> + <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping> + <includes> + <include>org.apache.tika:tika-core</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-multimedia-module/pom.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-multimedia-module/pom.xml b/tika-parser-modules/tika-parser-multimedia-module/pom.xml index 084c8a7..566ad81 100644 --- a/tika-parser-modules/tika-parser-multimedia-module/pom.xml +++ b/tika-parser-modules/tika-parser-multimedia-module/pom.xml @@ -168,6 +168,9 @@ <plugin> <artifactId>maven-failsafe-plugin</artifactId> </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-multimedia-module/src/test/java/org/apache/tika/module/BundleIT.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-multimedia-module/src/test/java/org/apache/tika/module/BundleIT.java b/tika-parser-modules/tika-parser-multimedia-module/src/test/java/org/apache/tika/module/BundleIT.java index 3b903da..10b1a95 100644 --- a/tika-parser-modules/tika-parser-multimedia-module/src/test/java/org/apache/tika/module/BundleIT.java +++ b/tika-parser-modules/tika-parser-multimedia-module/src/test/java/org/apache/tika/module/BundleIT.java @@ -58,16 +58,14 @@ public class BundleIT { private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; - private static final String TIKA_CORE_VERSION = "tika.core.version"; - @Inject private BundleContext bc; @Configuration public Option[] configuration() throws IOException, URISyntaxException { String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP); - String tikaCoreVersion = System.getProperty(TIKA_CORE_VERSION); - return options(junitBundles(), mavenBundle("org.apache.tika", "tika-core", tikaCoreVersion), + return options(junitBundles(), + bundle(new File("target/test-bundles/tika-core.jar").toURI().toURL().toString()), bundle(new File(bundleFileName).toURI().toString())); } http://git-wip-us.apache.org/repos/asf/tika/blob/3962ceb7/tika-parser-modules/tika-parser-multimedia-module/test-bundles.xml ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-multimedia-module/test-bundles.xml b/tika-parser-modules/tika-parser-multimedia-module/test-bundles.xml new file mode 100644 index 0000000..53bb6e4 --- /dev/null +++ b/tika-parser-modules/tika-parser-multimedia-module/test-bundles.xml @@ -0,0 +1,34 @@ +<!-- + 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/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bundles</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory/> + <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping> + <includes> + <include>org.apache.tika:tika-core</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file
