使用IDEA和maven2,如何添加非maven .jar? [英] Using IDEA with maven2, how to add a non-maven .jar?

查看:219
本文介绍了使用IDEA和maven2,如何添加非maven .jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的IDEA Web应用程序项目中包含一个使用maven2(pom.xml)的.jar。

I have a .jar that I want included in my IDEA web application project that is using maven2 (pom.xml).

如何添加.jar到我的不使用maven的项目?

How can I add a .jar to my project that isn't using maven?

推荐答案

你基本上有三种选择:

  • Install the jar in your local repository using install:install-file (see Guide to installing 3rd party JARs). This is pretty straightforward and easy but this will make your POM non portable. This might be an option if you are alone and doesn't plan to distribute your pom.xml.

使用<$ c在公司存储库中部署jar $ C>部署:部署文件。这当然是企业环境中的理想和首选方案。

Deploy the jar in a corporate repository using deploy:deploy-file. This is of course the ideal and preferred scenario in a corporate environment.

如果您没有使用公司存储库但仍在团队中工作,设置基于文件的存储库和通过源存储库共享它。

If you're not using a corporate repository but are still working in team, setup a file based repository and share it through your source repository.

这篇关于使用IDEA和maven2,如何添加非maven .jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