Hi guys,I am trying to add some external libraries to a Gerrit plugin.1. I have extracted the jar files into //plugins/<plugin-name>/lib/2. I have an entry for each jar in //plugins/<plugin-name>/BUCK like this:provided_deps = [
'//plugins/jira-validator/lib:jira-client-0.5',]3. In //plugins/<plugin-name>/lib/BUCK I have added:prebuilt_jar(name = 'jira-client-0.5',binary_jar = 'jira-client-0.5.jar',visibility = ['PUBLIC',],)Now the build is working, but when I am trying to test this plugin in Gerrit, I get a NoClassDefFoundError, even if I add those libraries in the same way as described above. To be more specific, I get this error:java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/sf/json/JSONeven if I add json-lib to the BUCK files.I tried to create a separate Java project and to use those libraries, and is working by including jar files in Eclipse build path, as usual.Is there any way to include dependency of an dependency in my plugin?
--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
I tried, same error...
Am Freitag, 19. August 2016 11:55:32 UTC+2 schrieb WekTorALL:I tried, same error...Can you share your gerrit_plugin() rule? As Edwin pointed out, changingprovided_deps to deps and rebuilding the plugin should just work.
As a test look inside the built plugin with jar -tf buck-out/gen/plugins/<plugin-name>/<plugin-name>.jarthe dependencies should be included.
On Friday, August 19, 2016 at 1:04:51 PM UTC+3, David Ostrovsky wrote:
Am Freitag, 19. August 2016 11:55:32 UTC+2 schrieb WekTorALL:I tried, same error...Can you share your gerrit_plugin() rule? As Edwin pointed out, changingprovided_deps to deps and rebuilding the plugin should just work.
As a test look inside the built plugin with jar -tf buck-out/gen/plugins/<plugin-name>/<plugin-name>.jarthe dependencies should be included.All dependencies are there...
I tried a buck clean, and then i built the plugin again, and now I have another error:Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JsonConfigWhat am I doing wrong?...