You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/06/14 07:22:45 UTC

[GitHub] [nifi] tpalfy commented on a change in pull request #5145: NIFI-8671 Create nifi-versioned-components module.

tpalfy commented on a change in pull request #5145:
URL: https://github.com/apache/nifi/pull/5145#discussion_r649834938



##########
File path: nifi-versioned-components/pom.xml
##########
@@ -0,0 +1,52 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi</artifactId>
+        <version>1.14.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-versioned-components</artifactId>
+
+    <profiles>
+        <profile>
+            <id>nifi-versioned-components_jigsaw</id>
+            <activation>
+                <jdk>(1.8,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+    <!-- This module should kept to having no dependencies -->
+    <dependencies>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.5.16</version>
+            <scope>provided</scope>

Review comment:
       I discussed this dependency issue with @kevdoran and he suggested this -imo- neat idea.
   
   The `provided` scope is to _not_ introduce the swagger dependency to _nifi-api_ build time. With this we can avoid having it on the root classpath.
   
   The run-time burden falls to the referring modules indeed but that shouldn't be a big issue. nifi-registry already had this obligation and the nifi-framework bundle also depends on swagger-annotations.
   Considering only 2 high-level api annotations are used in nifi-versioned-components I think this is the best compromise we can get.
   
   As for why even add this change _here_. The change in this PR was originally part of https://github.com/apache/nifi/pull/5118 and I'm now separating it from the Flow Analysis change as you suggested.
   So the Flow Analysis change would follow this one soon. And I'd rather have this nifi-api -> nifi-versioned-components added in this one rather than that one as it has more general - we make those classes part of the public API. That is the purpose of this new module in the first place.

##########
File path: nifi-versioned-components/pom.xml
##########
@@ -0,0 +1,52 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi</artifactId>
+        <version>1.14.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-versioned-components</artifactId>
+
+    <profiles>
+        <profile>
+            <id>nifi-versioned-components_jigsaw</id>
+            <activation>
+                <jdk>(1.8,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+    <!-- This module should kept to having no dependencies -->
+    <dependencies>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.5.16</version>
+            <scope>provided</scope>

Review comment:
       I discussed this dependency issue with @kevdoran and he suggested this -imo- neat idea.
   
   The `provided` scope is to _not_ introduce the swagger dependency to _nifi-api_ build time. With this we can avoid having it on the root classpath.
   
   The run-time burden falls to the referring modules indeed but that shouldn't be a big issue. nifi-registry already had this obligation and the nifi-framework bundle also depends on swagger-annotations.
   Considering only 2 high-level api annotations are used in nifi-versioned-components I think this is the best compromise we can get.
   
   As for why even add this change _here_. The change in this PR was originally part of https://github.com/apache/nifi/pull/5118 and I'm now separating it from the Flow Analysis change as you suggested.
   So the Flow Analysis change would follow this one soon. And I'd rather have this nifi-api -> nifi-versioned-components added in this one rather than that one as it has more general implications - we make those classes part of the public API. That is the purpose of this new module in the first place.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org