Compile ODL controller - opendaylight

I am trying to follow this example but I found one problem. I am trying to compile ODL controller but the files structure have changed compared to the previous versions and I don't know in what path I have to be to compile the controller.
I am following
git clone https://git.opendaylight.org/gerrit/p/controller.git
Check that the used Yang tools version is >= 0.5.8-SNAPSHOT.
But I have 0.8.0 (downloaded today in the same link).
And then I have to do this to compile the ODL controller:
cd controller/opendaylight/distribution/opendaylight
mvn clean install
But this path doesn exist on the version I have donwloaded.
¿In what directory I have to be to run the mvn clean install?

The ping example wiki is old and outdated. That was back when everything was in the controller project except for yangtools and before ODL was converted to use karaf. So the controller/opendaylight/distribution/opendaylight directory is long gone. So if you want to create and run the ping example, you would create a karaf feature and run the karaf distro in the controller project. You can follow what is done with the toaster sample and its associated wiki which is pretty up-to-date: https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step.

just run 'mvn clean install' in the root dir (so, the "controller" dir).
also, to be safe, I'd delete your "repository" directory in your .m2
dir (usually, in ~/.m2/repository).
Finally, make sure your mvn .settings.xml file is correct. here's a
link for that.

Related

How do I turn Keycloak old version 4.1.0 into 'Standalone server distribution'?

I tried something (readme.md, blog etc).But I don't turn 'standalone server distribution'.
I can give an example. What I want to say:
The following is a 'standalone server distribution' files. This is ready for running.
Picture-1
I need to run old version keycloak (version 4.1.0). This package seem like this :
Picture-2
According to Picture-2, this packages don't ready for running.
How can I ready for running ? Like to Picture-1.
I need your suggestions and suggestions. Can you help me?
Greetings,
That's the source code.
You have to build it by executing the following command from parent directory (you need Java JDK and Maven installed and configured):
mvn -Pdistribution -pl distribution/server-dist -am -Dmaven.test.skip clean install
Resulting release distribution will be in ./distribution/server-dist/target/keycloak-4.1.0.Final.zip archive.
Compiling the sources is described here: https://github.com/keycloak/keycloak/blob/master/docs/building.md
You can download the latest release version 4.X from archive: https://www.keycloak.org/archive/downloads-4.8.3.html

GO API installation fails "evq/chromaticity"

I am trying to install chromaticity on my own machine for testing, and no matter what i do i will always hit the error seen in this picture installation error
I dont know why it happened i tried searching but i found nothing online. my question is does anyone know why it happens? or can point me to the right direction? i have checked the folders and yes there are no GO files in there but i dont see why that is a problem
The api could be found here: https://github.com/evq/chromaticity
This is not an issue (as in bug) on the project, rather an issue due to lack of documentation on how to build the project itself.
If you look at the Makefile file on the root directory, you'll notice that static/static.go is a generated file as part of the build process. Such file is usually not committed to the repo so you'll need to build it yourself. To do so, you'll need to have go-bindata installed.
Here's what you need to do in order to build the project successfully:
Get the go-bindata package
go get -u github.com/jteeuwen/go-bindata/...
Get the project
go get github.com/evq/chromaticity
Go the project root directory
cd [...the chromaticity project root..]
Run make to generate the static/static.go file
make
Build/ install the project
go install
Update:
Noticed from your screenshot that you're using Windows, in that case you may need to workaround the issue of running Makefile in Windows. See here for possible solution: How to run a makefile in Windows?
I've run into the same issue when trying to "get" and then install this project. I looked into the code and there is no trace of Asset() function in github.com/evq/chromaticity/static. Moreover git history does not show any .go files in static/ directory. Personally, I would create issue in the project and/or look for different repo containing desired functionality.

Fast way to rebuild and reload opendaylight bundle

I am developing a bundle for opendaylight. Is there a quick way to just rebuild the bundle without the complete karaf environment?
Thanks in advance!
Max
You can rebuild the bundle, without anything else, by running Maven in the directory containing your bundle’s POM. If you’re on the command-line:
cd your-bundle-directory
mvn compile
(or mvn install etc. depending on what you want to do exactly).

package com.google.protobuf does not exist on OS X Maverick

I am on OS X Mavericks and starting learning about protobuf, i download the example from https://code.google.com/p/protobuf/downloads/list
I am successfully able to create the .java file from the proto but while compiling the existing java code using
make java, i am getting following error
com/example/tutorial/AddressBookProtos.java:91: package com.google.protobuf does not exist
com.google.protobuf.GeneratedMessage
^
com/example/tutorial/AddressBookProtos.java:12: package com.google.protobuf does not exist
extends com.google.protobuf.MessageOrBuilder {
^
com/example/tutorial/AddressBookProtos.java:9: package com.google.protobuf does not exist
com.google.protobuf.ExtensionRegistry registry) {
^
com/example/tutorial/AddressBookProtos.java:2495: package com.google.protobuf.Descriptors does not exist
private static com.google.protobuf.Descriptors.Descriptor
^
com/example/tutorial/AddressBookProtos.java:2498: package com.google.protobuf.GeneratedMessage does not exist
com.google.protobuf.GeneratedMessage.FieldAccessorTable
....
....
Any resolution to this?
Thanks
Met the same problem and finally got it working. Here's what I did(using version 2.6.0) on OSX 10.9:
Do everything java/README.txt tells you to
if maven package succeed, you'll get a protobuf-java-2.6.0.jar under target folder, for me it's /Users/laike9m/Dev/protobuf-2.6.0/java/target/protobuf-java-2.6.0.jar.
create ~/Library/Java/Extensions folder, note: this is platform specific operation, for OS other than OSX it should be $JAVA_HOME/lib/ext
copy protobuf-java-2.6.0.jar to ~/Library/Java/Extensions
Then you should be able to run make java successfully.
You need to include libprotobuf.jar in your CLASSPATH. Follow the instructions under java/README.txt in the Protobuf source package to build it.
What #laike9m suggested only partially worked for me. I definitely tried to do everything java/README.txt as #laike9m suggested. I had to install maven. I used brew to do that (brew install maven). I then built the protocol buffers java source using mvn package. The first time I tried that, it failed due to some obscure-ish error. I built the C++ code using ./configure && make. Next time I tried to build the java code using mvn package it worked. It put the resulting jar in a folder called target. I think went back to the examples area and was able to build the java example using make but I had to modify the Makefile by adding the -classpath... part below:
javac_middleman: AddPerson.java ListPeople.java protoc_middleman
javac -classpath .:../java/target/protobuf-java-2.6.1.jar:$$CLASSPATH AddPerson.java ListPeople.java com/example/tutorial/AddressBookProtos.java
#touch javac_middleman
Download protobuf.jar from below link and add jar file into libs folder.Its work for me.
https://code.google.com/archive/p/android-market-api/downloads

mvn and the make package error

OK. Here's the problem and it's driving me crazy!!!
I followed the instruction online, installed hadoop and when running the text it said snappy local library can't be loaded.
It's said I have to install snappy first and then install hadoop-snappy.
I download snappy-1.0.4 from google code and do the following:
cd ../snappy-1.0.4
./configure
make
sudo make install
Then it's the problem when:
mvn package -Dsnappy.prefix=/usr/local
The post online said by default the snappy should be installed in the /usr/local.
But I got the following error and no matter what I change the path, still get erro:
The goal you specified required a project to execute but there's no POM in the directory. Please verify you invoked the maven from the correct directory.
It's the wrong directory of mvn? Or improper of snappy? And it said lack of pom that should be a .xml that in no where I can find..
Please help!
Alright, so looking at that page, you are in the wrong directory.
The directory you should be in for that step is "hadoop-snappy" which you can see has a pom.xml, you can verify by looking at the github, https://github.com/electrum/hadoop-snappy.
So after you follow these steps from the guide you showed me.
Download it(hadoop-snappy) from GitHub
Install libtool, make sure ‘libtoolize’ works
Install Maven 3 if necessary
Change your directory to hadoop-snappy and run the command you were trying before.

Resources