Why the “MAVEN2_CLASSPATH_CONTAINER will not be exported or published”

醉面韋陀發表於2010-08-19

On certain occasions Eclipse will present you with the following warning:

Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.

So solve this, do the following:

  1. Open the properties of the project that generates this warning
  2. Click on “Java Build Path”
  3. Click on the tab “Order and Export”
  4. Enable “Maven Dependencies”
  5. Click on “Ok”
  6. Open the “Problems” view
  7. Select the warning we are trying to solve, and press “Ctrl-1″
  8. Click on “Ok”

The problem is now solved. It may take some time before the warning disapears because the project needs to rebuild before it goes away.

相關文章