title: Spring: not a managed type - separate test project
body: <p>Initially I built a Maven-Spring application with test cases. It worked well and all tests did pass. But now I have a separate maven project for tests and moved the test classes and the spring xml configuration files that project. 
  I have added the main spring project as dependency.</p>
  
  <p>I suppose the test project doesn't load the list of values defined in "packagesToScan" property in db-context.xml. Could anyone please help me find the error?</p>
  
  <pre><code>&lt;!-- Entity Manager --&gt;
  &lt;bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="persistenceUnitName" value="m-entrevista" /&gt;
      &lt;property name="packagesToScan"&gt;
          &lt;list&gt;
               &lt;value&gt;{com.packagename}&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The project structure looks like this. <br/>
  <b>Spring test project</b></p>
  
  <p><img src="https://i.stack.imgur.com/rSHWb.png" alt="enter image description here"></p>
  
  <p><b>Main spring project</b></p>
  
  <p><img src="https://i.stack.imgur.com/yLgoJ.png" alt="enter image description here"></p>
  
  <p>When I run a test, it throws an IllegalArgumentException.</p>
  
  <p><img src="https://i.stack.imgur.com/dCtww.png" alt="enter image description here"></p>