---
title: "m2eclipse插件使用中提示jar包找不到的解决方法"
author: "JetMah"
date: "2010-01-31T16:30:33Z"
tags: []
categories: ["编程语言"]
slug: "m2eclipse-jar"
draft: false
lastmod: "2010-01-31T16:30:33Z"
id: 584527
url: "https://jetma.iteye.com/blog/584527"
---

原文出处: [http://www.javatang.com/archives/2010/01/31/3312389.html](http://www.javatang.com/archives/2010/01/31/3312389.html)  
作者: Jet Mah from [Java堂](http://www.javatang.com/)  
声明: **可以非商业性任意转载, 转载时请务必以超链接形式标明文章原始出处、作者信息及此声明！**

在Eclipse中使用m2eclipse开发Maven项目的时候，如果是创建Module项目的时候经常会莫名的出现找不到子模块包的错误信息，但是pom.xml已经加入了改包的引用，并且使用mvn deploy命令等编译也没有任何错误，后来在Eclipse中的Marks View中发现一个项目的warning信息：

> Classpath entry org.maven.ide.eclipse.MAVEN2\_CLASSPATH\_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.

后来Google了一下，解决这个warning的步骤如下：

1\. 首先右键项目，然后选择“Properties”，在左边选择Java Build Path，然后在右边的“Order andExport”标签中选中最下面的“Maven Dependencies”，然后确定；  
![](http://www.javatang.com/wp-content/maven_warning.png "maven_warning")

2\. 选择“Marks”或“Problems”视图，然后选中那个warning信息，右键选择“Quick Fix”，然后直接选择“Finish”，这样就可以了。

 

如果还是出现错误的信息，直接在上面的视图中右键删除提示就可以了。

 

 

参考资料：  
[Why the “MAVEN2\_CLASSPATH\_CONTAINER will not be exported or published”](http://geertschuring.wordpress.com/2009/03/05/why-the-maven2_classpath_container-will-not-be-exported-or-published/)