| <?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</groupId> |
| <artifactId>connectors-examples</artifactId> |
| <version>2.20.1-SNAPSHOT</version> |
| <relativePath>..</relativePath> |
| </parent> |
| |
| <groupId>org.foo</groupId> |
| <artifactId>salesforce-upsert-contact-connector</artifactId> |
| <name>Camel :: Connectors :: Examples :: Salesforce Upsert Contact Connector</name> |
| <description>Salesforce Upsert Contact Connector</description> |
| |
| <dependencies> |
| |
| <!-- base component to use for this connector --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-salesforce</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-salesforce-starter</artifactId> |
| </dependency> |
| |
| <!-- camel-connector --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-connector</artifactId> |
| </dependency> |
| |
| <!-- camel and spring boot compiler plugins --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>apt</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-configuration-processor</artifactId> |
| <version>${spring-boot-version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <!-- add src/generated/java as source directory --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-dto-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>src/generated/java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- this is needed due Apache Camel source code uses the OSGi plugin to build JARs --> |
| <!-- for end users whom create connectors you would not have this problem --> |
| <!-- turn off jar plugin as we use connector plugin to jar instead --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-jar-plugin</artifactId> |
| <version>${maven-jar-plugin-version}</version> |
| <executions> |
| <execution> |
| <id>default-jar</id> |
| <phase/> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- connector plugin will build the jar --> |
| <plugin> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-connector-maven-plugin</artifactId> |
| <version>${project.version}</version> |
| <executions> |
| <execution> |
| <id>boot</id> |
| <goals> |
| <goal>prepare-spring-boot-auto-configuration</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>connector</id> |
| <goals> |
| <goal>jar</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| </plugins> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>regenerate-dto</id> |
| <activation> |
| <file> |
| <exists>salesforce-authentication.properties</exists> |
| </file> |
| </activation> |
| |
| <build> |
| <plugins> |
| |
| <!-- read Salesforce authentication properties --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>properties-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>read-salesforce-authentication-properties</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>read-project-properties</goal> |
| </goals> |
| <configuration> |
| <files> |
| <file>salesforce-authentication.properties</file> |
| </files> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- generate Contact DTOs --> |
| <plugin> |
| <groupId>org.apache.camel.maven</groupId> |
| <artifactId>camel-salesforce-maven-plugin</artifactId> |
| <version>${project.version}</version> |
| <executions> |
| <execution> |
| <id>generate-dtos</id> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <version>37.0</version> |
| <outputDirectory>src/generated/java</outputDirectory> |
| <packageName>org.foo.salesforce.upsert.contact</packageName> |
| <includes>Contact</includes> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| |
| </project> |