做网批那个网站好,免费视频素材库app,怎么找网站做宣传,如何优化标题关键词一般我们使用的jar包,都是从maven仓库中加载的, 那如果是从本地该如何加载呢?
本文介绍maven加载本地jar的方法
在 pom.xml 的 dependencies 节点内增加以下配置即可
dependency groupIdcn.tekin/groupId artifactIdmylib/artifactI…一般我们使用的jar包,都是从maven仓库中加载的, 那如果是从本地该如何加载呢?
本文介绍maven加载本地jar的方法
在 pom.xml 的 dependencies 节点内增加以下配置即可
dependency groupIdcn.tekin/groupId artifactIdmylib/artifactId version1.0.0/version scopesystem/scope systemPath${project.basedir}/lib/mylib_v1.0.0.jar/systemPath
/dependency
groupId , artifactId 这个根据你的项目来填写
systemPath 为你的jar文件的本地路径
${project.basedir}/ 这个为当前项目的根目录路径 变量 完整pom.xml示例
?xml version1.0 encodingUTF-8?
project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcn.tekin/groupIdartifactIddemo-java/artifactIdversion1.0-SNAPSHOT/versionpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdcn.tekin/groupIdartifactIdmylib/artifactIdversion1.0.0/versionscopesystem/scopesystemPath${project.basedir}/lib/mylib_v1.0.0.jar/systemPath/dependency/dependencies
/project