Home > Eclipse, Maven3 > Why the “MAVEN2_CLASSPATH_CONTAINER will not be exported or published”

Why the “MAVEN2_CLASSPATH_CONTAINER will not be exported or published”

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.

Advertisements
  1. July 6, 2009 at 8:14 am

    Thanks for the tip. This warning was really annoying.

  2. glanet
    March 21, 2011 at 10:52 am

    Thanks for solution

  3. Tiago Augusto
    March 24, 2011 at 8:45 pm

    Very nice it help alot

  4. Ramanan
    March 26, 2011 at 12:40 am

    This didn’t worked for me. I think it is something to do with the workspace level. When i create a new one sometimes it works.

  5. May 24, 2011 at 10:05 am

    I’t doesn’t work for me. When I try to fix Eclipse shows me two posible soluntions:
    + Mark the associated raw classpath entry as a publish/export dependency
    + Exclude the associated raw classpath entry from the set of potential publish/export dependencies.

    They don’t work.

  6. godai
    September 22, 2011 at 2:29 pm

    this works for me! thnx a lot!!

  7. ruruskyi
    October 8, 2011 at 7:50 pm

    1. Check you facet, Project Properties (Alt – Enter) -> Project Facet. If your project is not configured to use facets you can convert form to be faceted. This will show you a lot of facets. If Java facet is selected only then you cannot see Deployment Assembly in you project properties but Eclipse show that annoying warning when your dependencies, projects or libraries are not added to Deployment Assembly.
    2. If eclipse cannot resolve it automatically you have two options:
    – Go to Project Properties -> Deployment Assembly. Click ‘Add’. Choose ‘Java Build Path Entries’. Choose ‘Maven Dependencies’. Click ‘Finish’.
    – you can delete any warning if it is annoying or you want to have 0 warning in your project

  8. October 4, 2012 at 3:59 pm

    Thanks a lot .. I’m free of warnings now

  9. xluer
    October 18, 2012 at 8:53 am

    thanks for the tip

  10. March 12, 2015 at 4:38 pm

    Thank you very much for that one:
    was good to et rid of that warning, plus I didin’t know the “Ctrl + 1” eclipse shortcut, which is really very useful, thx a lot!

  11. Ananias
    January 11, 2017 at 7:53 am

    Thank you

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: