| <?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-olingo2-parent</artifactId> |
| <version>4.7.0</version> |
| </parent> |
| |
| <artifactId>camel-olingo2</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: Olingo2 :: Component</name> |
| <description>Camel Olingo2 component</description> |
| |
| <properties> |
| <schemeName>olingo2</schemeName> |
| <componentName>Olingo2</componentName> |
| <componentPackage>org.apache.camel.component.olingo2</componentPackage> |
| <outPackage>org.apache.camel.component.olingo2.internal</outPackage> |
| |
| <maven.exe.file.extension /> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-support</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-olingo2-api</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-lang3</artifactId> |
| </dependency> |
| |
| <!-- testing --> |
| <dependency> |
| <groupId>org.apache.olingo</groupId> |
| <artifactId>olingo-odata2-api-annotation</artifactId> |
| <version>${olingo2-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.olingo</groupId> |
| <artifactId>olingo-odata2-annotation-processor-api</artifactId> |
| <version>${olingo2-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.olingo</groupId> |
| <artifactId>olingo-odata2-annotation-processor-core</artifactId> |
| <version>${olingo2-version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.cxf</groupId> |
| <artifactId>cxf-rt-frontend-jaxrs</artifactId> |
| <version>${cxf-version}</version> |
| <scope>test</scope> |
| </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> |
| |
| <!-- test infra --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-infra-common</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-infra-jetty</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.groovy</groupId> |
| <artifactId>groovy-ant</artifactId> |
| <version>${groovy-version}</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <defaultGoal>install</defaultGoal> |
| |
| <plugins> |
| |
| <!-- generate Component source and test source --> |
| <plugin> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-api-component-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>generate-test-component-classes</id> |
| <goals> |
| <goal>fromApis</goal> |
| </goals> |
| <configuration> |
| <apis> |
| <api> |
| <apiName /> |
| <proxyClass>org.apache.camel.component.olingo2.api.Olingo2App</proxyClass> |
| <fromJavasource> |
| <includeMethods>read|uread|delete|create|update|patch|merge|batch</includeMethods> |
| </fromJavasource> |
| <extraOptions> |
| <extraOption> |
| <name>keyPredicate</name> |
| <type>java.lang.String</type> |
| <description>OData Key predicate</description> |
| </extraOption> |
| </extraOptions> |
| <nullableOptions> |
| <nullableOption>queryParams</nullableOption> |
| <nullableOption>endpointHttpHeaders</nullableOption> |
| <nullableOption>edm</nullableOption> |
| <nullableOption>responseHandler</nullableOption> |
| </nullableOptions> |
| </api> |
| </apis> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <!-- Component API to read API --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-olingo2-api</artifactId> |
| <version>${project.version}</version> |
| <classifier>sources</classifier> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <!-- add the olingo odata2 sample service source. See profile get-olingo2-sample below --> |
| <execution> |
| <id>add-test-source</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>add-test-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${basedir}/target/olingo2-my-car-service/src/main/java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-api-component-maven-plugin</artifactId> |
| <version>${project.version}</version> |
| <configuration> |
| <scheme>${schemeName}</scheme> |
| <componentName>${componentName}</componentName> |
| <componentPackage>${componentPackage}</componentPackage> |
| <outPackage>${outPackage}</outPackage> |
| </configuration> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>Windows</id> |
| <activation> |
| <os> |
| <family>Windows</family> |
| </os> |
| </activation> |
| <properties> |
| <maven.exe.file.extension>.cmd</maven.exe.file.extension> |
| </properties> |
| </profile> |
| <profile> |
| <!-- REVISIT as of now, the olingo odata2 sample service that is used in the tests |
| is not available in nexus and needs to be generated and built using its architype plugin. |
| If the sample service jar becomes available, we can use it directly --> |
| <id>get-olingo2-sample</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>clean-olingo2-sample</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>clean</goal> |
| </goals> |
| <configuration> |
| <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| <filesets> |
| <fileset> |
| <directory>${project.build.directory}/olingo2-my-car-service</directory> |
| </fileset> |
| </filesets> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.gmavenplus</groupId> |
| <artifactId>gmavenplus-plugin</artifactId> |
| <version>${gmavenplus-plugin-version}</version> |
| <executions> |
| <execution> |
| <id>define-archetype-properties</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <scripts> |
| <script><![CDATA[ |
| session.userProperties['version'] = project.version |
| session.userProperties['groupId'] = 'org.apache.camel' |
| session.userProperties['artifactId'] = 'olingo2-my-car-service' |
| ]]></script> |
| </scripts> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.groovy</groupId> |
| <artifactId>groovy</artifactId> |
| <version>${groovy-version}</version> |
| <scope>runtime</scope> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <plugin> |
| <artifactId>maven-archetype-plugin</artifactId> |
| <version>${maven-archetype-plugin-version}</version> |
| <executions> |
| <execution> |
| <id>generate-my-car-service</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}</outputDirectory> |
| <interactiveMode>false</interactiveMode> |
| <archetypeCatalog>local</archetypeCatalog> |
| <archetypeGroupId>org.apache.olingo</archetypeGroupId> |
| <archetypeArtifactId>olingo-odata2-sample-cars-annotation-archetype |
| </archetypeArtifactId> |
| <archetypeVersion>${olingo2-version}</archetypeVersion> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |