프로젝트

[SpringBoot jooq] profile별 generate 설정

nineDeveloper 2020. 6. 20.
728x90

profile 별 generate 설정 파일 생성

profile pom.xml에 추가

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-codegen-maven</artifactId>
            <version>${jooq.version}</version>
            <!-- The plugin should hook into the generate goal -->
            <executions>
                <execution>
                    <id>fdk_parkingcloud</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <configurationFile>src/main/resources/jooq/config/tis-${env}.xml</configurationFile>
                    </configuration>
                </execution>
            </executions>

        </plugin>
    </plugins>
</build>
<profiles>
    <!-- dev profile -->
    <profile>
        <id>dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties> <!-- resource 필터 사용시 개발자 PC에 적용되는 필터 properties 의 폴더 위치 -->
<!--                <deployTarget>local</deployTarget>-->
            <env>dev</env>
        </properties>
    </profile>
    <!-- stage profile -->
    <profile>
        <id>stage</id>
        <properties> <!-- resource 필터 사용시 개발서버에 적용되는 필터 properties 의 폴더 위치 -->
<!--                <deployTarget></deployTarget>-->
            <env>stage</env>
        </properties>
    </profile>
</profiles>
728x90

댓글

💲 추천 글