使用eclipse手动将JAR文件安装到maven本地存储库时要使用的POM文件是什么?
当将项目打包为jar文件时,maven会将项目的pom文件包含在jar中。
我正在使用 Eclipse Indigo 并安装了 m2e。 要安装 JAR 工件,我转到 Eclipse->;导入-> Maven->将软件包安装到本地存储库... 然后我单击浏览按钮并选择我想要安装的 JAR 我还提供:groupid,artifactid,version,classifier等
关于POM文件,eclipse为我提供了三个选项:
单击浏览按钮并选择一个POM文件(我可以通过从JAR中提取它来获取它) ),或者
选中请求创建 POM 文件的复选框,或者
将“POM 选择”留空并取消选中“创建 POM”。
考虑到我的 JAR 文件包含一个 POM,其中包含 JAR 的依赖项,将 JAR 安装到本地存储库的正确方法是什么?
When packaging a project as a jar file, maven includes the pom file of the project inside the jar.
I am using Eclipse Indigo and have installed the m2e.
To install a JAR artifact I go to Eclipse-> Import -> Maven -> Install package to local repo...
Then I click on the browse button and select the JAR I want to install
I also provide: groupid, artifactid, version, classifier, etc
Regarding the POM file, eclipse provides me with three options:
To click on a browse button and select a POM file (which I can obtain by extracting it from the JAR), or
To check a checkbox requesting the creation of a POM file, or
To leave blank the "selection of a POM" and to uncheck the "create POM".
Considering my JAR file includes a POM inside which contains the JAR's dependencies, what is the correct way of installing the JAR into the local repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
continue
You should extract the pom file and add it to the option, it is strange to have to pom file inside the jar this is not the normal case.
Normally you would deploy the file to your local repo and remote repo using the install plugin in the project which compiles that jar from source. The install plugin will copy/upload the pom file in addition to the jar but not within it.