Hi Kevin,

You should look at some plugins code, such as: 
https://github.com/elasticsearch/elasticsearch-analysis-icu

I think this should help.

Best.

David

> Le 25 nov. 2014 à 20:45, Kevin Burton <burtona...@gmail.com> a écrit :
> 
> I'm trying to use ElasticsearchTestCase in my test framework to start getting 
> ES deployed in production.
> 
> However, I'm in maven dependency hell and wanted some advice.
> 
> I'm trying to use this:
> 
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/using-elasticsearch-test-classes.html
> 
> but when I extend ElasticsearchTestCase and run the tests I get missing 
> dependencies (see below)
> 
> It seems there are 2-4 problem here all exacerbating the issue:
> 
> 1.  the lucene.version, lucene.maven.version, and elastisearch.version are 
> all undefined in the docs so I have to track down what these should be.
> 
> 2.  I have to add additional repositories (references in the main project 
> pom) to get these to work:
> 
>         <repository>
>             <id>Codehaus Snapshots</id>
>             <url>http://repository.codehaus.org/</url>
>         </repository>
>         <repository>
>             <id>Lucene snapshots</id>
>             
> <url>https://download.elasticsearch.org/lucenesnapshots/1641343</url>
>         </repository>
> 
> 3.  I don't think <type>test-jar</type> pulls in dependencies properly.  I've 
> never used this feature and instead put my test infra in foo-test so that 
> it's a normal dependency.  So something seems fishy.
> 
> 4. I seem that you're depending on these jars in the main pom.. but for some 
> reason they're not being deployed into my project.
> 
> ... any advice here would be appreciated.
> 
> java.lang.NoClassDefFoundError: org/apache/lucene/index/LeafReader
>       at __randomizedtesting.SeedInfo.seed([B3DCF11EC4F020A1]:0)
>       at 
> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:35)
>       at 
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
>       at 
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
>       at 
> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
>       at 
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
>       at 
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:365)
>       at java.lang.Thread.run(Thread.java:724)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.lucene.index.LeafReader
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at 
> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:35)
>       at 
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
>       at 
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
>       at 
> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
>       at 
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
>       at 
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:365)
>       at java.lang.Thread.run(Thread.java:724)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/a10f3167-c739-4763-abe5-f05369496572%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/5D468582-A71F-4D1C-9169-F797D381C539%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to