我通过以下两个链接下载ojdbc jar,并将其安装在Windows系统中本地
我最终使用以下命令(使用`逃脱-):
mvn install:install-file `-Dfile=C:\Users\xxx\ojdbc6.jar `-DgroupId=com.oracle `-DartifactId=ojdbc6 `-Dversion=11.2.0.2.0 `-Dpackaging=jar `-DgeneratePom=true
但我仍然遇到以下错误:
[ERROR] No plugin found for prefix '`-Dfile=C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\peter\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
此外,虽然看起来像上面那样,但ojdbc jar安装在.m2 / repository下,当我将mvn install运行到项目时,我仍然得到:
Failure to find com.oracle:ojdbc6:jar:11.2.0.2.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
我该如何解决?
答案 0 :(得分:1)
为什么要在命令中加上反引号(`)?尝试在不使用反引号的情况下运行它。
mvn install:install-file -Dfile=C:\Users\xxx\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.2.0 -Dpackaging=jar -DgeneratePom=true