Disable jOOQ logo and tip during codegen via maven

386 views Asked by At

I'm using the maven plugin org.jooq.meta.extensions.ddl.DDLDatabase for generating jOOQ code at build time.

<plugin>
    <groupId>org.jooq</groupId>
    <artifactId>jooq-codegen-maven</artifactId>
    <version>${jooq.version}</version>
    <executions>
        <execution>
            <id>generate-jooq-sources</id>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <logging>WARN</logging>
                <generator>
                    <database>
                        <name>org.jooq.meta.extensions.ddl.DDLDatabase</name>
                        <includes>.*</includes>
                        <properties>
                            <property>
                                <key>sort</key>
                                <value>semantic</value>
                            </property>
                            <property>
                                <key>scripts</key>
                                <value>src/main/resources/db/migration/*.sql</value>
                            </property>
                            <property>
                                <key>unqualifiedSchema</key>
                                <value>none</value>
                            </property>
                            <property>
                                <key>defaultNameCase</key>
                                <value>as_is</value>
                            </property>
                        </properties>
                    </database>
                    <target>
                        <packageName>in.co.lynk.com.domain.jooq.db</packageName>
                        <directory>target/generated-sources/jooq</directory>
                    </target>
                </generator>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-meta-extensions</artifactId>
            <version>${jooq.version}</version>
        </dependency>
    </dependencies>
</plugin>

I would like to suppress the annoying jOOQ logo and tips that shows up when the code generator runs. (No, I'm not talking about suppressing the logo/tip appearing when the app starts up.) I looked at some bug report and there appears to be some settings to suppress these. But I'm not sure how/where to set these in my pom file.

1

There are 1 answers

0
Keerthi On

set-system-properties goal of properties-maven-plugin did the trick. Thank you very much. My eyes and the console are happy now!

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>properties-maven-plugin</artifactId>
    <version>${properties-maven-plugin.version}</version>
    <executions>
        <execution>
            <goals>
                <goal>set-system-properties</goal>
            </goals>
            <configuration>
                <properties>
                    <property>
                        <name>org.jooq.no-tips</name>
                        <value>true</value>
                    </property>
                    <property>
                        <name>org.jooq.no-logo</name>
                        <value>true</value>
                    </property>
                </properties>
            </configuration>
        </execution>
    </executions>
</plugin>