Grpc on Kotlin/JVM - kotlin

I have been searching for long a blog or so which explains how to add grpc to my project. The best on I found was that: https://medium.com/swlh/using-grpc-with-kotlin-for-building-microservices-2a79d95a236a
Unfortunaly the steps in here are not clearly explained. Eg. where should the proto files be loctated and where should I import the Protobuf Compiler exactly (for what do I really need it?).
Error:
Execution failed for task ':stub:extractIncludeProto'.
> Could not resolve all files for configuration ':stub:compileProtoPath'.
> Could not find io.grpc:grpc-kotlin-stub:1.1.0-SNAPSHOT.
Searched in the following locations:
- file:/C:/Users/David/.m2/repository/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- file:/C:/Users/David/.m2/repository/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
- https://repo.maven.apache.org/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
Required by:
project :stub
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
The base problem is probably that all grpc tutorials are based on this github repository and I cannot compile any project from the examples folder. The proplem there is that gradle could not find the proto-project even though it is there (in my opinion).
So I decided to ask you, if some one has a link or knowlege about how to make a simple grpc server with the base of an empty Kotlin/JVM Application.
Sorry for this simple question, but this really upsets me that this just won't work

Replace grpc-kotlin-stub version from 1.1.0-SNAPSHOT to 1.1.0; Beacuse snapshot can't find in those repositories. Or you should install 1.1.0-SNAPSHOT to local maven repo first by using mvn install in grpc-kotlin-stub project.

Related

OpenRefine sample extension not building

I'd like to write my own OpenRefine extension
Before starting any implementation, I just want to build the sample extension from OpenRefine just to get me started.
However, I'm getting the Maven error
Could not resolve dependencies for project org.openrefine:sample:jar:3.0-SNAPSHOT: org.openrefine:main:jar:3.0-SNAPSHOT was not found in https://oss.sonatype.org/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of snapshots has elapsed or updates are forced ->
I simply cloned the OpenRefine repo and ran mvn compile from the extensions/sample folder.
any tips?
ok, I think the sample project has a wrong version in the pom.xml. it should be\
<version>3.6-SNAPSHOT</version>
I fixed the issue in this PR https://github.com/OpenRefine/OpenRefine/pull/4395

Atlassian Bamboo import issue

I am trying to create an hello world task for bamboo by following the instructions mentioned here
https://developer.atlassian.com/server/bamboo/introduction-to-writing-tasks/
I am facing an error while importing the first library "import com.atlassian.bamboo.build.logger.BuildLogger;"
I've tried searching online for the solution and the majority of such errors require you to externally download the jar file, but I couldn't find the jar as well.
I don't think I will need to download an external jar just to run hello world program, but if that's the case, can you help me find the jar (or maven dependency), else can you guide me on some other way for resolving the issue?
The artifact you're looking for is atlassian-bamboo-api-6.x.x.jar, BUT you're supposed to be able to reference it after doing an atlas-create-bamboo-plugin at the very beginning (or in step 2 of the tutorial you linked).

How to install Defense4All for OpenDaylight?

(This is a duplicate question from ServerFault, but seems that is not a right place to ask and it got downvoted for no reason, so I re-post here)
Basically I am setting up an OpenDaylight controller for my SDN. And I am trying to install an application - Defense4All, which from the documentation, will communicate with the controller host.
I am reading the installation guide of it in https://wiki.opendaylight.org/view/Defense4All:Installation_Guide , but it seems that the link of getting binary of Defense4All is dead, and I can't find a way to get the binary of Defense4All. I managed to compile from source but I have no idea how to proceed after successful build. Anyone idea?
I finally fixed the issue. Hope someone feels useful.
I managed to compile the source with mvn install, which it successfully did all the compilation but it did not give me a binary. But I am able to do so using mvn package.
To be specific, under directory dfapp after unzipping the source zip file:
vm:~/defense4all-release-helium-sr3/dfapp$ mvn package
After a long build, you will find the binary file in dfapp.aggregate/target
Make sure you allocate enough memory (say, 2048) to the VM or it will suffer from insufficient memory error.
There are also some dependencies such as git and rpm, it varies with your machines, so take notice of the error log.

Beginner's Guide to Setup Xuggler__Help

I've found the "Beginner's Guide to Setup Xuggler" article from here. I was trying to follow the best chosen answer. While going through the steps, I got stuck # "Run ivy from command-line as follows:" I didn't had Ivy at first, so I headed to Ivy's download page, and downloaded from the Snapshot Build section of the site. Then, I tested with both jar files, but while running the command stated in the Beginner's Guide, I'm getting this message: "ivy configuration file not found: ivysettings.xml". So, what did I do wrong, need I follow the "Building from source" section from the site? If so, can you please give me a detailed description of how to do it, I'm kinda new in these things. Long story short, I need to know how o get a legit "ivy.jar" file as stated in the command line of the Guide.
Ok, so I've solved the problem my own way, kind of. So, I'm gonna share it here so that other fellows like me may profit from it. So, what I did was that I (obviously) downloaded Xuggler 5.4. Then, I downloaded its dependencies manually as listed here. Then, on my IDE, I just had to import Xuggler and all of its dependencies which I previously downloaded and BAM, it worked like a charm. So, if any of you are having problem finding those dependencies or have any queries concerning this "unofficial" method of mine, you can contact me via email. I'll gladly help. :)
I don't know from Xuggler, but... the error message said you're missing ivysettings.xml. The message is probably from ivy.jar, so you definitely have that. ivysettings.xml is a required Ivy config file that tells what repositories you want to pull jars from. There may be a default one in the Xuggler distro, but probably not. You need to look at the ivy documentation to get farther. Or, use Maven instead. While I'm not a fan of Maven, for this kind of situation it may be easier.

need maven plugin configuration for building aggregate source jar

I've been fighting with this for a while and reading a lot of docs pages and other questions but still can't get it to work.
In my ORMLite project, I have a ormlite-core project which has core functionality and then a -jdbc and -android projects (with more planned). Each of these sub-projects include the core functionality but add per-architecture implementations. I want to release a single set of jars for both the -jdbc and -android versions -- i.e. I want to copy the -core javadocs and sources into the resulting jars.
For the javadocs, it was cake with the includeDependencySources config entry set to true. However, I've been fighting for a while now on how to get the source jars released by the -android package to include the -core sources. I've tried the maven-dependency-plugin to copy and unpack the dependency sources to target/sources but I see no easy way to get them to be included in the source jar -- with the appropriate paths. I've gone over the maven-source-plugin and maven-assembly-plugin docs but I'm still in the dark.
If someone has figured out the magic maven fu to get this done, can they please share the appropriate working pom.xml examples? Thanks much.
I've reviewed the following similar questions among others. I've also looked at the Sonatype Maven manual and read a bunch web pages posing similar questions.
Delivering a single jar with a Maven project
Maven - 'all' or 'parent' project for aggregation?
While not an answer to the question, a possible reason why a parameter like <includeDependencySources> is not present for maven source plugin is because, while javadocs can be generated from a jar containing classes, the sources cannot be. The plugin cannot assume that the sources of the dependencies are available to it since they do not get installed by default.
I guess the best answer to this question at this time is "you can't get there from here". This requires extensions to the maven-source-plugin.
I ended up determining that combining these sub-projects into the same jar was not a good idea and now I release 3 separate jars.