Simmetrics / simmetrics

Similarity or Distance Metrics, e.g. Levenshtein, for Java
Apache License 2.0
340 stars 77 forks source link

java.lang.NoClassDefFoundError: com/google/common/base/Preconditions #27

Closed GHrw62 closed 7 years ago

GHrw62 commented 7 years ago

Trying to run an example with StringMetric cosineSimilarity when it gets a runtime exception about a missing dependency. Nothing on the project page say anything about a requirement for this. Can you update the Maven dependency to include this?

Makes it difficult to use this library otherwise.

StackTrace: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions at org.simmetrics.builders.StringMetricBuilder$CompositeCollectionMetricBuilder.<init>(StringMetricBuilder.java:367) at org.simmetrics.builders.StringMetricBuilder$CompositeMultisetMetricBuilder.<init>(StringMetricBuilder.java:520) at org.simmetrics.builders.StringMetricBuilder.with(StringMetricBuilder.java:115) at org.simmetrics.metrics.StringMetrics.cosineSimilarity(StringMetrics.java:63)

mpkorstanje commented 7 years ago

The dependency on Guava and all other dependencies are listed in the pom file. Could you provide some steps to reproduce this issue?