配置jOOQ商业版时jooq-codegen-maven插件无法解析是什么原因
报错原因
- jOOQ商业版(包含免费试用版、付费正式版)的所有构件(含依赖包、Maven代码生成插件)都没有上传到公共Maven中央仓库,你使用的
org.jooq.pro-java-8属于商业版专属的groupId,Maven默认从中央仓库拉取对应构件自然会失败。 - 商业版构件仅托管在jOOQ官方私有Maven仓库中,你没有在Maven配置(全局
settings.xml或项目pom.xml)中添加对应私有仓库的地址和认证信息,无法拉取到对应版本的构件。
修复方案
- 从你申请jOOQ商业版试用/购买后收到的官方邮件中,获取专属的私有仓库用户名、密码。
- 在Maven全局
settings.xml中添加私有仓库的认证配置:
<servers> <server> <id>jooq-repo</id> <username>你的专属用户名</username> <password>你的专属密码</password> </server> </servers>
- 在项目
pom.xml中分别添加依赖仓库和插件仓库配置(Maven的依赖仓库与插件仓库配置相互独立,需要分别配置):
<!-- 普通依赖的仓库配置 --> <repositories> <repository> <id>jooq-repo</id> <url>https://www.jooq.org/maven</url> </repository> </repositories> <!-- Maven插件的仓库配置 --> <pluginRepositories> <pluginRepository> <id>jooq-repo</id> <url>https://www.jooq.org/maven</url> </pluginRepository> </pluginRepositories>
配置完成后重新执行构建即可正常拉取对应构件。
内容的提问来源于stack exchange,提问作者Lukas Eder
相关产品推荐
相关产品推荐

