java - 运行 mvn install:install-file 时无法执行目标错误
问题描述
我正在尝试将 JAR 添加到我的本地存储库。这个过程在家里运行良好,但在另一台机器上它会抛出错误,我真的不知道问题是什么。我试过用谷歌搜索一些错误,但并不高兴。
$ mvn install:install-file -Dfile=C:/Users/yqb18196/Documents/ojdbc7.jar -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.0.0 -Dpackaging=jar
[INFO] Scanning for projects...
...
[INFO]
[INFO] ------------------< com.websystique.springmvc:Budget >------------------
[INFO] Building Budget 1.0.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ Budget ---
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.729 s
[INFO] Finished at: 2018-11-19T14:05:24Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project Budget: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file failed: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-install-plugin:jar:2.4 -> org.codehaus.plexus:plexus-utils:jar:3.0.5: Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:3.0.5: Could not transfer artifact org.codehaus.plexus:plexus-utils:pom:3.0.5 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
我的 pom.xml 文件中似乎没有这些提到的插件,但是我想它们可能是依赖项的依赖项(?)
然后我尝试mvn clean install
按照一些帖子的建议运行,但随后出现以下故障:
$ mvn clean install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.298 s
[INFO] Finished at: 2018-11-19T15:08:06Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Budget: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1]
我能做些什么来解决这个问题,或者找出问题所在?
解决方案
推荐阅读
- javascript - Django - 模型的主键未按预期运行
- python - 尽管 Python 中没有说明这样的条件,但控制流正在退出 while 循环
- java - 以编程方式信任 Hoverfly java 证书
- kubernetes - 我可以为相同的存储配置器类型使用 2 个不同的 StorageClass 吗?
- java - 迭代存储为无序数组的二叉搜索树 (BST) 的最快方法?
- spring-boot - Spring Cloud Stream Confluent KStream Avro 消费
- arrays - 如何将数组推送到对象的json键/值对中我codeigniter数组
- linux - 在 Synology for Linux (KDE Neon) 上设置 NFS 权限
- wix - WiX 使用部分合并模块
- r - 基于先前输入的while循环中的R Shiny conditionalPanel