You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2023/10/27 21:26:21 UTC

(nifi) branch main updated (c421172ee2 -> 5ecc12f405)

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

exceptionfactory pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


    from c421172ee2 NIFI-12286 Removed nifi-example-bundle
     new 94e746dc47 NIFI-12283 Added include-swagger-ui profile with activation by default
     new 5ecc12f405 NIFI-12285 Added py4j.url build property

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../nifi-py4j-bundle/nifi-python-framework/pom.xml |   3 +-
 .../nifi-registry-web-api/pom.xml                  | 142 +++++++++++----------
 2 files changed, 80 insertions(+), 65 deletions(-)


(nifi) 02/02: NIFI-12285 Added py4j.url build property

Posted by ex...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ecc12f4051191502bf0b9b18b861c0b862dd2d9
Author: Mark Bean <ma...@gmail.com>
AuthorDate: Fri Oct 27 18:27:11 2023 +0000

    NIFI-12285 Added py4j.url build property
    
    The py4j.url property allows the URL for downloading py4j to be specified by a Maven command-line option
    
    This closes #7946
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 nifi-nar-bundles/nifi-py4j-bundle/nifi-python-framework/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-py4j-bundle/nifi-python-framework/pom.xml b/nifi-nar-bundles/nifi-py4j-bundle/nifi-python-framework/pom.xml
index b80f962548..5a81eacfec 100644
--- a/nifi-nar-bundles/nifi-py4j-bundle/nifi-python-framework/pom.xml
+++ b/nifi-nar-bundles/nifi-py4j-bundle/nifi-python-framework/pom.xml
@@ -27,6 +27,7 @@
 
     <properties>
         <py4j.version>0.10.9.7</py4j.version>
+        <py4j.url>https://files.pythonhosted.org/packages/10/30/a58b32568f1623aaad7db22aa9eafc4c6c194b429ff35bdc55ca2726da47/py4j-${py4j.version}-py2.py3-none-any.whl</py4j.url>
     </properties>
 
     <build>
@@ -43,7 +44,7 @@
                         </goals>
                         <phase>generate-resources</phase>
                         <configuration>
-                            <url>https://files.pythonhosted.org/packages/10/30/a58b32568f1623aaad7db22aa9eafc4c6c194b429ff35bdc55ca2726da47/py4j-${py4j.version}-py2.py3-none-any.whl</url>
+                            <url>${py4j.url}</url>
                             <outputFileName>py4j-${py4j.version}.zip</outputFileName>
                             <unpack>true</unpack>
                             <outputDirectory>${project.build.directory}/py4j-${py4j.version}</outputDirectory>


(nifi) 01/02: NIFI-12283 Added include-swagger-ui profile with activation by default

Posted by ex...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 94e746dc4701814ede160d7e0f5793a3e1cf76db
Author: Mark Bean <ma...@gmail.com>
AuthorDate: Fri Oct 27 16:38:18 2023 +0000

    NIFI-12283 Added include-swagger-ui profile with activation by default
    
    Deactivating prevents attempt to download swagger asset from the Internet allowing for offline builds.
    
    This closes #7945
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../nifi-registry-web-api/pom.xml                  | 142 +++++++++++----------
 1 file changed, 78 insertions(+), 64 deletions(-)

diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
index 9a1bf653b3..cce8776de0 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
@@ -147,70 +147,6 @@
                 </dependency>
             </dependencies>
             </plugin>
