简体   繁体   English

编译pom文件以使用Eclipse下载依赖项

[英]Build the pom file to download the dependencies with eclipse

I download a j2ee project with a pom file which mention the dependency jar files needed. 我下载了一个带有pom文件的j2ee项目,其中提到了所需的依赖项jar文件。 I want to know to run this pom file and download the jars need for my project? 我想知道运行此pom文件并下载我的项目所需的jars吗? I right click and ran the pom file as maven build. 我右键单击并运行pom文件作为maven构建。 Then it prompt me the Edit and Configuration UI which has the goals and profiles. 然后,它提示我具有目标和配置文件的“编辑和配置” UI。

What are the values that i need to specify here? 我需要在这里指定什么值?

Also is there any special configuration i need to add to eclipse (helios)? 还有需要添加到Eclipse(helios)的任何特殊配置吗?

How does the necessary jar files downloaded? 如何下载必要的jar文件? Is it from the xsi:schemaLocation location specify in the pom file? 是从pom文件中指定的xsi:schemaLocation位置开始的吗?

You can use these maven goals for that. 您可以为此使用这些Maven目标。

eclipse:eclipse - Download the dependency jars and set them to the classpath(you need to configure your settings.xml in the maven with the maven archiva repo path for maven to download jars from there) eclipse: eclipse-下载依赖项jar并将其设置为类路径(您需要使用maven archiva repo路径在maven中配置settings.xml,以便maven从那里下载jars)

install - build the project and install it in the local repo. install-构建项目并将其安装在本地仓库中。

Have a look at this answer for the whole list of goals. 看一下这个答案 ,了解整个目标清单。

如果安装了Maven至Eclipse集成插件(m2e),则Eclipse会自动将项目依赖项添加到项目的构建路径中,并在此过程中下载它们。

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

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