| <?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>camel-salesforce-parent</artifactId> |
| <version>4.9.0</version> |
| </parent> |
| |
| <artifactId>camel-salesforce</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: Salesforce</name> |
| <description>Camel Salesforce support</description> |
| |
| <properties> |
| <salesforce.component.root>..</salesforce.component.root> |
| </properties> |
| |
| <dependencies> |
| |
| <!-- requires camel-core --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-core-engine</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-client</artifactId> |
| <version>${jetty-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util</artifactId> |
| <version>${jetty-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util-ajax</artifactId> |
| <version>${jetty-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-io</artifactId> |
| <version>${jetty-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-annotations</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-core</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-databind</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.datatype</groupId> |
| <artifactId>jackson-datatype-jsr310</artifactId> |
| </dependency> |
| <!-- json schema --> |
| <dependency> |
| <groupId>com.fasterxml.jackson.jakarta.rs</groupId> |
| <artifactId>jackson-jakarta-rs-json-provider</artifactId> |
| <exclusions> |
| <exclusion> |
| <groupId>jakarta.xml.bind</groupId> |
| <artifactId>jakarta.xml.bind-api</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.module</groupId> |
| <artifactId>jackson-module-jsonSchema-jakarta</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>commons-io</groupId> |
| <artifactId>commons-io</artifactId> |
| <version>${commons-io-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.cometd.java</groupId> |
| <artifactId>cometd-java-client-http-jetty</artifactId> |
| <version>${cometd-java-client-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-lang3</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>jakarta.annotation</groupId> |
| <artifactId>jakarta.annotation-api</artifactId> |
| <version>${jakarta-annotation-api-version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.glassfish.jaxb</groupId> |
| <artifactId>jaxb-runtime</artifactId> |
| </dependency> |
| <!-- Pub/Sub API dependencies --> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-netty</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-protobuf</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-stub</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.avro</groupId> |
| <artifactId>avro</artifactId> |
| <version>${avro-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>tech.allegro.schema.json2avro</groupId> |
| <artifactId>converter</artifactId> |
| <version>0.2.15</version> |
| </dependency> |
| |
| <!-- logging --> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| </dependency> |
| |
| <!-- testing --> |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-csv</artifactId> |
| <version>${commons-csv-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.junit.jupiter</groupId> |
| <artifactId>junit-jupiter</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-csv</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-server</artifactId> |
| <version>${jetty-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty.ee10</groupId> |
| <artifactId>jetty-ee10-servlet</artifactId> |
| <version>${jetty-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-proxy</artifactId> |
| <version>${jetty-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-junit-jupiter</artifactId> |
| <version>${mockito-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.assertj</groupId> |
| <artifactId>assertj-core</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.googlecode.junit-toolbox</groupId> |
| <artifactId>junit-toolbox</artifactId> |
| <version>${junit-toolbox-version}</version> |
| <scope>test</scope> |
| <exclusions> |
| <exclusion> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>com.squareup.okhttp3</groupId> |
| <artifactId>mockwebserver</artifactId> |
| <version>${squareup-okhttp-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <!-- forcing okhttp v3.x related to https://issues.apache.org/jira/browse/CAMEL-16336 --> |
| <dependency> |
| <groupId>com.squareup.okhttp3</groupId> |
| <artifactId>okhttp</artifactId> |
| <version>${squareup-okhttp-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.apache.camel</groupId> |
| <artifactId>camel-core-catalog</artifactId> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.gmavenplus</groupId> |
| <artifactId>gmavenplus-plugin</artifactId> |
| <version>${gmavenplus-plugin-version}</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>addTestSources</goal> |
| <goal>compileTests</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>io.github.ascopes</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>${protobuf-maven-plugin-version}</version> |
| <configuration> |
| <protocVersion>${protobuf-version}</protocVersion> |
| <sourceDirectories> |
| <sourceDirectory>src/main/proto</sourceDirectory> |
| </sourceDirectories> |
| <binaryMavenPlugins> |
| <binaryMavenPlugin> |
| <groupId>io.grpc</groupId> |
| <artifactId>protoc-gen-grpc-java</artifactId> |
| <version>${grpc-version}</version> |
| </binaryMavenPlugin> |
| </binaryMavenPlugins> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>target/generated-sources/protobuf</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <!-- Remove it once https://github.com/grpc/grpc-java/issues/9179 is resolved --> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>process-sources</phase> |
| <configuration> |
| <target> |
| <replace token="@javax.annotation.Generated" value="@jakarta.annotation.Generated" dir="target/generated-sources/protobuf"> |
| <include name="**/*.java" /> |
| </replace> |
| </target> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>integration</id> |
| <properties> |
| <skipITs>false</skipITs> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>salesforce-integration-test-prerequisites</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireFilesExist> |
| <files> |
| <file> |
| ${salesforce.component.root}/it/resources/migration-tool/ant-salesforce.jar |
| </file> |
| </files> |
| <message><![CDATA[Salesforce Migration Tool required |
| |
| You need to download the Salesforce Migration Tool (ZIP file) and |
| extract the `ant-salesforce.jar` out of it to: |
| |
| ${salesforce.component.root}/it/resources/migration-tool/ant-salesforce.jar |
| |
| It's needed by the integration tests to setup the Salesforce instance |
| with custom sObjects/fields that are required by the tests. |
| |
| Have a look at: |
| |
| ${salesforce.component.root}/it/resources/salesforce |
| |
| To see what will be done. |
| |
| For information and download of the Salesforce Migration Tool consult: |
| |
| https://developer.salesforce.com/page/Force.com_Migration_Tool]]></message> |
| </requireFilesExist> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>${maven-resources-plugin-version}</version> |
| <executions> |
| <execution> |
| <id>copy-test-salesforce-login-properties</id> |
| <phase>generate-test-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/test-classes/</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${salesforce.component.root}</directory> |
| <include>test-salesforce-login.properties</include> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <id>set-connected-app-client-id</id> |
| <phase>generate-test-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory> |
| ${salesforce.component.root}/it/resources/salesforce/connectedApps |
| </outputDirectory> |
| <overwrite>true</overwrite> |
| <filters> |
| <filter>${salesforce.component.root}/test-salesforce-login.properties</filter> |
| </filters> |
| <resources> |
| <resource> |
| <directory>${salesforce.component.root}/it/resources/</directory> |
| <include>CamelSalesforceIntegrationTests.connectedApp</include> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>setup-salesforce-instance</id> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <phase>pre-integration-test</phase> |
| <configuration> |
| <target xmlns:if="ant:if" xmlns:unless="ant:unless"> |
| <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce"> |
| <classpath> |
| <pathelement location="${salesforce.component.root}/it/resources/migration-tool/ant-salesforce.jar" /> |
| </classpath> |
| </taskdef> |
| |
| <property prefix="prop" file="${project.build.directory}/test-classes/test-salesforce-login.properties" /> |
| <property environment="env" /> |
| |
| <property name="username" value="${prop.salesforce.username}" if:set="prop.salesforce.username" /> |
| <property name="username" value="${env.SALESFORCE_USERNAME}" if:set="env.SALESFORCE_USERNAME" /> |
| |
| <property name="password" value="${prop.salesforce.password}" if:set="prop.salesforce.password" /> |
| <property name="password" value="${env.SALESFORCE_PASSWORD}" if:set="env.SALESFORCE_PASSWORD" /> |
| |
| <property name="serverurl" value="${prop.salesforce.login.url}" if:set="prop.salesforce.login.url" /> |
| <property name="serverurl" value="${env.SALESFORCE_LOGIN_URL}" if:set="env.SALESFORCE_LOGIN_URL" /> |
| |
| <fail unless:set="username" message="To run the migrations you need to specify either `salesforce.username` in: ${project.build.directory}/generated-resources/test-salesforce-login.properties or set SALESFORCE_USERNAME environment variable" /> |
| |
| <fail unless:set="password" message="To run the migrations you need to specify either `salesforce.password` in: ${project.build.directory}/generated-resources/test-salesforce-login.properties or set SALESFORCE_PASSWORD environment variable" /> |
| |
| <fail unless:set="serverurl" message="To run the migrations you need to specify either `salesforce.login.url` in: ${project.build.directory}/generated-resources/test-salesforce-login.properties or set SALESFORCE_LOGIN_URL environment variable" /> |
| |
| <sf:deploy xmlns:sf="antlib:com.salesforce" username="${username}" password="${password}" deployRoot="${salesforce.component.root}/it/resources/salesforce" rollbackOnError="true" serverurl="${serverurl}" /> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.ant</groupId> |
| <artifactId>ant</artifactId> |
| <version>1.10.15</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <plugin> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>integration-test</phase> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| <configuration> |
| <childDelegation>false</childDelegation> |
| <useFile>true</useFile> |
| <forkCount>3</forkCount> |
| <runOrder>random</runOrder> |
| <reuseForks>true</reuseForks> |
| <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds> |
| <includes> |
| <include>**/*ManualIT.java</include> |
| </includes> |
| <excludedGroups>standalone</excludedGroups> |
| <forkedProcessExitTimeoutInSeconds>240</forkedProcessExitTimeoutInSeconds> |
| </configuration> |
| </execution> |
| <execution> |
| <id>standalone-integration-tests</id> |
| <phase>integration-test</phase> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| <configuration> |
| <childDelegation>false</childDelegation> |
| <useFile>true</useFile> |
| <includes> |
| <include>**/*ManualIT.java</include> |
| </includes> |
| <groups>standalone</groups> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |