问题描述
我的目标是在 Maven 存储库中安装一个 jar 文件.这篇文章 解释了如何使用 MVN 进行安装.
My objective is to install a jar file in a Maven repository. This post explains how to do an install with MVN.
但是由于我在 Eclipse 中嵌入了 Maven,我不知道在哪里运行以下命令:
But but since I have Maven embedded in Eclipse, I don't know where to run the following command:
mvn install:install-file -Dfile=C:lib
estWadlGenerator.jar
-DgroupId=foo.in.shop.rest.wadl
-DartifactId=WadlGenerator
-Dversion=1.0
-Dpackaging=jar
-DlocalRepositoryPath=C:maven
epositoriesinternal
简而言之:如何确定 Eclipse 嵌入式 Maven 的 Maven 安装目录?
In short: How can I identify the Maven installation directory for Eclipse-embedded Maven?
推荐答案
从 eclipse 你可以做到:
From eclipse you can do:
运行 -> 运行配置 -> Maven 构建(双击)
Run -> Run Configurations -> Maven Build (double click)
您的目标是 install:install-file
Your goal is install:install-file
你也应该填写参数的键和值
And also you should fill parameters' keys and values
P.S. 但是我觉得在系统中安装外部maven会更好
P. S. But I think that it is more better to have external maven installation in system
这篇关于如何在嵌入 Eclipse 的 Maven 存储库中安装 jars?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!