-            <plugin>
-                <groupId>com.googlecode.maven-download-plugin</groupId>
-                <artifactId>download-maven-plugin</artifactId>
-                <version>1.7.1</version>
-                <executions>
-                    <execution>
-                        <id>download-swagger-ui</id>
-                        <!-- This plugin downloads swagger UI static assets during the build, to be
-                             served by the web app to render the dynamically generated Swagger spec.
-                             For offline development, or to build without the swagger UI, activate
-                             the "no-swagger-ui" maven profile during the build with the "-P" flag -->
-                        <goals>
-                            <goal>wget</goal>
-                        </goals>
-                        <configuration>
-                            <url>https://github.com/swagger-api/swagger-ui/archive/v${swagger.ui.version}.tar.gz</url>
-                            <unpack>true</unpack>
-                            <outputDirectory>${project.build.directory}</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>bundle-swagger-ui</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <target>
-                                <sequential>
-                                    <echo>Copy static Swagger UI files to target</echo>
-                                    <copy todir="${project.build.directory}/classes/static/swagger">
-                                        <fileset dir="${project.build.directory}/swagger-ui-${swagger.ui.version}/dist">
-                                            <include name="**" />
-                                        </fileset>
-                                    </copy>
-                                    <echo>Disable schema validation by removing validatorUrl</echo>
-                                    <replace token="https://online.swagger.io/validator" value="" dir="${project.build.directory}/classes/static/swagger">
-                                        <include name="swagger-ui-bundle.js" />
-                                        <include name="swagger-ui-standalone-preset.js" />
-                                    </replace>
-                                    <echo>Rename 'index.html' to 'ui.html'</echo>
-                                    <move file="${project.build.directory}/classes/static/swagger/index.html" tofile="${project.build.directory}/classes/static/swagger/ui.html" />
-                                    <echo>Replace default swagger.json location</echo>
-                                    <replace token="http://petstore.swagger.io/v2/swagger.json" value="/nifi-registry-api/swagger/swagger.json" dir="${project.build.directory}/classes/static/swagger">
-                                        <include name="ui.html" />
-                                    </replace>
-                                    <echo>Copy swagger.json into static assets folder</echo>
-                                    <copy todir="${project.build.directory}/classes/static/swagger">
-                                        <fileset dir="${project.build.directory}/swagger">
-                                            <include name="*.json" />
-                                        </fileset>
-                                    </copy>
-                                </sequential>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
@@ -223,6 +159,84 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>include-swagger-ui</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.googlecode.maven-download-plugin</groupId>
+                        <artifactId>download-maven-plugin</artifactId>
+                        <version>1.7.1</version>
+                        <executions>
+                            <execution>
+                                <id>download-swagger-ui</id>
+                                <!-- This plugin downloads swagger UI static assets during the build, to be
+                                     served by the web app to render the dynamically generated Swagger spec.
+                                     For offline development, or to build without the swagger UI, deactivate
+                                     the "include-swagger-ui" maven profile during the build with the following
+                                     profile option: -P'!include-swagger-ui' -->
+                                <goals>
+                                    <goal>wget</goal>
+                                </goals>
+                                <configuration>
+                                    <url>https://github.com/swagger-api/swagger-ui/archive/v${swagger.ui.version}.tar.gz</url>
+                                    <unpack>true</unpack>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>bundle-swagger-ui</id>
+                                <phase>prepare-package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <target>
+                                        <sequential>
+                                            <echo>Copy static Swagger UI files to target</echo>
+                                            <copy todir="${project.build.directory}/classes/static/swagger">
+                                                <fileset dir="${project.build.directory}/swagger-ui-${swagger.ui.version}/dist">
+                                                    <include name="**" />
+                                                </fileset>
+                                            </copy>
+                                            <echo>Disable schema validation by removing validatorUrl</echo>
+                                            <replace token="https://online.swagger.io/validator" value="" dir="${project.build.directory}/classes/static/swagger">
+                                                <include name="swagger-ui-bundle.js" />
+                                                <include name="swagger-ui-standalone-preset.js" />
+                                            </replace>
+                                            <echo>Rename 'index.html' to 'ui.html'</echo>
+                                            <move file="${project.build.directory}/classes/static/swagger/index.html" tofile="${project.build.directory}/classes/static/swagger/ui.html" />
+                                            <echo>Replace default swagger.json location</echo>
+                                            <replace token="http://petstore.swagger.io/v2/swagger.json" value="/nifi-registry-api/swagger/swagger.json" dir="${project.build.directory}/classes/static/swagger">
+                                                <include name="ui.html" />
+                                            </replace>
+                                            <echo>Copy swagger.json into static assets folder</echo>
+                                            <copy todir="${project.build.directory}/classes/static/swagger">
+                                                <fileset dir="${project.build.directory}/swagger">
+                                                    <include name="*.json" />
+                                                </fileset>
+                                            </copy>
+                                        </sequential>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>