title: how to use class file from another war
body: <p>We have two different web application and we want to extend few controllers of one war into another war.</p>
  
  <p>We are using maven to build the project.</p>
  
  <p>to include war we have given its dependency as</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.abc.exchange&lt;/groupId&gt;
              &lt;artifactId&gt;employer&lt;/artifactId&gt;
              &lt;version&gt;2.3.M2-SNAPSHOT&lt;/version&gt;
              &lt;type&gt;war&lt;/type&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>It is unable to build giving class not found exception.</p>
  
  <p>Can any body help me out how to achieve this?</p>
  
  <p>I am getting error maven build failed :</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project agent-war: Compilation failure: Compilation failure:
  [ERROR] \projects\trunk_new\agent\src\main\java\com\platform\agent\web\AgentEmployeeController.java:[22,41] cannot find symbol
  [ERROR] symbol  : class EmployeeController
  [ERROR] location: package com..platform.employer.web
  </code></pre>