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
group and another in the form of
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.
right click on the project
deployment assembly and button "add".
select directive type "java build path entries"
select "maven dependecies" and select button finish
this way when the "war" file of the final project is created, all the "jar" files from the "maven dependencies" directory will be added.
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: https://bugs.eclipse.org/bugs/show_bug.cgi?id=537401
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.
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.
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
- Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported
- Classpath entry eclipse.fproj.jdt.libprov.osgi/jpt.jpa is marked for publish/export but is not exported on the project classpath
- Eclipse 3.7 (indigo SR2) m2e (1.1) import Maven will not add source folders of generated sources
- what causes the warning "classpath entry /yyy/yyy.jar will not be exported or published. runtime classnotfoundexception may result."
- Warnings: "The following classpath entry <address> will not be available on the server's classpath"
- Websphere application server classpath container empty while using m2e plugin in Eclipse
- Eclipse build.properties Warning: The plug-in's classpath library '.' does not have a corresponding source build entry
- Exported eclipse runnable .jar will not run
- m2e will not install on Eclipse 3.5.2
- Unbound classpath container in Eclipse
- Eclipse will not start and I haven't changed anything
- Eclipse will not open due to environment variables
- Eclipse exported Runnable JAR not showing images
- Eclipse - JAR creation failed "Class files on classpath not found or not accessible for..."
- Eclipse project-wide error: Warning: The environment variable HOME is not set. The following directory will be used to store the Git
- "Could not find the main class" error when running jar exported by Eclipse
- Maven does not add classpath to Eclipse project
- Web resources filtering with Maven war plugin does not work in Eclipse with m2e
- Annoyance - How to disable Eclipse classpath entry warnings
- Android Eclipse Classpath - want to add classpath container path but eclipse won't let me
- Using Eclipse for androidSDK, when I go to run, I get WARNING: Data partition already in use. Changes will not persist!
- Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)
- Eclipse error: Unbound classpath container
- Getting "The POM for <name> is invalid, transitive dependencies (if any) will not be available" only in Eclipse
- m2e connector buildhelper not compatible with Eclipse Juno SR1 m2e 1.2
- How can I map Maven lifecycle phases not covered by the Eclipse m2e plugin?
- Plugin execution not covered by lifecycle configuration for maven-plugin-plugin in m2e 1.5.x / Eclipse Luna
- PHP Debugger will not stop at breakpoints: Eclipse & Xdebug
- Eclipse m2e content assist in POM not working past top level elements
- Nexus 5 will not show in Eclipse
More Query from same tag
- Check if APK has been built properly
- Create Eclipse Python project for ROS
- Link external .class file into package structure in eclipse?
- Android 6.0 HTTPClient issue with LG G3 phone
- Eclipse Luna UI rendering in Linux
- Eclipse Plug-in Custom View Number of Markers
- Mercurial Eclipse- Error with initialization
- how to Deploy salesforce app from eclipse
- Setting environment variables for an entire project
- how to attach openCV docs into my project
- Custom Java Code Folding for Eclipse Helios
- APDUtool create "Applet" fails
- Error while installing google plugin for Eclipse Mars.2
- Eclipse Luna Crashing Ubuntu 15.04
- How can I run Eclipse in OS X with JDK 1.8?
- Eclipse font/language error
- Fixing Error: cannot find main class with jar
- What's the real purpose of Android's contentDescription tag?
- Subversion Eclipse Subclipse "local missing, incoming edit upon merge"
- Bluetooth client-server communication [java]
- Need some help debugging this java
- How to stop compliation if a pre-build step fails in eclipse?
- installation "objectaid" feature for eclipse
- How do I build and run an existing project in Eclipse?
- Scan statements executed before print
- Eclipse/Neon.2 ignoring a source file
- Eclipse: Getting null display
- Exporting JAR from Eclipse
- Launching Eclipse 3.6 in Ubuntu 11.04
- Android Eclipse to Android Studio ---> Project Structure