jOOQ отключить генерацию DAO и POJO

Мой проект требует, чтобы я сам создавал DAO и POJO. Придется внести в него определенные модификации. Моя SRS говорит, что я должен использовать jOOQ. Пользуюсь впервые; Я понимаю, что jOOQ генерирует POJO и DAO самостоятельно, но я не смог найти способ отключить его.

Я не нашел в документации jOOQ ничего, что могло бы мне помочь. Может ли кто-нибудь сказать мне, как отключить jOOQ из поколения DAO и POJO, но все же предоставить записи.

Файл Maven pom.xml выглядит следующим образом:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
    <groupId>org.jooq</groupId>
    <artifactId>jooq-parent</artifactId>
    <version>3.4.1</version>
</parent>

<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<name>jOOQ</name>

<licenses>
    <license>
        <name>Apache License, Version 2.0</name>
        <url>http://www.jooq.org/inc/LICENSE.txt</url>
        <distribution>repo</distribution>
    </license>
    <!-- [pro] xxx
    xxxxxxxxx
        xxxxxxxxxx xxxxxxx xxx xxxxxxxxxxx xxxxxxxxxxxxxxxx
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxx
    xxxx [/pro] -->
</licenses>

<build>
    <plugins>
        <!-- XJC-generate JAXB artefacts. Contribution is the courtesy
             of Sergey Epik -->
        <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.8.1</version>
            <executions>
                <!-- If this causes trouble in your Eclipse m2e lifecycle configuration, try using
                     http://m2eclipse.sonatype.org/sites/m2e/, instead of the official m2e Eclipse
                     plugin
                  -->
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <extension>true</extension>
                <strict>false</strict>
                <schemaDirectory>src/main/resources/xsd</schemaDirectory>
                <bindingDirectory>src/main/resources/xjb</bindingDirectory>
                <schemaIncludes>
                    <include>jooq-runtime-3.3.0.xsd</include>
                </schemaIncludes>
                <generatePackage>org.jooq.conf</generatePackage>
                <args>
                    <arg>-Xxew</arg>
                    <arg>-Xxew:instantiate lazy</arg>
                    <arg>-Xxew:delete</arg>
                    <arg>-Xfluent-api</arg>
                    <arg>-Xdefault-value</arg>
                    <arg>-Xannotate</arg>
                    <arg>-Xinheritance</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>com.github.jaxb-xew-plugin</groupId>
                        <artifactId>jaxb-xew-plugin</artifactId>
                        <version>1.0</version>
                   </plugin>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-fluent-api</artifactId>
                        <version>3.0</version>
                    </plugin>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-default-value</artifactId>
                        <version>1.1</version>
                    </plugin>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics-annotate</artifactId>
                        <version>0.6.2</version>
                    </plugin>              
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>0.5.3</version>
                    </plugin>      
                </plugins>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>2.1.0</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <id>bundle-manifest</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>manifest</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <supportedProjectTypes>
                    <supportedProjectType>jar</supportedProjectType>
                </supportedProjectTypes>
                <instructions>
                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                    <Export-Package>*</Export-Package>
                    <Import-Package>
                        javax.persistence;resolution:=optional,
                        org.apache.log4j;resolution:=optional,
                        *
                    </Import-Package>
                    <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
                </instructions>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <archive>
                    <!-- add the generated manifest to the jar -->
                    <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <id>release</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

<dependencies>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
        <type>jar</type>
        <scope>provided</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>integration</artifactId>
        <version>1.6.1</version>
        <type>jar</type>
        <scope>provided</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>provided</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.1.0.Alpha1</version>
        <type>jar</type>
        <scope>provided</scope>
        <optional>true</optional>
    </dependency>


    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.jmock</groupId>
        <artifactId>jmock-junit4</artifactId>
        <version>2.6.0</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.6.1</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.1</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
</dependencies>

And the build is using gradle . I dont know how will that affect the changes either.


person phoenix    schedule 03.10.2014    source источник
comment
Пожалуйста, добавьте в файл конфигурации вашего вопроса   -  person Anton Dozortsev    schedule 03.10.2014
comment
@AntonDozortsev, какой conf файл к нему прикрепить? вы ссылаетесь на pom.xml для jOOQ?   -  person phoenix    schedule 03.10.2014
comment
Да, укажите код Maven pom.xml, в котором вы настраиваете maven-jooq-plugin   -  person Anton Dozortsev    schedule 03.10.2014
comment
Родительский проект jooq-parent pom.xml имеет конфигурацию maven-jooq-plugin?   -  person Anton Dozortsev    schedule 03.10.2014
comment
это тот! .. хотя я понял это. проект построен с использованием gradle. поэтому config для всех зависимостей перенаправляется на build.gradle. jooq {generator {generate {Relations = true deprecated = false records = true immutablePojos = false daos = false fluentSetters = true} target {packageName = '...'}, этот файл недоступен из каталога проекта, но я могу отредактировать его здесь! ! .. Благодарность!! @AntonDozortsev   -  person phoenix    schedule 03.10.2014
comment
Хороший!. Для получения дополнительной информации прочтите Выполнить создание с помощью Gradle и jooq -codegen configuration, где вы можете узнать, как отключить любые параметры   -  person Anton Dozortsev    schedule 03.10.2014
comment
@phoenix: Ответили ли приведенные выше комментарии на ваш вопрос? Вы знаете, что можете дать свой собственный ответ здесь, в Stack Overflow. Будущим посетителям было бы интересно увидеть, каков был настоящий ответ ...   -  person Lukas Eder    schedule 07.10.2014
comment
@LukasEder хорошо! я перепечатаю ответ здесь! Благодарность!   -  person phoenix    schedule 07.10.2014
comment
@phoenix: Отлично, спасибо!   -  person Lukas Eder    schedule 07.10.2014


Ответы (1)


проект построен с использованием gradle. поэтому config для всех зависимостей перенаправляется на build.gradle. выдержка из файла сборки, которая помогла мне изменить свойства jooq:

    jooq 
    { 
      generator 
        { generate 
           { relations = true 
             deprecated = false 
             records = true 
             immutablePojos = false 
             daos = false 
             fluentSetters = true 
       } 
      target { packageName = '...' } 

этот файл недоступен из каталога проекта, но я могу отредактировать его здесь !!

person phoenix    schedule 07.10.2014