| <?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/xsd/maven-4.0.0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.camel.example</groupId> |
| <artifactId>camel-examples</artifactId> |
| <version>4.3.0-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>camel-example-jooq</artifactId> |
| <name>Camel :: Example :: JOOQ</name> |
| <description>An example for showing Camel using JOOQ component</description> |
| <packaging>jar</packaging> |
| |
| <properties> |
| <category>Database</category> |
| <title>JOOQ</title> |
| <generated-jooq-directory>target/generated-sources/jooq</generated-jooq-directory> |
| </properties> |
| |
| <dependencyManagement> |
| <dependencies> |
| <!-- Add Camel BOM --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-bom</artifactId> |
| <version>${camel.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <dependencies> |
| |
| <!-- Camel --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-core</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-spring-main</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-spring-xml</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-jooq</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-timer</artifactId> |
| </dependency> |
| |
| <!-- logging --> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>${log4j2-version}</version> |
| <scope>runtime</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-slf4j2-impl</artifactId> |
| <version>${log4j2-version}</version> |
| <scope>runtime</scope> |
| </dependency> |
| <!-- Database access --> |
| <dependency> |
| <groupId>org.hsqldb</groupId> |
| <artifactId>hsqldb</artifactId> |
| <version>${hsqldb-version}</version> |
| </dependency> |
| |
| <!-- for testing --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-spring-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| |
| <resources> |
| <resource> |
| <filtering>true</filtering> |
| <directory>src/main/resources</directory> |
| <includes> |
| <include>**/*.properties</include> |
| <include>**/*.xml</include> |
| </includes> |
| </resource> |
| </resources> |
| |
| <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/main/resources/config.properties</file> |
| </files> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- The HSQL 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-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/main/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-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.examples.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> |
| |
| <!-- Allows the routes to be run via 'mvn camel:run' --> |
| <plugin> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-maven-plugin</artifactId> |
| <version>${camel.version}</version> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.hsqldb</groupId> |
| <artifactId>hsqldb</artifactId> |
| <version>${hsqldb-version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |