| <?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>3.14.3-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>camel-salesforce</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: Salesforce</name> |
| <description>Camel Salesforce support</description> |
| |
| <properties> |
| <camel.osgi.import.additional> |
| javax.xml.bind*;version="[2.2,3.0)", |
| org.eclipse.jetty.*;version="[9.4,10)", |
| org.mortbay.cometd.*;version="[6.1,7)" |
| </camel.osgi.import.additional> |
| <camel.osgi.private.pkg>org.apache.camel.component.salesforce.internal.*</camel.osgi.private.pkg> |
| <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>${jetty9-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util</artifactId> |
| <version>${jetty9-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util-ajax</artifactId> |
| <version>${jetty9-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-io</artifactId> |
| <version>${jetty9-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> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <!-- json schema --> |
| <dependency> |
| <groupId>com.fasterxml.jackson.jaxrs</groupId> |
| <artifactId>jackson-jaxrs-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</artifactId> |
| <exclusions> |
| <exclusion> |
| <groupId>javax.validation</groupId> |
| <artifactId>validation-api</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>commons-io</groupId> |
| <artifactId>commons-io</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.cometd.java</groupId> |
| <artifactId>cometd-java-client</artifactId> |
| <version>${cometd-java-client-version}</version> |
| <exclusions> |
| <exclusion> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>*</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-lang3</artifactId> |
| <version>${commons-lang3-version}</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.logging.log4j</groupId> |
| <artifactId>log4j-slf4j-impl</artifactId> |
| <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>${jetty9-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-servlet</artifactId> |
| <version>${jetty9-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-proxy</artifactId> |
| <version>${jetty9-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-junit-jupiter</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.assertj</groupId> |
| <artifactId>assertj-core</artifactId> |
| <version>${assertj-version}</version> |
| <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>${okclient-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.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude>**/*IntegrationTest.java</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| <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> |
| </plugins> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>integration</id> |
| <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.12</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>**/*IntegrationTest.java</include> |
| </includes> |
| <excludedGroups>standalone</excludedGroups> |
| </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>**/*IntegrationTest.java</include> |
| </includes> |
| <groups>standalone</groups> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |