Maven pom.xml文件中的JOOQ插件
我正在尝试构建官方JOOQ git repo here上给出的示例。行家pom.xml
文件包含JOOQ以下插件:Maven pom.xml文件中的JOOQ插件
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>${org.jooq.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<jdbc>
<driver>${db.driver}</driver>
<url>${db.url}</url>
<user>${db.username}</user>
<password>${db.password}</password>
</jdbc>
<generator>
<target>
<packageName>com.learnd.jooq.db</packageName>
<directory>src/main/java</directory>
</target>
</generator>
</configuration>
</execution>
</executions>
</plugin>
但是我不设法mvn compile
,项目,和我越来越因为${org.jooq.version}
变量以下输出<version>
标签。但是每当我看到插入这个插件时,我都会看到这样做,即使是here。
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.jooq:jooq-spring-example:jar:3.10.0-SNAPSHOT
[WARNING] 'version' contains an expression but should be a constant. @ org.jooq:jooq-spring-example:${org.jooq.version}, /home/lukec/Desktop/jOOQ-spring-example/pom.xml, line 8, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jOOQ Spring Example 3.10.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jooq:jooq-codegen-maven:jar:3.10.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.213 s
[INFO] Finished at: 2017-09-18T03:47:16+02:00
[INFO] Final Memory: 6M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.jooq:jooq-codegen-maven:3.10.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jooq:jooq-codegen-maven:jar:3.10.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
任何人都可以帮助我吗?干杯。
它很可能是因为Maven无法在您的本地.m2中找到jOOQ-codegen-maven 3.10.0-SNAPSHOT版本。我检查了你的问题的链接,我在这个链接https://github.com/jOOQ/jOOQ/blob/master/jOOQ-codegen-maven/pom.xml中看到了spring项目及其依赖项目jOOQ-codegen-maven,因此导入并构建它,以便该版本进入本地.m2。我看到jOOQ-codegen-maven项目有一个父jooq-parent,所以你可能需要构建它,以便依赖关系得到解决。
成功构建并运行jOOQ-codegen-maven和jooq-parent后,您的本地.m2应该具有这些依赖关系,请尝试再次构建jooq-spring-example,现在需要解析3.10.0-SNAPSHOT依赖关系正常。
上面应该很有可能解决问题,但如果它不起作用,你可以尝试使用*版本https://mvnrepository.com/artifact/org.jooq/jooq-codegen-maven/3.9.5,看看是否有助于构建你的春天的例子。
没有正式版本的3.10.x jooq-codegen-maven插件。
https://mvnrepository.com/artifact/org.jooq/jooq-codegen-maven
你应该尝试使用上面的链接发现他们中的任何一个。
我相信代码gen 3.10.0-SNAPSHOT尚未发布,以及3.10.0-SNAPSHOT的其余部分。
如果您需要已开发并使用comforatable已尚未发布库的功能,
git clone https://github.com/jOOQ/jOOQ
然后运行
mvn install
要建立jooq 3.10.0 -SNAPSHOT到您的本地存储库。该示例应该在您的本地机器上运行。注意它不会在其他地方工作(例如:詹金斯机器)。
如果你觉得不舒服使用此代码未发行的,使用最新发布的公布公布发行版本的例子:
https://github.com/jOOQ/jOOQ/tree/version-3.9.0-branch/jOOQ-examples/jOOQ-spring-example
由于依赖图预计3.10.0快照。