| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <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.apache.camel</groupId> |
| <artifactId>components</artifactId> |
| <version>4.7.0</version> |
| </parent> |
| |
| <artifactId>camel-jooq</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: JOOQ</name> |
| <description>The jooq component enables you to store and retrieve entities from databases using JOOQ</description> |
| |
| <properties> |
| <generated-jooq-directory>target/generated-test-sources/jooq</generated-jooq-directory> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-support</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.jooq</groupId> |
| <artifactId>jooq</artifactId> |
| <version>${jooq-version}</version> |
| </dependency> |
| <!-- jooq needs this API for its source code generator --> |
| <dependency> |
| <groupId>jakarta.annotation</groupId> |
| <artifactId>jakarta.annotation-api</artifactId> |
| <version>${jakarta-annotation-api-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>commons-dbcp</groupId> |
| <artifactId>commons-dbcp</artifactId> |
| <version>${commons-dbcp-version}</version> |
| </dependency> |
| |
| <!-- test dependencies --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-spring-xml</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-spring-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.junit.jupiter</groupId> |
| <artifactId>junit-jupiter</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-context</artifactId> |
| <version>${spring-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-jdbc</artifactId> |
| <version>${spring-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-test</artifactId> |
| <version>${spring-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.awaitility</groupId> |
| <artifactId>awaitility</artifactId> |
| <version>${awaitility-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.hsqldb</groupId> |
| <artifactId>hsqldb</artifactId> |
| <version>${hsqldb-version}</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>properties-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>initialize</phase> |
| <goals> |
| <goal>read-project-properties</goal> |
| </goals> |
| <configuration> |
| <files> |
| <file>${project.basedir}/src/test/resources/config.properties</file> |
| </files> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- The HSQL test schema is loaded here --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>sql-maven-plugin</artifactId> |
| <version>${sql-maven-plugin-version}</version> |
| <executions> |
| <execution> |
| <id>create-database-hsql</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <driver>${db.driver}</driver> |
| <url>${db.url}</url> |
| <username>${db.username}</username> |
| <password>${db.password}</password> |
| |
| <autocommit>true</autocommit> |
| <srcFiles> |
| <srcFile>src/test/resources/db-hsql.sql</srcFile> |
| </srcFiles> |
| </configuration> |
| </execution> |
| </executions> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.hsqldb</groupId> |
| <artifactId>hsqldb</artifactId> |
| <version>${hsqldb-version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| |
| <!-- The jOOQ code generator plugin --> |
| <plugin> |
| <groupId>org.jooq</groupId> |
| <artifactId>jooq-codegen-maven</artifactId> |
| <version>${jooq-version}</version> |
| |
| <executions> |
| <execution> |
| <id>generate-hsql</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <logging>WARN</logging> |
| <jdbc> |
| <driver>${db.driver}</driver> |
| <url>${db.url}</url> |
| <user>${db.username}</user> |
| <password>${db.password}</password> |
| </jdbc> |
| <generator> |
| <database> |
| <inputSchema>PUBLIC</inputSchema> |
| </database> |
| <generate> |
| <instanceFields>true</instanceFields> |
| <pojos>true</pojos> |
| <daos>true</daos> |
| <springAnnotations>true</springAnnotations> |
| </generate> |
| <target> |
| <packageName>org.apache.camel.component.jooq.db</packageName> |
| <directory>${generated-jooq-directory}</directory> |
| </target> |
| </generator> |
| </configuration> |
| </execution> |
| </executions> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.hsqldb</groupId> |
| <artifactId>hsqldb</artifactId> |
| <version>${hsqldb-version}</version> |
| </dependency> |
| </dependencies> |
| |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-test-source</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>add-test-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${generated-jooq-directory}</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <configuration combine.self="override"> |
| <!-- Prevent the maven-javadoc-plugin from generating the Javadoc of the test classes generated |
| by jooq-codegen-maven --> |
| <sourcepath>${project.build.sourceDirectory};src/generated/java</sourcepath> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |