Closed beatrizsanchez closed 5 years ago
Ok, I've installed Thrift in my machine. My bad! I thought that only the dependency was necessary.
I've re-ran the generate.sh
with Thrift 0.9.3 installed and it worked! I initially tried with Thrift compiler (0.11.0) but brought several compilation issues.
After I ran the generate.sh
I executed mvn -f pom-plain.xml install
and was able to use the dependency from my local maven repository.
Thanks for the update! This is interesting - I thought that would Just Work (TM) without you having to install Thrift, but apparently it doesn't.
I will tweak the Travis build so it does the plain Maven build in addition to the Tycho one, and fix any issues that appear.
The pom-plain.xml
file does build the API module, so that should just work :-/. Travis is also happy:
https://travis-ci.org/mondo-project/mondo-hawk/jobs/458528114
In any case, yes - you have to use Hawk.Client
and not just Hawk
. This is because of the way Thrift generates the code - it doesn't have anything to do with whether you use .api as a plugin or as a JAR library. Hawk is interface, and Hawk.Client is the specific implementation that Thrift instantiates for you :-).
Thanks Antonio!
Hi,
I have been trying to run and use hawk programmatically from Java. I have succeeded in interacting with Hawk in a similar way as how the
org.hawk.service.cli
uses Hawk, that is, consuming theorg.hawk.service.api
andorg.hawk.service.artemis
plugins and interacting with theHawk.Client
class. However, I've noticed that theHawk
class fromorg.hawk.service.api
does not offer methods from the Thrift API as indicated in the wiki.For example, I cannot call
as in the Thrift API wiki, but instead I have to call
I imagine the differences come from the fact that I have not build properly the API as indicated here. The problem I face on how to build the Thrift API is that I cannot find a
pom-server-plain.xml
file so I have tried the following:mvn -f pom-plain.xml install
at the root of the Hawk projectmvn -f pom-plain.xml install
at the root oforg.hawk.service.api
. This brought a lot of compilation errors, then again, so did the former command but they disappeared after a clean build in Eclipse. I wonder if I should try this again.install-maven-deps.sh
at the root of the Hawk projectgenerate.sh
in theorg.hawk.service.api
project. This crashes withline 5: thrift: command not found
andline 6: thrift: command not found
.My questions are: