| <?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.example</groupId> |
| <artifactId>examples</artifactId> |
| <version>3.19.0</version> |
| </parent> |
| |
| <artifactId>camel-example-mapstruct</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: Example :: MapStruct</name> |
| <description>How to use MapStruct for POJO data mapping</description> |
| |
| <properties> |
| <category>Transformation</category> |
| </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> |
| |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-core</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-main</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-mapstruct</artifactId> |
| </dependency> |
| <!-- we use json with jackson --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-jackson</artifactId> |
| </dependency> |
| <!-- embed as http server --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-undertow</artifactId> |
| </dependency> |
| |
| <!-- logging --> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| <version>${log4j2-version}</version> |
| <scope>runtime</scope> |
| </dependency> |
| <dependency> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-core</artifactId> |
| <version>${logback-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-classic</artifactId> |
| <version>${logback-version}</version> |
| </dependency> |
| <!-- for testing --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-main-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-maven-plugin</artifactId> |
| <version>${camel.version}</version> |
| <configuration> |
| <logClasspath>false</logClasspath> |
| <mainClass>org.apache.camel.example.MyApplication</mainClass> |
| </configuration> |
| </plugin> |
| <!-- to use mapstruct we need to use its compiler-plugin --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>${maven-compiler-plugin-version}</version> |
| <configuration> |
| <compilerArgs> |
| <arg>-parameters</arg> |
| </compilerArgs> |
| <annotationProcessorPaths> |
| <path> |
| <groupId>org.mapstruct</groupId> |
| <artifactId>mapstruct-processor</artifactId> |
| <version>${mapstruct-version}</version> |
| </path> |
| </annotationProcessorPaths> |
| </configuration> |
| </plugin> |
| <!-- generate DTO from json example files --> |
| <plugin> |
| <groupId>org.jsonschema2pojo</groupId> |
| <artifactId>jsonschema2pojo-maven-plugin</artifactId> |
| <version>1.1.2</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <sourceDirectory>${basedir}/src/main/resources/documents</sourceDirectory> |
| <targetPackage>org.apache.camel.example.model</targetPackage> |
| <sourceType>json</sourceType> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>camel.debug</id> |
| <activation> |
| <property> |
| <name>camel.debug</name> |
| <value>true</value> |
| </property> |
| </activation> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-debug</artifactId> |
| <version>${camel.version}</version> |
| </dependency> |
| </dependencies> |
| </profile> |
| </profiles> |
| </project> |