libraries-of-the-world
Download the project
-
Download the target file form releases
-
Extract the folder
tar -xzvf target.tar.gz
Run the server
java -cp target/libraries-of-the-world-1.0-SNAPSHOT.jar server.infrastructure.<Server Main> port_number file_repository_path
Example
java -cp target/libraries-of-the-world-1.0-SNAPSHOT.jar server.infrastructure.ServerLibraryA 3000 target/classes/templates/library-template.xml
Run the client
First you should define the libraries at libraries.json in the directory where you are running the app
{
"currentLibrary": {
"name": "Librería B",
"address": {
"url": "192.168.1.97",
"port": 3000
}
},
"libraries": [
{
"name": "Librería A",
"address": {
"url": "192.168.1.100",
"port": 3000
}
},
{
"name": "Librería B",
"address": {
"url": "192.168.1.97",
"port": 3000
}
},
{
"name": "Librería C",
"address": {
"url": "192.168.1.200",
"port": 3000
}
}
]
}
Then you can run the client with
java -cp target/libraries-of-the-world-1.0-SNAPSHOT-jar-with-dependencies.jar application.Main file_repository_path
###Example
java -cp target/libraries-of-the-world-1.0-SNAPSHOT-jar-with-dependencies.jar application.Main target/classes/templates/library-template.xml