Document how to use maven from the citec repository server in client projects
|Assignee:||S. Sharma||% Done:|
In order to use RSB inside a client application that is developed with maven, you can use the deployed packages from the citec repository server. This usage pattern should be documented.
fixes #1732: document maven repo usage
Document how to use the RSB versions deployed to the CITEC maven
repository in client projects
Includes patches proposed by Suchit Sharma.
#1 Updated by S. Sharma over 7 years ago
- File 0003-added-steps-for-installation-with-maven.patch added
- % Done changed from 0 to 90
Updated the document and attaching the patch, please review.
#3 Updated by J. Wienke over 7 years ago
I think this doesn't use the repository so far. It should be possible to use RSB from the repo without manually installing jars into your local repository.
You probably needs some configuration like this somewhere:
<repositories> <repository> <id>citec</id> <name>CITEC Maven Repository Server</name> <url>http://repo.cit-ec.uni-bielefeld.de/</url> <layout>default</layout> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>
#4 Updated by S. Sharma over 7 years ago
I am not able to compile it successfully with above repository tag :error rsb does not exist.
I also tried to chnage url but does not work
<name>CITEC Maven Repository Server</name>
#5 Updated by S. Sharma over 7 years ago
The compilation with this <repository> option is throwing errors.
It may be due to incorrect repository url, could you please provide me with the exact url of the repository.
Also , why do we need this <repository> tag appoach instead of the one I used earlier to install?
If we use this , does the system downloads jar from repository every time? if it is, it should be better to install jar on local system.
#6 Updated by J. Wienke over 7 years ago
The whole idea of maven is to automatically pull dependencies from a repository server and to prevent manual work for dependencies. That's the reason why we would like to document that method. The dependencies will usually be cached on your local computer once you compiled your client project, so downloads will not happen all the time.
The configuration fragment with the repository location is correct. I have already used that one and it originates from my
.m2/settings.xml. What are the exact errors?
From your first comment:
<name>CITEC Maven Repository Server</name> <url>http://repo.cit-ec.uni-bielefeld.de/rsb/rsb/0.11-SNAPSHOT/rsb-0.11-20140211.002949-9.jar</url> <layout>default</layout> <releases>
This is not the intended way to use repositories. You only configure the base URL (http://repo.cit-ec.uni-bielefeld.de/) and the remaining thing required to download a jar file are handled through the group, name and version specification of your dependencies.
As we will need to work with maven more often it would be good if you could familiarize yourself with the maven concepts by reading some of the documentation and tutorials. We will get in touch with this over and over again.