title: Problem during creating jar with jnativehook library Maven JAR
body: <p>Currently, I make a simple clicker in java. I liked the library <code>jnativehook</code>, because it's working in the background and I added it as a dependency</p>
  <pre><code>&lt;dependency&gt;
      &lt;artifactId&gt;jnativehook&lt;/artifactId&gt;
      &lt;groupId&gt;com.1stleg&lt;/groupId&gt;
      &lt;version&gt;LATEST&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Compilation ended successfully and IDE had no warning
  but after running JAR with terminal</p>
  <p><code>java -jar clicker.jar</code></p>
  <p>I had the following error</p>
  <pre><code>C:\Users\szymo\IdeaProjects\java gui\target&gt;java -jar clicker-javagui-1.0-SNAPSHOT.jar`
  
  Error: Unable to initialize main class Main
  
  Caused by: java.lang.NoClassDefFoundError: org/jnativehook/NativeHookException
  </code></pre>
  <p>I suspect that it's a problem with compiling the library to jar. I tried also adding <code>jnativehook.jar</code> to classpath but it didn't help.</p>
  <p>I use JDK 11, and Maven 3.6.3.</p>