2

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".

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.

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

Does anybody have an idea?

Here the part of my 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>
NeoP5
  • 611
  • 7
  • 19

1 Answers1

0

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

Take the example above as example....

NeoP5
  • 611
  • 7
  • 19
  • Cool story. Any information about what "some commons library" was and the bug you found ? This doesn't seem to answer anything about the question. – Ryan Jun 02 '21 at 17:38
  • It was an internal library we build our own and is commonly shared with several projects. – NeoP5 Aug 12 '21 at 07:53