openMF / fineract-pentaho

Pentaho Reporting Plugin for Apache Fineract
Mozilla Public License 2.0
26 stars 45 forks source link

Error when adding pentaho-plugin to fineract build.gradle. Plugin not found even when repositories entry is added. #98

Closed bmukangura closed 1 year ago

bmukangura commented 1 year ago

I am using Intellij and when I try to add the build.gradle.txt I get an error when running the build. I am attaching my build.gradle file.

Is there an example of a correctly configured build.gradle that is working with the pentaho-plugin?

Error message from Intellij

Plugin [id: 'community.mifos.pentaho-plugin', version: '1.8.4-SNAPSHOT'] was not found in any of the following sources:

francisguchie commented 1 year ago

@IOhacker

In which of the gradle.build files in apache-fineract do we add the plugin line | Kindly advise as i too have similar problems getting pentaho-plugins to work

bmukangura commented 1 year ago

I think I have some idea what might be happening. Will investigate further.

When I connect with a browser to the jfrog repo, it first displays an animated logo. When I run curl -v below is the trace I get. The excerpt causing suspicion is We're sorry but jfrog webapp doesn't work properly without JavaScript enabled. Please enable it to continue.

---------- curl -v trace follows below ------------------------------

bmukangura commented 1 year ago

Even when the correct repository is scanned, the content is not resolvable

Plugin [id: 'community.mifos.pentaho-plugin', version: '1.8.4-SNAPSHOT'] was not found in any of the following sources:

bmukangura commented 1 year ago

Does that mean that just adding the plugin would not work as the documentation suggests? I look forward to any insights you do discover.

Regarding the curl, the SSL error occurred because when you connect to https://mifos.jfrog.io/artifactory/libs-snapshot-local/ with a browser, JFrog redirects you to a "UI" based URL(https://mifos.jfrog.io/ui/native/libs-snapshot-local/). That's the URL I used with the failed SSL debug session.

https://mifos.jfrog.io/artifactory/libs-snapshot-local/ (curl is OK)
https://mifos.jfrog.io/ui/native/libs-snapshot-local/ (curl is not OK)

francisguchie commented 1 year ago

@bmukangura I mixed up the building of the plugin with the building of the fineract-provider

Secondly, Yes just adding the plugin should work and it has been working for a long time for me until the passwords got encrypted PR 82.

also thank for correcting me on the curl am going to test the curl while looking at the local build and the build.gradle. But first i will start with the local pentaho-plugin build using

  1. The common mvn command mvn clean install -DskipTests
  2. Making sure that the plugin picks the correct fineract-provider version i have locally built will do this in the pom file line 18 to 24

    17 0.0.108-dcbc0e38 9.5.0.0-SNAPSHOT 22.3.1 2.7.10 1.1.3

    And line 92 to 98

    org.apache.fineract fineract-provider 1.0 system $HOME/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-****-plain.jar
bmukangura commented 1 year ago

Hi @francisguchie thanks so much for your help.

If I understand you correctly, we currently cannot build the fineract-provider with the plugin since the passwords were encrypted. Is that what you meant?

All I am trying to do is to include the pentaho-plugin in a fineract-provider instance.

Do you have build.gradle example that works?

francisguchie commented 1 year ago

@bmukangura https://mifos.jfrog.io/ui/native/libs-snapshot-local/ (curl Is OK for me)

image

francisguchie commented 1 year ago

@bmukangura See my inline responses

If I understand you correctly, we currently cannot build the fineract-provider with the plugin since the passwords were encrypted. Is that what you meant? this was solved and should work since we have the 1.8.4 snapshot as seen that fineract-1831 was merged on both sides of the code but i have had other errors i have to look into before creating an issue.

All I am trying to do is to include the pentaho-plugin in a fineract-provider instance. Yes Me too

Do you have build.gradle example that works? No not yet am going to use your approach and also do my findings so we can compare notes if it fails too

All in all I want a success situation this night so i will share here as soon as am done

bmukangura commented 1 year ago

Thanks so much @francisguchie .

francisguchie commented 1 year ago

@bmukangura

I think at the moment we cannot build the fineract-provider (jar or war) as per the instructions given - i still get the same error like yours - the artifact is not available yet the command is not trying to access the mavencentral artifactory repository.

I am going for the local build approach using these steps

  1. Build fineract war / jar
  2. The edit specific lines 0.0.108-dcbc0e38</fineract.version> and $HOME/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-2ac92089-plain.jar
  3. Then Build my Pentaho plugin and wait to see a success

The reason is after the encryption was added, for the pentaho-plugin to work, it needs to read some classes from the community (fineract-provider.jar) to be able work well and open the reports

IOhacker commented 1 year ago

It is required to have the fineract-provider in the path, please check the Github Action for building the binary.

El lun, 10 abr 2023 a las 16:00, Guchie @.***>) escribió:

@bmukangura https://github.com/bmukangura

I think at the moment we cannot build the fineract-provider (jar or war) as per the instructions given - i still get the same error like yours - the artifact is not available yet the command is not trying to access the mavencentral artifactory repository.

I am going for the local build approach using these steps

  1. Build fineract war / jar
  2. The edit specific lines 0.0.108-dcbc0e38</fineract.version> and $HOME/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-2ac92089-plain.jar
  3. Then Build my Pentaho plugin and wait to see a success

