| <?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>3.4.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>javax.annotation</groupId> |
| <artifactId>javax.annotation-api</artifactId> |
| <version>${javax-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</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-slf4j-impl</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-context</artifactId> |
| <version>${spring-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-jdbc</artifactId> |
| <version>${spring-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework</groupId> |
| <artifactId>spring-test</artifactId> |
| <version>${spring-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> |
| <version>${properties-maven-plugin-version}</version> |
| <executions> |
| <execution> |
| <phase>initialize</phase> |
| <goals> |
| <goal>read-project-properties</goal> |
| </goals> |
| <configuration> |
| <files> |
| <file>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> |
| <version>${build-helper-maven-plugin-version}</version> |
| <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> |
| </plugins> |
| </build> |
| </project> |