I have a Maven project with certain set of dependencies. One of the dependencies is:
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.0</version>
</dependency>
As long as I work in Eclipse, all is good. But when I package and try to use the resulting jar file(from command line if that matters), I get this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/NativeLibrary
while this class is definitely accessible in IDE.
My guess is that Maven is not packaging project's dependencies by default but in that case why don't I get more error messages complaining about more classes that were not found?