The reason is after the encryption was added, for the pentaho-plugin to work, it needs to read some classes from the community (fineract-provider.jar) to be able work well and open the reports

— Reply to this email directly, view it on GitHub https://github.com/openMF/fineract-pentaho/issues/98#issuecomment-1502382031, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2ZAVLIYJOHVGDW7RCVH3XAR7I3ANCNFSM6AAAAAAWUVP4YU . You are receiving this because you were mentioned.Message ID: @.***>

francisguchie commented 1 year ago

@IOhacker
I succeeded in building a pentaho plugin and it is stored in my .m2 folder path ( $home/.m2/repository/community/mifos/pentaho-plugin/)

To succeed I made sure that I select a version that has 2 artifacts available by editing and putting the correct version see below excerpt

17 **0.0.140-75a9c7c5** 9.5.0.0-SNAPSHOT 22.3.1 2.7.10 1.1.3

So during the mvn build the following libraries were chosen

  1. Fineract-Provider library https://mifos.jfrog.io/ui/native/libs-release-local/org/apache/fineract/fineract-provider/ It downloaded 0.0.140-75a9c7c5/

  2. Fineract-Client library https://mifos.jfrog.io/ui/native/libs-release-local/org/apache/fineract/fineract-client/ It downloaded 0.0.140-75a9c7c5/

I think It is required to have the fineract-provider that is available for both fineract-provider and fineract-client libraries but then the reports did not load - i am yet to test another build later

francisguchie commented 1 year ago

@IOhacker @bmukangura

I can successfully build a plugin but i dont know what i am not doing well

these are the specific steps i have taken 1- I built an fineract-provider from the latest develop branch commit number 3999b76

2- I built a fineract-pentaho plugin using the version 0.0.143-cc638381</fineract.version> line number 19 in the pom

3- I Launched tomcat and it loaded successfully I could log in

  1. Stopped tomcat and copied the plugin into the libs folder ==> (tomcat\webapps\fineract-provider\WEB-INF\lib)

But when i start tomcat again it fails with the message below - What am i missing ?

image

bmukangura commented 1 year ago

@francisguchie I haven't built the plugin or Fineract this way. I use the docker approach. Did you finally figure out the issue?

francisguchie commented 1 year ago

@bmukangura I am sorry - I dont use docker am still the old school type - but soon may be

IOhacker commented 1 year ago

@bmukangura https://github.com/bmukangura @francisguchie https://github.com/francisguchie

Are you adding the Pentaho Reports libraries in the Classpath?

El jue, 13 abr 2023 a las 7:34, Guchie @.***>) escribió:

@bmukangura https://github.com/bmukangura I am sorry - I dont use docker am still the old school type - but soon may be

— Reply to this email directly, view it on GitHub https://github.com/openMF/fineract-pentaho/issues/98#issuecomment-1506975174, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2ZARJDAXXN75PK5GLADTXA76HXANCNFSM6AAAAAAWUVP4YU . You are receiving this because you were mentioned.Message ID: @.***>

j0nimost commented 1 year ago

Is it possible we get docs updated; I have a similar scenario as @bmukangura where I want to run the plugin on Docker;

francisguchie commented 1 year ago

@j0nimost we are yet to update the docs because we are yet to have a working process ( at least for me)

wkigenyi commented 1 year ago

Would something like this help: implementation fileTree(dir: "/pentahoplugins/",include:"*.jar") Where pentahoplugins is the directory the built jars are for the plugin. It works for me.

samarth-singh-thakur commented 1 year ago

Would something like this help: implementation fileTree(dir: "/pentahoplugins/",include:"*.jar") Where pentahoplugins is the directory the built jars are for the plugin. It works for me.

Can you provide the build.gradle file? And can you please list the steps to add this plugin to fineract. I am new to all this

francisguchie commented 1 year ago

@samarth-singh-thakur we are using maven builds now

francisguchie commented 1 year ago

Would something like this help: implementation fileTree(dir: "/pentahoplugins/",include:"*.jar") Where pentahoplugins is the directory the built jars are for the plugin. It works for me.

@wkigenyi Just seen this today - thank you for your input - i will test and revert with my findings

wkigenyi commented 1 year ago

Would something like this help: implementation fileTree(dir: "/pentahoplugins/",include:"*.jar") Where pentahoplugins is the directory the built jars are for the plugin. It works for me.

Can you provide the build.gradle file? And can you please list the steps to add this plugin to fineract. I am new to all this

build.txt There it is. You will have to rename it to build.gradle.

francisguchie commented 1 year ago

@wkigenyi thank you so much for sharing

@samarth-singh-thakur please test and confirm if this too works for you then we can close this issue as solved. Will be waiting to hear from you

francisguchie commented 1 year ago

Would something like this help: implementation fileTree(dir: "/pentahoplugins/",include:"*.jar") Where pentahoplugins is the directory the built jars are for the plugin. It works for me.

Can you provide the build.gradle file? And can you please list the steps to add this plugin to fineract. I am new to all this

build.txt There it is. You will have to rename it to build.gradle.

@wkigenyi this does work for me - but then there is another error at boot time - (i will open another issue for it ) I think this issue is solved so i am closing it