I am compiling nifi-1.11.4 with "mvn -T C2.0 clean install -Pinclude-grpc -DskipTests" to parse a problem I am having in the connectivity of the ListSFTP processor with an SFTP service and I encounter this problem:
The explanation for this problem is that maven set defaults updatePolicy to daily. This attribute is specified in pluginRepositories -> pluginRepository -> releases and / or in repositories -> repository -> releases. Although usually is a prelude to other problems.
There are several solutions:
- Run the maven command with "-U"
- Specify in pom.xml an updatePolicy with a value of "always"
- Remove the package from the local repository
I have decided to change the pom.xml and specify in the repositories that appears in the pom.xml of nifi-1.11.4 the attribute "<updatePolicy>always</updatePolicy>" in repository and pluginRepositorios that do not have it specified:
Dentro del código fuente de nifi-1.11.4 busco el pom.xml del processor nifi-splunk-bundle que está en nifi-nar-bundles/nifi-splunk-bundle y le especifico el atributo "<updatePolicy>always</updatePolicy>" también.
When I make this change and run "mvn -T C2.0 clean install -Pinclude-grpc -DskipTests" again I now get the error:
[ERROR] Failed to execute goal on project nifi-splunk-processors: Could not resolve dependencies for project org.apache.nifi:nifi-splunk-processors:jar:1.11.4: Could not find artifact com.splunk:splunk:jar:18.104.22.168 in splunk (https://splunk.artifactoryonline.com/splunk/ext-releases-local/) -> [Help 1]
This is because the specified repository https://splunk.artifactoryonline.com/splunk/ext-releases-local/ does not exist in the pom.xml the artefactId searched for splunk version 22.214.171.124 of the groupId com.splunk. I check that this URL is not responding and this is due in this case to splunk having to change the context of its repository and instead of /splunk it is /artifactory (the solution is to find a repository with the artifact and specify it in the pom. xml):
I change the repository URL in the pom.xml:
And run "mvn -T C2.0 clean install -Pinclude-grpc -DskipTests" again I now get the "BUILD SUCCESS":
And this BUILD SUCCESS has left me nifi-1.11.4 in the folder [project base]/nifi-assembly/target/nifi-1.11.4-bin/nifi-1.11.4 where moving to its /bin folder we can execute nifi- 1.11.4 executing "./nifi.sh start":
In the nifi-app.log log we can see that nifi is already available when the message "INFO [main] org.apache.nifi.NiFi Controller initialization took 29257659222 nanoseconds (29 seconds)." appears:
And we have the Nifi service available in the list of URLs that appear in the log. As I am running it in CentOS 7 virtualized with Virtual Box I access from my IP in the access host to the virtualized VM which is http://192.168.56.1:8080/nifi/:
With this I can see the problem we have with the ListSFTP proccessor that I will detail in another entry in this blog.
Just tell you it stops with "./nifi.sh stop".
To download the Nifi sources, access the URL https://nifi.apache.org/quickstart.html where the necessary configuration to download the code and compile is detailed.