exceptionfactory commented on a change in pull request #5145: URL: https://github.com/apache/nifi/pull/5145#discussion_r649972869
########## 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: Thanks for the reply @tpalfy. Having an additional build dependency is not a problem, but having an additional runtime dependency is the concern. If the Swagger annotations did not have a runtime retention policy, then it seems like this approach could work. However, if the class loader needs to have access to the Swagger annotations at runtime, then this creates issues for extension components. Having a runtime dependency would require any extension components that access these classes to include the Swagger annotations dependency, which is a problem. As it stands, this impacts not just the nifi-framework bundle, but extension bundles as well, which might want to leverage the versioned components. Unless I am missing something, it seems that we need to look at an approach that avoids introducing new transitive runtime dependencies into `nifi-api`. Perhaps @markap14 can provide additional insight on the implications. ########## 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 was thinking along the same lines @kevdoran. I believe these changes will need to be part of the work necessary to implement the Flow Analysis capability, but if this PR avoids introducing `nifi-versioned-components` as a dependency in `nifi-api`, the issue with Swagger annotations could be addressed separately. One potential solution discussed offline was moving back to [Enunciate](http://enunciate.webcohesion.com/) for generating REST API documentation from Java documentation comments, as opposed to the Swagger annotations. With the understanding that more work would be involved to evaluate that option, it could be handled in a separate PR and this one could move forward with changing the dependencies in `nifi-api` for now. -- 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: [email protected]
