title: java.lang.NoClassDefFoundError: com/google/inject/Module using Guice
body: <p>I am trying to use the DI mechanism provided by <a href="https://github.com/google/guice" rel="nofollow noreferrer">Google</a>, but when I run my application, I am getting the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Module
  at challenge.App.main(App.java:19)
  Caused by: java.lang.ClassNotFoundException: com.google.inject.Module
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 1 more
  </code></pre>
  
  <p>The pom.xml file looks like:</p>
  
  <pre><code>  &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.6&lt;/source&gt;
            &lt;target&gt;1.6&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.inject&lt;/groupId&gt;
        &lt;artifactId&gt;guice&lt;/artifactId&gt;
        &lt;version&gt;4.1.0&lt;/version&gt;
        &lt;classifier&gt;no_aop&lt;/classifier&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>And the code where I am using it looks like:</p>
  
  <pre><code>    Injector injector = Guice.createInjector(new DependenciesModule());
      IndexerController indexer = injector.getInstance(IndexerController.class);
  </code></pre>
  
  <p>And I have imported com.google.inject.Guice and com.google.inject.Injector</p>
  
  <p>I have been checking for several places but I cannot see any relevant solution for this problems, I would appreciate a lot any glue.</p>