[英]The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid
I am using STS version 3.9.我正在使用 STS 3.9 版。 I am trying to add external dependency for ojdbc7.jar to local maven repository.我正在尝试将 ojdbc7.jar 的外部依赖项添加到本地 maven 存储库。 I have downloaded ojbdc7.jar
from oracle site.我已经从 oracle 站点下载了ojbdc7.jar
。 Through configuration window I have set goal as - install:install-file
通过配置 window 我将目标设置为 - install:install-file
Parameters as -参数为 -
-Dfile={Path/to/your/ojdbc7.jar} -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar
While running this, I am getting below error.运行此程序时,我遇到了错误。
Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project .The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid
Thanks in advance.提前致谢。
You should update the value of your param:您应该更新参数的值:
-Dfile={Path/to/your/ojdbc7.jar}
to the exact location of the jar you've downloaded -到您下载的 jar 的确切位置 -
-Dfile={/Users/user/Downloads/ojdbc7.jar}
Note : It must be a valid path in your system which you can get by looking at the properties/info of the downloaded jar.注意:它必须是您系统中的有效路径,您可以通过查看下载的 jar 的属性/信息来获取该路径。
您缺少文件路径和双引号:
mvinstall:install-file -Dfile="path/file.jar" -DgroupId="com.oracle" -DartifactId=ojdbc7 -Dversion="12.1.0" -Dpackaging=jar
Wrap all the parameters in the single quotes.将所有参数括在单引号中。 shell is expanding it in unacceptable ways to maven. shell 正在以不可接受的方式将其扩展到 maven。
mvn install:install-file -Dfile='/path/library.jar' -DgroupId='groupid' \
-DartifactId='' -Dversion='' -Dpackaging='jar'
In my case I forgot to add the backslash like so:就我而言,我忘记像这样添加反斜杠:
mvn install:install-file \
-Dfile='some-file.jar' \
-DgroupId='com.something' \
-DartifactId='artifactId' \
-Dversion='version' \
-Dpackaging='packaging' \
-DgeneratePom=true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.