简体   繁体   English

如何在Eclipse中将Maven构建的库包含到您的项目中?

[英]How to include maven built library into your project in eclipse?

I am a novice and don't have much idea. 我是新手,没有太多想法。 So I have a library that is built with Maven and I want to include this library in my java project in Eclipse, how do I do this? 因此,我有一个使用Maven构建的 ,并且想将此库包含在Eclipse的Java项目中,该怎么做? I am using Eclipse juno on MacOSx. 我在MacOSx上使用Eclipse juno。 I want to run one of the modules in this library, so the source code is provided for this module but how do i run this? 我想运行该库中的模块之一,因此为此模块提供了源代码,但是我该如何运行呢?

If you are not using maven, you have to download the jar and the sources of that jar (In your case, you can download the zip file provided on the website you mention : http://code.google.com/p/cleartk/downloads/list ) and put it somewhere on your computer. 如果您不使用maven,则必须下载该jar以及该jar的来源(对于您而言,可以下载您提到的网站上提供的zip文件: http : //code.google.com/p/cleartk / downloads / list ),然后将其放在您的计算机上。

Then you have to set the build path of your project in Eclipse : 然后,您必须在Eclipse中设置项目的构建路径:

Right-click on your project -> Properties -> Java Build Path Then you can click on the Libraries tab and Add External Jars so you can point to the jar you downloaded. 右键单击项目-> Properties -> Java Build Path然后单击Libraries选项卡,然后Add External Jars以便指向您下载的jar。 In this tab, you can attach the sources of this jar to have access to the source code in Eclipse (and eventually set breakpoint). 在此选项卡中,您可以附加此jar的源代码以访问Eclipse中的源代码(并最终设置断点)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM