如何为Eclipse生成类路径容器

时间:2015-05-26 11:26:32

标签: eclipse clojure classpath dependency-management eclipse-classpath

我正在处理一个我想要导入eclipse的Clojure项目。因此,我使用lein2eclipse。此插件将.classpath - 文件添加到我的项目文件夹。

将其导入eclipse后,依赖关系与例如eclipse相同。源文件夹。

enter image description here

一旦列表变长,这可能非常烦人。我有想法将#34; classpath-container"添加到"捆绑"那些依赖(与Gradle的相似):

enter image description here

.classpath - 文件中有很多条目,如:

<classpathentry
  kind="lib"
  path="/home/edy/.m2/repository/org/slf4j/slf4j-simple/1.7.10/slf4j-simple-1.7.10.jar"
/>

是否有一种简单的方法可以将所有这些条目移动到另一个文件中,&#34; import&#34;这个文件并给它起个名字?

我看到了容器条目,但到目前为止我不知道它是如何工作的:

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

1 个答案:

答案 0 :(得分:0)

听起来您正在使用Project Explorer视图而不是Package Explorer视图。

尝试更改后者,并且您将停止在顶层看到lib。

或者,如果您想继续使用Project Explorer视图,可以通过单击Project Explorer选项卡右侧的向下指向三角形来过滤掉库,然后选择选项&#34; Libraries From External&#34 ;然后单击确定。这将过滤掉jar文件。

但说实话,由于此功能,我只使用Package Explorer视图。