Accepted answer

i had tried both of the options but only the latter is what you need:

  • 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

if you export the dependency, refreshing the project configuration via maven -> update project configuration context menu will cause the warning to return. in this case you need to edit the .classpath file by hand:

<classpathentry kind="con" exported="true" path="org.maven.ide.eclipse.maven2_classpath_container">
        <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>

simply delete have the attribute exported="true" and confirm by refreshing the project configuration.


that's the typical problem with maven projects configured in eclipse that are changed its configuration or saved inappropriately.

normally i'll edit my .classpath file and check the references for the build path, etc.

so in your case, i think you'll need to delete your classpathentry with those org.eclipse.m2e.maven2_classpath_container reference inside.


adding to the pom.xml:


helped me in this case and also with dynamic web module and other issues.


i came across this issue too! i believe that eclipse adds the same deps twice. once in the

maven dependencies

group and another in the form of

m2_repo/ ...

you must remove the last one in the

properties -> java buil path -> libraries

for the error to dissapear!


using eclipse photon, the configuration below fixed the problem for me: window > preferences > maven > java ee integration > enable java ee configuration

note that i disabled this option before receiving the warning classpath entry org.eclipse.m2e.maven2_classpath_container will not be exported

all other options may not be checked if you do not need them.

the warning does not reappear after a maven update.


i had the same issue after updating my jdk in project and resolved it by replacing my .classpath file with previous one. i noticed the following changes in my .classpath file

        <attribute name="maven.pomderived" value="true"/>
        <attribute name="org.eclipse.jst.component.dependency" value="/web-inf/lib"/>

the second line was missing from above code

<classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container"/>

this line was missing

    <classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container/org.eclipse.jdt.internal.debug.ui.launcher.standardvmtype/javase-1.8">
        <attribute name="owner.project.facets" value="java"/>

these lines were added so i manually removed them and it all worked again.


i was in the same situation that aaron digulla.

i am learning maven and noticed that this issue manifested when

  • i added a pom packaging line, for war
  • updated the project
  • removed said line and updated again

i noticed that the file ".settings/org.eclipse.wst.common.component" was one of the leftover files after this operation. when i removed this one in particular and updated the project, the warning would go away and it wouldn't come back unless i repeated it all again.


i had the same problem in a maven project with dynamic web project, but i solved it like this.

  1. right click on the project

  2. properties

  3. deployment assembly and button "add".

    enter image description here

  4. select directive type "java build path entries"

    enter image description here

  5. select "maven dependecies" and select button finish

    enter image description here

  6. this way when the "war" file of the final project is created, all the "jar" files from the "maven dependencies" directory will be added.

    enter image description here


most answers, including the currently accepted one, only provide a temporary solution to this issue: every time i chose maven > update project… and leaving the option 'update project configuration from pom.xml' on, the warning came back.

however, after installing m2e-wtp - maven integration for wtp in eclipse 4.5 (mars) and issuing update project… again, while leaving the option selected, the warning (and resulting error) went away.


none of the answers helped in my case. every time i update the project, m2e will delete the entry from the .classpath file which disables the warnings.

i've now filed a bug report:


i have a simple way to solve this problem:

  1. delete the project from your eclipse.
  2. into the work space where the project is located.
  3. delete the items selected in the following image. just leave src and pom.xml.

    enter image description here

  4. re-import the project in your eclipse.


i wasn't able to solve the problem with the quickfix in eclipse luna. the problem disappeared after removing the project facet "dynamic web _module". in windows -> preferences -> project facets.

enter image description here

p.s. packaging as war also solved the issued but it was suppoused to be a jar and i was puzzled why some projects worked ok and some didn't.

and by the way, the warning was real. it caused a classnotfoundexceptions exceptions in the server that made it unsusable when other projects referenced this.


simply right click on the warning and do a quick fix

enter image description here

you can then review the .classpath file changes from source control

enter image description here


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:

open the properties of the project that generates this warning
click on “java build path”
click on the tab “order and export”
enable “maven dependencies”
click on “ok”
open the “problems” view
select the warning we are trying to solve, and press “ctrl-1″
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.


i had the same problem; it vanishes after including


in the pom. there was no packaging at all.


you can right click on the warning, choose quickfix and choose one of the following:

  • 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.

as you will not have eclipse publishing/exporting the project it is safe to exclude it. but either way it makes no difference

step by step screenshots:

Related Query