Jooq Maven Code-Gen:找不到符号

时间:2023-01-25 20:54:25

on my current project i am using the jooq-framework code-generator plugin for maven. In my IDE (eclipse) everything is working fine but when trying to compile the project on the CI server or manually on cmd it fails with the message: "cannot find symbol".

在我当前的项目中,我正在使用maven的jooq-framework代码生成器插件。在我的IDE(eclipse)中,一切正常,但是当尝试在CI服务器上编译项目或在cmd上手动编译时,它失败并显示消息:“找不到符号”。

For me it seems the code-generator plugin is not adding the generated code to the "classpath/source-path" of the maven build; therefor the compile will fail.

对我来说,似乎代码生成器插件没有将生成的代码添加到maven构建的“classpath / source-path”;因此编译将失败。

I even tried adding the maven-buildhelper-plugin to the execution without success.

我甚至尝试将maven-buildhelper-plugin添加到执行中但没有成功。

Does anybody have an idea?

有人有想法吗?

Here the part of my pom.xml (build->plugins)

这是我的pom.xml(build-> plugins)的一部分

<plugin>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-codegen-maven</artifactId>
            <version>3.5.1</version>
            <executions>

                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <jdbc>
                            <driver>oracle.jdbc.OracleDriver</driver>
                            <url>jdbc:dbase.url</url>
                            <user>user</user>
                            <password>pass</password>
                        </jdbc>
                        <generator>
                            <name>my.custom.Generator.for.logging</name>
                            <database>
                                <name>org.jooq.util.oracle.OracleDatabaseExt</name>
                                <includes>.*</includes>
                                <excludes />
                                <inputSchema>my_schema</inputSchema>
                                <outputSchema />

                                <!--dateAsTimestamp>true</dateAsTimestamp -->
                            </database>
                            <generate>
                                <relations>true</relations>
                                <deprecated>false</deprecated>
                                <instanceFields>true</instanceFields>
                                <generatedAnnotation>false</generatedAnnotation>
                                <records>true</records>
                                <pojos>false</pojos>
                                <immutablePojos>false</immutablePojos>
                                <interfaces>false</interfaces>
                                <daos>false</daos>
                                <jpaAnnotations>false</jpaAnnotations>
                                <validationAnnotations>false</validationAnnotations>
                                <globalObjectReferences>false</globalObjectReferences>

                            </generate>
                            <target>
                                <packageName>my.package.name</packageName>
                                <directory>target/generated-sources/jooq</directory>
                            </target>
                        </generator>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.jooq</groupId>
                    <artifactId>jooq</artifactId>
                    <version>3.5.1</version>
                </dependency>
                <dependency>
                    <groupId>org.jooq</groupId>
                    <artifactId>jooq-meta</artifactId>
                    <version>3.5.1</version>
                </dependency>
                <dependency>
                    <groupId>org.jooq</groupId>
                    <artifactId>jooq-codegen</artifactId>
                    <version>3.5.1</version>
                </dependency>
                <dependency>
                    <groupId>ojdbc</groupId>
                    <artifactId>ojdbc</artifactId>
                    <version>14</version>
                </dependency>
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                    <version>2.2.6</version>
                </dependency>
            </dependencies>
        </plugin>

1 个解决方案

#1


The compilation issues was caused by a modification on some commons library. Infact JOOQ helped me to find a bug...

编译问题是由某些公共图书馆的修改引起的。事实上JOOQ帮我找到了一个bug ...

Take the example above as example....

以上面的例子为例....

#1


The compilation issues was caused by a modification on some commons library. Infact JOOQ helped me to find a bug...

编译问题是由某些公共图书馆的修改引起的。事实上JOOQ帮我找到了一个bug ...

Take the example above as example....

以上面的例子为例....