1.将本地jar包安装到本地maven仓库
mvn install:install-file -DgroupId=local.mybatis.generator -DartifactId=mybatis-generator-core -Dversion=0.0.1 -Dfile=lib/mybatis-generator.jar -Dpackaging=jar -DgeneratePom=true
-DgroupId=local.mybatis.generator: group名称
-DartifactId=mybatis-generator-core: 打包后的名称
-Dversion=0.0.1: 打包后的版本
-Dpackaging=jar: 打包成什么类型
-DgeneratePom=true: 是否生成pom文件
2.pom.xml中添加jar包依赖
<dependency>
<groupId>local.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>0.0.1</version>
</dependency>