[ https://issues.apache.org/jira/browse/TIKA-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15135434#comment-15135434 ]
Thamme Gowda N commented on TIKA-1851: -------------------------------------- Hi [~talli...@mitre.org] [~chrismattmann] and [~bobpaulin] I spent some time in debugging tests on 2.x branch. I think there's an issue with test setup in this multi module maven project. I found that when tests are run on parser-modules and the *tika-test-resources* artifact is downloaded from the public repository (http://repository.apache.org/snapshots/org/apache/tika/tika-test-resources/2.0-SNAPSHOT/tika-test-resources-2.0-XXX-tests.jar) instead of locally building it. Is it an expected behaviour? Probably this is the reason why the tests are failing. I think it is required to pull the jar from tika-test-resources module's build instead of public snapshot repo. Something like calling mvn install on tika-test-resources first before the tests on other modules should pass. (Sorry, I haven't figured out a way to configure this in maven yet.) But here is how you can reproduce this: {code} $ rm -r ~/.m2/repository/org/apache/tika/tika-test-resources/ $ rm tika-test-resources/src/test/resources/org/apache/tika/parser/ner/opennlp/*.bin $ mvn package -pl tika-test-resources # This should download NER files and result in SUCCESS. Otherwise it is connection/proxy problem, we have fixed it on 1.x just need to port it to 2.x. # Get into flight mode: plug out your internet connection $ mvn package -pl tika-test-resources # Once more but this time offline. It did pass for me! Sounds good $ mvn test -pl tika-parser-modules/tika-parser-advanced-module/ # it fails because tika-test-resources is not built, not available $ mvn install -pl tika-test-resources/ -DskipTests # lets install, skipped tests because we just seen pass in previous step $ mvn test -pl tika-parser-modules/tika-parser-advanced-module/ # Did it pass? No for me. It tries to download test-resources and fails. But we just installed the test resources to local repo, it should have added to the class path. Why not? # get off from flight mode, plug in the internet $ mvn test -pl tika-parser-modules/tika-parser-advanced-module/ -U # Did it pass? Yes for me. {code} > Tika 2.0 - Move test resources from core to test-resources > ---------------------------------------------------------- > > Key: TIKA-1851 > URL: https://issues.apache.org/jira/browse/TIKA-1851 > Project: Tika > Issue Type: Sub-task > Reporter: Tim Allison > Assignee: Tim Allison > Priority: Trivial > Fix For: 2.0 > > > Let's try to move resources that are used for testing to the test-resources > module if possible: MockParser, DummyParser, TikaTest and the unit tests for > MockParser. That should also allow us to drop the test-jar goal in > tika-core. Anything else? > Haven't actually tried this yet; there may be surprises. -- This message was sent by Atlassian JIRA (v6.3.4#6332)