mvn install:install-file -DgroupId=包名 -DartifactId=项目名 -Dversion=版本号 -Dpackaging=jar -Dfile=jar文件所在路径 以pinyin4j-2.5.0为例: 1、将pinyin4j-2.5.0.jar文件放在“D:\JAR_LIB”目录下(该目录任意) 2、执行命令: mvn install:install-file -Dfile=D:\JAR_LIB\pinyin4j-2.5.0.jar -DgroupId=net.sourceforge.pinyin4j -DartifactId=pinyin4j -Dversion=2.5.0 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true 依赖配置详细介绍 scope:依赖范围 compile:编译范围,默认scope,在classpath中存在 provided:已提供范围,比如容器提供Servlet API runtime:运行时范围,编译不需要,接口与实现分离 test:测试范围,单元测试环境需要 system:系统范围,自定义构件,指定systemPath import:导入依赖 依赖范围与ClassPath关系 依赖范围 对于编译classpath 有效 对于测试classpath
原创力文档

文档评论(0)