You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Valentina Ivanova <va...@ri.se> on 2020/02/05 15:45:27 UTC

Developing NiFi custom processors in NetBeans

Hi everyone!

We faced another issue when trying to create custom processors with NetBeans 8.2.
I try to create a new project in the following way File-> New Project -> Maven -> Project from Maven Archetype and then selecting nifi-processor-bundle-archetype from the available archetypes. Then on the next screen filling in the requested fields. Finally when pressing finish to create it I get the following (see below).

After some investigation I figured out that file can't be downloaded:
http://repo.maven.apache.org/maven2/org/apache/nifi/nifi/1.11.0/nifi-1.11.0.pom
as the protocol needs to be set to HTTPS. So I created a custom repository (and built the index) which uses the HTTPS protocol and try to create the project using it. However, it seems the HTTP version is still used, so creating the project fails again.

When I browse the Maven repositories in the Services tab and try to download certain org.apache.nifi poms I get error messages for some dependencies are broken which is not clear how to fix.

So I wonder if anyone has had the same issues and how to resolve them.
(I tried to use maven from command line but other issues appear amd I would prefer the UI as I am a maven beginner.)

Many thanks & all the best

Valentina



cd C:\Users\valentinaiv\Desktop\NetBeansProjects\ReadProtoBuf; "JAVA_HOME=C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.212.03-hotspot" cmd /c "\"\"C:\\Program Files\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\" -DarchetypeGroupId=org.apache.nifi -DarchetypeArtifactId=nifi-processor-bundle-archetype -DarchetypeVersion=1.11.0 -DarchetypeRepository=https://repo.maven.apache.org/maven2/ -DgroupId=rise.koda -DartifactId=mavenproject2 -Dversion=1.0-SNAPSHOT -Dpackage=rise.koda.mavenproject2 -Dbasedir=C:\\Users\\valentinaiv\\Desktop\\NetBeansProjects\\ReadProtoBuf -DartifactBaseName=read -DnifiVersion=1.11.0 -Darchetype.interactive=false -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" --batch-mode archetype:generate\""
Scanning for projects...

------------------------------------------------------------------------
Building Maven Stub Project (No POM) 1
------------------------------------------------------------------------

>>> maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom >>>

<<< maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom <<<

--- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
Generating project in Batch mode
No archetype found in remote catalog. Defaulting to internal catalog
Archetype not found in any catalog. Falling back to central repository.
Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
Downloading: http://repo.maven.apache.org/maven2/org/apache/nifi/nifi/1.11.0/nifi-1.11.0.pom
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.991s
Finished at: Wed Feb 05 16:37:23 CET 2020
Final Memory: 14M/243M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.nifi:nifi-processor-bundle-archetype:1.11.0) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Re: Developing NiFi custom processors in NetBeans

Posted by Valentina Ivanova <va...@ri.se>.
Hi Otto,

Thanks for your reply. My NetBeans 8.2 environment is up-to-date and I was using the latest nifi archetype, screenshots attached.
I installed the Apache NetBeans 11.2 and it worked there.

One thing I figured out while investigating is that the protocol has not been changed to https for the nifi-nar-maven-plugin. I don't know if this could be related.

Shall I still log a jira and for what?

Thanks & all the best

Valentina

________________________________
From: Otto Fowler <ot...@gmail.com>
Sent: Thursday, 6 February 2020 05:18
To: users@nifi.apache.org <us...@nifi.apache.org>
Subject: Re: Developing NiFi custom processors in NetBeans

8 Months ago, the nifi parent pom was change to have https: for all apache repos: https://github.com/apache/nifi/commit/e6c843f465da98fd7dc640e53214e4aeefa61b7d
If you are getting this error, I wonder if you have out of date versions of the archetype, or that you are specifying an old nifi version or something?



On February 5, 2020 at 23:04:42, Otto Fowler (ottobackwards@gmail.com<ma...@gmail.com>) wrote:

screen

Re: Developing NiFi custom processors in NetBeans

Posted by Otto Fowler <ot...@gmail.com>.
8 Months ago, the nifi parent pom was change to have https: for all apache
repos:
https://github.com/apache/nifi/commit/e6c843f465da98fd7dc640e53214e4aeefa61b7d
If you are getting this error, I wonder if you have out of date versions of
the archetype, or that you are specifying an old nifi version or something?


On February 5, 2020 at 23:04:42, Otto Fowler (ottobackwards@gmail.com)
wrote:

screen

Re: Developing NiFi custom processors in NetBeans

Posted by Otto Fowler <ot...@gmail.com>.
You should log a jira on this and set it to a high priority.




On February 5, 2020 at 10:45:42, Valentina Ivanova (valentina.ivanova@ri.se)
wrote:

Hi everyone!

We faced another issue when trying to create custom processors with
NetBeans 8.2.
I try to create a new project in the following way File-> New Project ->
Maven -> Project from Maven Archetype and then selecting
nifi-processor-bundle-archetype from the available archetypes. Then on the
next screen filling in the requested fields. Finally when pressing finish
to create it I get the following (see below).

After some investigation I figured out that file can't be downloaded:
http://repo.maven.apache.org/maven2/org/apache/nifi/nifi/1.11.0/nifi-1.11.0.pom
as the protocol needs to be set to HTTPS. So I created a custom repository
(and built the index) which uses the HTTPS protocol and try to create the
project using it. However, it seems the HTTP version is still used, so
creating the project fails again.

When I browse the Maven repositories in the Services tab and try to
download certain org.apache.nifi poms I get error messages for some
dependencies are broken which is not clear how to fix.

So I wonder if anyone has had the same issues and how to resolve them.
(I tried to use maven from command line but other issues appear amd I would
prefer the UI as I am a maven beginner.)

Many thanks & all the best

Valentina



cd C:\Users\valentinaiv\Desktop\NetBeansProjects\ReadProtoBuf;
"JAVA_HOME=C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.212.03-hotspot" cmd /c
"\"\"C:\\Program Files\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\"
-DarchetypeGroupId=org.apache.nifi
-DarchetypeArtifactId=nifi-processor-bundle-archetype
-DarchetypeVersion=1.11.0
-DarchetypeRepository=https://repo.maven.apache.org/maven2/
-DgroupId=rise.koda
<https://repo.maven.apache.org/maven2/-DgroupId=rise.koda>
-DartifactId=mavenproject2 -Dversion=1.0-SNAPSHOT
-Dpackage=rise.koda.mavenproject2
-Dbasedir=C:\\Users\\valentinaiv\\Desktop\\NetBeansProjects\\ReadProtoBuf
-DartifactBaseName=read -DnifiVersion=1.11.0 -Darchetype.interactive=false
-Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans
8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" --batch-mode
archetype:generate\""
Scanning for projects...

------------------------------------------------------------------------
Building Maven Stub Project (No POM) 1
------------------------------------------------------------------------

>>> maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom >>>

<<< maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom <<<

--- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
Generating project in Batch mode
No archetype found in remote catalog. Defaulting to internal catalog
Archetype not found in any catalog. Falling back to central repository.
Add a repository with id 'archetype' in your settings.xml if archetype's
repository is elsewhere.
Downloading:
http://repo.maven.apache.org/maven2/org/apache/nifi/nifi/1.11.0/nifi-1.11.0.pom
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.991s
Finished at: Wed Feb 05 16:37:23 CET 2020
Final Memory: 14M/243M
------------------------------------------------------------------------
Failed to execute goal
org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate
(default-cli) on project standalone-pom: The desired archetype does not
exist (org.apache.nifi:nifi-processor-bundle-archetype:1.11.0) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read
the following articles:
[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException