You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mt...@apache.org on 2019/02/21 12:10:13 UTC

[nifi] branch master updated: NIFI-4166 Create nifi-toolkit-api. NIFI-4166 Adjusted dependencies NIFI-4166 Excluded RAT and checkstyle for generated-sources. (Added by Mike Thomsen)

This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 270b6d5  NIFI-4166 Create nifi-toolkit-api. NIFI-4166 Adjusted dependencies NIFI-4166 Excluded RAT and checkstyle for generated-sources. (Added by Mike Thomsen)
270b6d5 is described below

commit 270b6d5897117cb282bb59cc26abd29e1c54765d
Author: Joe Skora <js...@gmail.com>
AuthorDate: Wed May 31 00:08:19 2017 -0400

    NIFI-4166 Create nifi-toolkit-api.
    NIFI-4166 Adjusted dependencies
    NIFI-4166 Excluded RAT and checkstyle for generated-sources. (Added by Mike Thomsen)
    
    This closes #1994
    
    Signed-off-by: Mike Thomsen <mi...@gmail.com>
---
 nifi-toolkit/nifi-toolkit-api/pom.xml | 188 ++++++++++++++++++++++++++++++++++
 nifi-toolkit/pom.xml                  |   1 +
 pom.xml                               |   5 +
 3 files changed, 194 insertions(+)

diff --git a/nifi-toolkit/nifi-toolkit-api/pom.xml b/nifi-toolkit/nifi-toolkit-api/pom.xml
new file mode 100644
index 0000000..c4474e1
--- /dev/null
+++ b/nifi-toolkit/nifi-toolkit-api/pom.xml
@@ -0,0 +1,188 @@
+<?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">
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-toolkit</artifactId>
+        <version>1.10.0-SNAPSHOT</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.5.12</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>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </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>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                        <configuration>
+                            <compilerId>groovy-eclipse-compiler</compilerId>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-eclipse-compiler</artifactId>
+                        <version>2.9.2-01</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-eclipse-batch</artifactId>
+                        <version>2.4.3-01</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.5</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/main/groovy</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>add-test-source</id>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>add-test-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/test/groovy</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <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>
+</project>
diff --git a/nifi-toolkit/pom.xml b/nifi-toolkit/pom.xml
index 89ef032..82be565 100644
--- a/nifi-toolkit/pom.xml
+++ b/nifi-toolkit/pom.xml
@@ -32,6 +32,7 @@
         <module>nifi-toolkit-assembly</module>
         <module>nifi-toolkit-flowanalyzer</module>
         <module>nifi-toolkit-cli</module>
+        <module>nifi-toolkit-api</module>
     </modules>
     <dependencyManagement>
         <dependencies>
diff --git a/pom.xml b/pom.xml
index 924596f..7255677 100644
--- a/pom.xml
+++ b/pom.xml
@@ -681,6 +681,11 @@
                                 <phase>verify</phase>
                                 <configuration>
                                     <encoding>UTF-8</encoding>
+                                    <excludes>**/generated-sources/**/*</excludes>
+                                    <sourceDirectories>
+                                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                                        <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
+                                    </sourceDirectories>
                                 </configuration>
                                 <goals>
                                     <goal>check</goal>