Eclipse里开发maven项目有如下警告的解决办法:

1、Description ResourcePath Location Type Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.  项目名称P/项目名称Classpath Dependency Validator Message

2、DescriptionResource PathLocationType Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.  项目名称P/项目名称Classpath Dependency Validator Message

解决办法:

打开navigator资源管理器, 修改下面的classpath文件:

<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">	<attributes>		<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>	</attributes></classpathentry>

项目上右键单击打开项目属性,如下操作:

完成操作后点击ok,然后单击选中警告,并按ctrl+1/或者右键选择,解决问题

最后要是还存在就clean一下项目,彻底解决问题。

GitHub 加速计划 / ma / maven
36
3
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:3 个月前 )
fb619297 Bumps [org.apache:apache](https://github.com/apache/maven-apache-parent) from 36 to 37. - [Release notes](https://github.com/apache/maven-apache-parent/releases) - [Commits](https://github.com/apache/maven-apache-parent/commits) --- updated-dependencies: - dependency-name: org.apache:apache dependency-version: '37' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3 天前
f3fa4751 Signed-off-by: 高春晖 <18220699480@163.com> 4 天前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