gpt4 book ai didi

VS Code 上的 Java Azure Function,如何引用和使用外部 jar 库

转载 作者:行者123 更新时间:2023-11-30 05:45:10 25 4
gpt4 key购买 nike

我用 Java 创建了第一个 Azure Functions,因为我需要使用特定的外部 jar 文件。我正在 VS Code 中工作,我在文档中找到了有关使用外部库的简短引用。 Third-party libraries .

但是我无法导入工作。如果有一个使用外部库的 VS Code Java Azure Functions 项目示例或更详细的分步文档,那就太好了。

最佳答案

在maven项目中,所有依赖项都由pom.xml处理。我们可以使用 Maven 存储库来下载依赖项,也可以从本地目录添加它。以下可以将jar安装到本地maven存储库。

引用文献: http://maven.apache.org/general.html#importing-jars https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true

Where: <path-to-file> the path to the file to load
<group-id> the group that the file should be registered under
<artifact-id> the artifact name for the file
<version> the version of the file
<packaging> the packaging of the file e.g. jar

关于VS Code 上的 Java Azure Function,如何引用和使用外部 jar 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54986152/

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