title: Eclipse error "This compilation unit is not on the build path of a Java project
body: <p>Has anyone experienced this error before: this happens when I hit CTRL + space, here is the error :</p>
  
  <p><a href="https://i.stack.imgur.com/vslIh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vslIh.png" alt="alt text"></a>
  </p>
  
  <blockquote>
    <p>This compilation unit is not on the build path of a Java project.</p>
  </blockquote>
  
  <p>This is a maven project, mvn eclipse:eclipse doesn't help I mean it compiles and runs just fine just something is wrong and I can't figure out what. I checkouted this project from SVN, it wasn't developed on my PC.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Not only it does not work but also when I try to open generated classes from target dir I get message <code>the class file is not on the classpath</code></p>