gpt4 book ai didi

java - 如何mvn部署-部署:file from java app

转载 作者:行者123 更新时间:2023-12-01 04:58:50 25 4
gpt4 key购买 nike

我尝试使用 java 程序中的 maven-embedder 3.0.4 将文件部署到本地存储库,但出现以下错误:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file
(default-cli) on project test: Failed to deploy artifacts/metadata: No connector available
to access repository local (file://~/.m2/repository) of type default
using the available factories

我正在尝试使用 MavenCli.doMain(String[], String, PrintStream, PrintStream) 函数来实现此目的,但似乎我无法使其工作。

任何帮助将不胜感激。另外,如果还有其他方法从 java 程序部署文件,请告诉我。

最佳答案

我建议使用Aether而不是 Maven 嵌入器。来源github .

关于java - 如何mvn部署-部署:file from java app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13647427/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com