blob: 6dbe2fab4af6e4382382ebabf8d479aa66c802f5 [file] [log] [blame]
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-toolkit</artifactId>
<version>1.14.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nifi-toolkit-api</artifactId>
<properties>
<okhttp.version>2.7.5</okhttp.version>
</properties>
<dependencies>
<!-- to get swagger definitions -->
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-web-api</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<!-- for generated code -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<!-- TODO - remove version tag here after core NiFi upgrades dependency
from com.wordnik:swagger-annotations to io.swagger:swagger-annotations. -->
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>logging-interceptor</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.8.2</version>
</dependency>
</dependencies>
<!--
Based on execution of swagger-codegen similar to the following.
(Double dashes spaced to prevent Maven error.)
$ java -jar .../swagger-codegen-cli.jar generate \
-i swagger.json \
-l java \
-o src2 \
- -group-id org.apache.nifi \
- -artifact-id nifi.client-api \
- -artifact-version 1.2.0-SNAPSHOT \
- -invoker-package org.apache.nifi.client \
- -api-package org.apache.nifi.client.api \
- -model-package org.apache.nifi.client.model \
- -http-user-agent apache-nifi-swagger-client-java
-->
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.parent.parent.basedir}/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json</inputSpec>
<language>java</language>
<configOptions>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api-toolkit</artifactId>
<artifactVersion>${project.version}</artifactVersion>
<invokerPackage>org.apache.nifi.api.toolkit</invokerPackage>
<apiPackage>org.apache.nifi.api.toolkit.api</apiPackage>
<modelPackage>org.apache.nifi.api.toolkit.model</modelPackage>
<httpUserAgent>apache-nifi-api-toolkit-agent</httpUserAgent>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.13</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
allow NiFi to be compiled on those JDKs. -->
<id>jigsaw</id>
<activation>
<jdk>(1.8,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>