没有Internet连接的Maven [英] Maven without Internet connection

查看:110
本文介绍了没有Internet连接的Maven的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Maven项目的新手. 我正在将一个蚂蚁项目更改为Maven项目. 要在maven本地存储库中安装第3方jar,我使用install命令. 它试图下载资源jar.pom. 我的组织中没有下载访问权限,因此该构建无法安装. 根据要求,我在桌面上得到了资源罐和清洁罐(也可以得到其他必要的罐). 如何使Maven可以将这些jar用于该过程,以及如何在无需Internet访问的情况下将jar安装在本地存储库中.

I'm new to maven project. I'm changing an ant project to maven project. To install the 3rd party jar's in maven local repository, I used install command. Its trying to download the resource jar.pom. I don't have download access in my organization so the build failed for installtion. After request i got the resouce jar and clean jar in my desktop(also i can get other necessary jar). How to make maven to use these jar for the process and how to install the jar in local repository without internet acess.

我下载了jar并将其放置在本地存储库中,但是它无法指出路径并使用这些jar.

I downloaded the jar and placed in local repository but it couldn't point the path and use those jars.

请让我知道我需要执行哪些步骤来运行maven install和其他命令来构建无法访问Internet的项目.

please let me know what steps i have follow to run maven install and other commands to build the project without internet access.

我应该将通过外部方式下载的jar放在哪里?

where should i placed the jar which i have downloaded by external way.

请指导我构建和部署项目.

Please guide me for building and deploying the project.

谢谢.

http://maven.40175.n5.nabble.com/Maven-installation-and-using-in-project-without-Internet-conncetion-tp4564443p4564443.html . http://www.coderanch .com/t/544641/Jobs-Offered/careers/Maven-installation-project-without-Internet#2471141

我在这些链接中发布了相同的问题

I've posted same question in these link

推荐答案

需要互联网连接. Maven最初并不自给自足.它需要下载一堆插件以及它们的依赖项和您自己项目的依赖项.这实际上取决于项目的设置类型.一个设置将需要一组依赖关系,而另一组则是完全不同的依赖关系.您不能从Maven Central手动下载工件,然后再在本地一个一个地安装它们.简而言之,这听起来很愚蠢.

You need an internet connection. Maven isn't initially self-sufficient. It needs to download a bunch of plugins along with their dependencies and the dependencies of your own project. And this really depends on what sort of settings you have for your projects. One set up will require one set of dependencies, another - a whole different one. You can't download artifacts from the Maven Central manually and then install them locally one by one. Simply put, that sounds stupid.

我知道您来自Ant世界,在那里Ant在本地文件系统上拥有了它所需的一切.但是,Maven依赖于以下事实:它将有一个中央存储库(Maven Central或您自己的存储库-Nexus,Artifactory等),可以从中下载所需的插件和依赖项.除非允许您访问Central Maven存储库,否则迁移到Maven没有任何意义.

I understand that you're coming from the Ant world where Ant has everything it needs on the local file system. However, Maven relies on the fact that it will have a central repository (either Maven Central, or your own repository - Nexus, Artifactory, etc.) from which to download the plugins and dependencies it needs. There is no point in you migrating to Maven, unless you'll be allowed access to the Central Maven Repository.

是的,的确,您 可以 脱机运行Maven,并且 可以 让Maven为在离线模式下使用. 但是 ,您尝试做的是违反Maven原则的.

Yes, indeed, you can run Maven offline and you can have Maven produce a local repository for you to use when you are in offline mode. However, what you're trying to do is against Maven's principles.

如果您的公司不允许访问Maven Central,请坚持使用Ant.您的努力将浪费公司的时间,并最终浪费您的时间.

If your company won't allow access to Maven Central, just stick to Ant. Your effort will be a waste of your company's and, ultimately, your own time.

这篇关于没有Internet连接的Maven的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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