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

问题描述 投票:1回答:1

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

但是我没有让导入工作。使用外部库或更详细的分步文档获得VS Code Java Azure Functions项目的示例会很棒。

java jar visual-studio-code azure-functions
1个回答
1
投票

在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
© www.soinside.com 2019 - 2024. All rights reserved.