From d5656ea69777d1b7a77e3d6129b2a57cc9b85767 Mon Sep 17 00:00:00 2001 From: Andrus Adamchik Date: Sun, 28 Apr 2024 14:17:37 -0400 Subject: [PATCH] relocating to submodule to add client examples --- README.md | 48 ++----------------- bootique-jersey-server/README.md | 48 +++++++++++++++++++ .../assembly.xml | 0 .../config.yml | 0 pom.xml => bootique-jersey-server/pom.xml | 0 .../java/io/bootique/examples/jersey/App.java | 0 .../io/bootique/examples/jersey/HelloApi.java | 0 .../examples/jersey/HelloApiTest.java | 0 8 files changed, 51 insertions(+), 45 deletions(-) create mode 100644 bootique-jersey-server/README.md rename assembly.xml => bootique-jersey-server/assembly.xml (100%) rename config.yml => bootique-jersey-server/config.yml (100%) rename pom.xml => bootique-jersey-server/pom.xml (100%) rename {src => bootique-jersey-server/src}/main/java/io/bootique/examples/jersey/App.java (100%) rename {src => bootique-jersey-server/src}/main/java/io/bootique/examples/jersey/HelloApi.java (100%) rename {src => bootique-jersey-server/src}/test/java/io/bootique/examples/jersey/HelloApiTest.java (100%) diff --git a/README.md b/README.md index 7dc710e..f122d70 100644 --- a/README.md +++ b/README.md @@ -2,55 +2,13 @@ # Bootique 3.x Jersey Examples -This is an example [Bootique](http://bootique.io) REST service app with Jersey. It shows how to create and register REST -endpoints, write integration tests for the REST API, assemble and run the application. - -Different Git branches contain the example code for different versions of Bootique: +Provides examples of [Bootique](https://bootique.io) integration with Jersey. Different Git branches contain the example code for different versions of Bootique: * [3.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/3.x) * [2.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/2.x) * [1.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/1.x) -## Prerequisites - -To build and run the code, ensure you have the following installed on your machine: - -* Java 11 or newer -* Maven - -and then follow these steps: - -## Checkout -``` -git clone git@github.com:bootique-examples/bootique-jersey-examples.git -cd bootique-jersey-examples/ -``` - -## Build, test and package - -Run the following command to build the code, run the tests and package the app: -``` -mvn clean package -``` -This project uses a [runnable jar with lib folder](https://bootique.io/docs/3.x/bootique-docs/#runnable-jar-with-lib) -packaging recipe, so now the app is packaged for distribution as `target/bootique-jersey-examples-3.0.tar.gz` archive. But -there is also the "unpacked" version in the `target` folder that can be used to run the app. - -## Run - -The following command prints a help message with supported options: -``` -java -jar target/bootique-jersey-examples-3.0.jar -``` +## Contents -The following command runs the REST app with the default config. Once the app is started, you can see the results by -going to this URL in the browser: http://127.0.0.1:8080/ -``` -java -jar target/bootique-jersey-examples-3.0.jar --server -``` +* [Jersey Server examples](bootique-jersey-server/) -The following command runs the REST app with a custom config that changes the app port and context, Once the app is -started, you can see the results by going to this URL in the browser: http://127.0.0.1:9000/bq -``` -java -jar target/bootique-jersey-examples-3.0.jar --server --config=config.yml -``` diff --git a/bootique-jersey-server/README.md b/bootique-jersey-server/README.md new file mode 100644 index 0000000..9d9dd58 --- /dev/null +++ b/bootique-jersey-server/README.md @@ -0,0 +1,48 @@ +# Bootique 3.x Jersey Server Example + +This is an example [Bootique](http://bootique.io) REST service app with Jersey. It shows how to create and register REST +endpoints, write integration tests for the REST API, assemble and run the application. + +## Prerequisites + +To build and run the code, ensure you have the following installed on your machine: + +* Java 11 or newer +* Maven + +and then follow these steps: + +## Checkout +``` +git clone git@github.com:bootique-examples/bootique-jersey-examples.git +cd bootique-jersey-examples/bootique-jersey-server/ +``` + +## Build, test and package + +Run the following command to build the code, run the tests and package the app: +``` +mvn clean package +``` +This project uses a [runnable jar with lib folder](https://bootique.io/docs/3.x/bootique-docs/#runnable-jar-with-lib) +packaging recipe, so now the app is packaged for distribution as `target/bootique-jersey-server-3.0.tar.gz` archive. But +there is also the "unpacked" version in the `target` folder that can be used to run the app. + +## Run + +The following command prints a help message with supported options: +``` +java -jar target/bootique-jersey-server-3.0.jar +``` + +The following command runs the REST app with the default config. Once the app is started, you can see the results by +going to this URL in the browser: http://127.0.0.1:8080/ +``` +java -jar target/bootique-jersey-server-3.0.jar --server +``` + +The following command runs the REST app with a custom config that changes the app port and context, Once the app is +started, you can see the results by going to this URL in the browser: http://127.0.0.1:9000/bq +``` +java -jar target/bootique-jersey-server-3.0.jar --server --config=config.yml +``` diff --git a/assembly.xml b/bootique-jersey-server/assembly.xml similarity index 100% rename from assembly.xml rename to bootique-jersey-server/assembly.xml diff --git a/config.yml b/bootique-jersey-server/config.yml similarity index 100% rename from config.yml rename to bootique-jersey-server/config.yml diff --git a/pom.xml b/bootique-jersey-server/pom.xml similarity index 100% rename from pom.xml rename to bootique-jersey-server/pom.xml diff --git a/src/main/java/io/bootique/examples/jersey/App.java b/bootique-jersey-server/src/main/java/io/bootique/examples/jersey/App.java similarity index 100% rename from src/main/java/io/bootique/examples/jersey/App.java rename to bootique-jersey-server/src/main/java/io/bootique/examples/jersey/App.java diff --git a/src/main/java/io/bootique/examples/jersey/HelloApi.java b/bootique-jersey-server/src/main/java/io/bootique/examples/jersey/HelloApi.java similarity index 100% rename from src/main/java/io/bootique/examples/jersey/HelloApi.java rename to bootique-jersey-server/src/main/java/io/bootique/examples/jersey/HelloApi.java diff --git a/src/test/java/io/bootique/examples/jersey/HelloApiTest.java b/bootique-jersey-server/src/test/java/io/bootique/examples/jersey/HelloApiTest.java similarity index 100% rename from src/test/java/io/bootique/examples/jersey/HelloApiTest.java rename to bootique-jersey-server/src/test/java/io/bootique/examples/jersey/HelloApiTest.java