From 7abe094c60c2753ff7fce99883db505104d71c5f Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:00:02 +0000 Subject: [PATCH 01/30] Update repo --- pom.xml | 21 +++++++ .../controllers/OrderControllerTests.java | 56 +++++++++---------- .../controllers/SpreadControllerTests.java | 56 +++++++++---------- 3 files changed, 77 insertions(+), 56 deletions(-) diff --git a/pom.xml b/pom.xml index 6ac3704..bf6a895 100644 --- a/pom.xml +++ b/pom.xml @@ -16,11 +16,32 @@ 1.8 + + + + Repos + + + central + https://repo1.maven.org/maven2 + true + true + + + github + GitHub OWNER Apache Maven Packages + https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core + + + + + net.laffyco.java-matching-engine core 0.0.1 + compile org.springframework.boot diff --git a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java index 72c05bf..99ea1b4 100644 --- a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java +++ b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java @@ -1,28 +1,28 @@ -package net.laffyco.javamatchingengine.restapi.controllers; - -import javax.annotation.Resource; - -import org.mockito.InjectMocks; -import org.mockito.Mock; - -import net.laffyco.javamatchingengine.core.api.OrderInterface; - -/** - * Tests the OrderController. - * - * @author Laffini - * - */ -public class OrderControllerTests { - - @Mock - private OrderInterface orderInterface; - - @InjectMocks - @Resource - private OrderController orderController; - - // TODO: Tests for each end point verifying that the correct method in the - // OrderInterface was called. - -} +//package net.laffyco.javamatchingengine.restapi.controllers; +// +//import javax.annotation.Resource; +// +//import org.mockito.InjectMocks; +//import org.mockito.Mock; +// +//import net.laffyco.javamatchingengine.core.api.OrderInterface; +// +///** +// * Tests the OrderController. +// * +// * @author Laffini +// * +// */ +//public class OrderControllerTests { +// +// @Mock +// private OrderInterface orderInterface; +// +// @InjectMocks +// @Resource +// private OrderController orderController; +// +// // TODO: Tests for each end point verifying that the correct method in the +// // OrderInterface was called. +// +//} diff --git a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java index 1b20715..d4cc690 100644 --- a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java +++ b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java @@ -1,28 +1,28 @@ -package net.laffyco.javamatchingengine.restapi.controllers; - -import javax.annotation.Resource; - -import org.mockito.InjectMocks; -import org.mockito.Mock; - -import net.laffyco.javamatchingengine.core.api.SpreadInterface; - -/** - * Tests the SpreadController. - * - * @author Laffini - * - */ -public class SpreadControllerTests { - - @Mock - private SpreadInterface spreadInterface; - - @InjectMocks - @Resource - private SpreadController spreadController; - - // TODO: Tests for each end point verifying that the correct method in the - // SpreadController was called. - -} +//package net.laffyco.javamatchingengine.restapi.controllers; +// +//import javax.annotation.Resource; +// +//import org.mockito.InjectMocks; +//import org.mockito.Mock; +// +//import net.laffyco.javamatchingengine.core.api.SpreadInterface; +// +///** +// * Tests the SpreadController. +// * +// * @author Laffini +// * +// */ +//public class SpreadControllerTests { +// +// @Mock +// private SpreadInterface spreadInterface; +// +// @InjectMocks +// @Resource +// private SpreadController spreadController; +// +// // TODO: Tests for each end point verifying that the correct method in the +// // SpreadController was called. +// +//} From 02b763d12c182abdfed96c32588978418442287f Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:01:54 +0000 Subject: [PATCH 02/30] Update pom.xml --- pom.xml | 71 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/pom.xml b/pom.xml index bf6a895..f9812fb 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,13 @@ - 4.0.0 org.springframework.boot spring-boot-starter-parent 2.6.0 - + net.laffyco.java-matching-engine rest-api @@ -16,33 +17,33 @@ 1.8 - - - - Repos - - - central - https://repo1.maven.org/maven2 - true - true - - - github - GitHub OWNER Apache Maven Packages - https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core - - - - - + + + + central + https://repo1.maven.org/maven2 + + true + + + true + + + + github + GitHub OWNER Apache Maven Packages + https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core + + + + - - net.laffyco.java-matching-engine - core - 0.0.1 - compile - + + net.laffyco.java-matching-engine + core + 0.0.1 + compile + org.springframework.boot spring-boot-starter-web @@ -68,13 +69,13 @@ - + - - github - GitHub Laffini Apache Maven Packages - https://maven.pkg.github.com/Laffini/Java-Matching-Engine-REST-API - - + + github + GitHub Laffini Apache Maven Packages + https://maven.pkg.github.com/Laffini/Java-Matching-Engine-REST-API + + From c3e353485aae85abc4f2560df89c8a0f78fcb106 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:06:26 +0000 Subject: [PATCH 03/30] Create settings.xml --- settings.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 settings.xml diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..10b3a9c --- /dev/null +++ b/settings.xml @@ -0,0 +1,39 @@ + + + + github + + + + + github + + + central + https://repo1.maven.org/maven2 + + true + + + true + + + + github + GitHub OWNER Apache Maven Packages + https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core + + + + + + + + github + ${env.GITHUB_USERNAME} + ${env.GITHUB_TOKEN} + + + \ No newline at end of file From 738f3f16b1ec9f83b67ab754bc9bd1ef071f35f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:07:49 +0000 Subject: [PATCH 04/30] Update settings.xml --- settings.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/settings.xml b/settings.xml index 10b3a9c..40ebdda 100644 --- a/settings.xml +++ b/settings.xml @@ -10,16 +10,6 @@ github - - central - https://repo1.maven.org/maven2 - - true - - - true - - github GitHub OWNER Apache Maven Packages From aaa8092740f86d6f09794f937ac81b77d53b348a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:09:51 +0000 Subject: [PATCH 05/30] Update pom.xml --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index f9812fb..17aef2a 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,12 @@ github GitHub OWNER Apache Maven Packages https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core + + true + + + true + From a621f40890e8b665733a0d09f928855b5d30e26c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:13:07 +0000 Subject: [PATCH 06/30] Update maven.yml --- .github/workflows/maven.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 942f861..ffe5068 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,4 +21,6 @@ jobs: with: java-version: 1.8 - name: Build with Maven - run: mvn -B package --file pom.xml \ No newline at end of file + env: + token: ${{ secrets.GITHUB_TOKEN }} + run: mvn -s settings.xml -B package --file pom.xml \ No newline at end of file From 7cb5db368fda58267c349ff4ca007973261c0a9e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:17:49 +0000 Subject: [PATCH 07/30] Update settings.xml --- settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.xml b/settings.xml index 40ebdda..68558d0 100644 --- a/settings.xml +++ b/settings.xml @@ -22,8 +22,8 @@ github - ${env.GITHUB_USERNAME} - ${env.GITHUB_TOKEN} + laffini + ${env.token} \ No newline at end of file From b7ad28d9c1e2a3072c770fe2c04d45b44cc883b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:20:26 +0000 Subject: [PATCH 08/30] Update settings.xml --- settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.xml b/settings.xml index 68558d0..2b0f593 100644 --- a/settings.xml +++ b/settings.xml @@ -22,7 +22,7 @@ github - laffini + Laffini ${env.token} From 02e0ed6889d0c90abbd2013f21661a484e879ba6 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:47:00 +0000 Subject: [PATCH 09/30] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ffe5068..444b179 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,4 +23,4 @@ jobs: - name: Build with Maven env: token: ${{ secrets.GITHUB_TOKEN }} - run: mvn -s settings.xml -B package --file pom.xml \ No newline at end of file + run: mvn install -s settings.xml -B package --file pom.xml \ No newline at end of file From 83b9db5aaaecf92ebb6813f08f4961f17517d900 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 14:59:30 +0000 Subject: [PATCH 10/30] Attempt to fix CI issues --- .github/workflows/maven.yml | 6 +++++- settings.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 444b179..222df19 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -20,7 +20,11 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + server-id: github + server-username: GITHUB_USER_REF + server-password: GITHUB_TOKEN_REF - name: Build with Maven env: - token: ${{ secrets.GITHUB_TOKEN }} + GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} + GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} run: mvn install -s settings.xml -B package --file pom.xml \ No newline at end of file diff --git a/settings.xml b/settings.xml index 2b0f593..f782444 100644 --- a/settings.xml +++ b/settings.xml @@ -23,7 +23,7 @@ github Laffini - ${env.token} + ${env.GITHUB_TOKEN_REF} \ No newline at end of file From f92f78b92de60f7b9f15c609f4d422c301340da0 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:01:14 +0000 Subject: [PATCH 11/30] Update pom.xml --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 17aef2a..3da0864 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,6 @@ net.laffyco.java-matching-engine core 0.0.1 - compile org.springframework.boot From bf11a897e03ce2ee5ffb3203a0824a2d43e1f25b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:06:33 +0000 Subject: [PATCH 12/30] Add -X for debugging --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 222df19..1b0c98f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,4 +27,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn install -s settings.xml -B package --file pom.xml \ No newline at end of file + run: mvn install -s settings.xml -B package --file pom.xml -X \ No newline at end of file From 97420e8f345a9bb6f3503cf5e2bc33a10cad40d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:10:36 +0000 Subject: [PATCH 13/30] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1b0c98f..0e3dc4b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,4 +27,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn install -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file From 857952bde762826565e4df95b0fcc4f4391a1bcc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:34:33 +0000 Subject: [PATCH 14/30] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3da0864..0828de6 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ net.laffyco.java-matching-engine core - 0.0.1 + 0.0.1-SNAPSHOT org.springframework.boot From f0a8265489be44133273e59b7829ad4c71988209 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:36:03 +0000 Subject: [PATCH 15/30] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e3dc4b..ea176f3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,4 +27,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn -s settings.xml -B package --file pom.xml -X \ No newline at end of file From 259d46a681eaea7ff49b2cf9db8a7971748769c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:49:23 +0000 Subject: [PATCH 16/30] Classpath check --- .classpath | 32 ++++++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .classpath diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..d575057 --- /dev/null +++ b/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore index 549e00a..d120483 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ target/ ### STS ### .apt_generated -.classpath .factorypath .project .settings From 31858cc9ee9327eb18a9a8bce0a90471b0d20850 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 21 Nov 2021 15:56:03 +0000 Subject: [PATCH 17/30] Compile scope --- .gitignore | 1 + pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d120483..c132b52 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ target/ .settings .springBeans .sts4-cache +.classpath ### IntelliJ IDEA ### .idea diff --git a/pom.xml b/pom.xml index 0828de6..b4259b1 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,7 @@ net.laffyco.java-matching-engine core 0.0.1-SNAPSHOT + compile org.springframework.boot From 9fc81ea4263dc1e4414b8909a2ae168e091f4e55 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Nov 2021 10:06:52 +0000 Subject: [PATCH 18/30] Package name check --- .../restapi/controllers/OrderController.java | 6 +++--- .../restapi/controllers/SpreadController.java | 2 +- .../restapi/controllers/OrderControllerTests.java | 2 +- .../restapi/controllers/SpreadControllerTests.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java index 3d3b488..60ca0b6 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java @@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import net.laffyco.javamatchingengine.core.api.OrderInterface; -import net.laffyco.javamatchingengine.core.engine.Order; -import net.laffyco.javamatchingengine.core.engine.Side; +import net.laffyco.java-matching-engine.core.api.OrderInterface; +import net.laffyco.java-matching-engine.core.engine.Order; +import net.laffyco.java-matching-engine.core.engine.Side; /** * Controller for orders. diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java index 0ee5f3b..82148c8 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import net.laffyco.javamatchingengine.core.api.SpreadInterface; +import net.laffyco.java-matching-engine.core.api.SpreadInterface; /** * Spread controller. diff --git a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java index 99ea1b4..702989c 100644 --- a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java +++ b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/OrderControllerTests.java @@ -5,7 +5,7 @@ //import org.mockito.InjectMocks; //import org.mockito.Mock; // -//import net.laffyco.javamatchingengine.core.api.OrderInterface; +//import net.laffyco.java-matching-engine.core.api.OrderInterface; // ///** // * Tests the OrderController. diff --git a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java index d4cc690..13af6a3 100644 --- a/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java +++ b/src/test/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadControllerTests.java @@ -5,7 +5,7 @@ //import org.mockito.InjectMocks; //import org.mockito.Mock; // -//import net.laffyco.javamatchingengine.core.api.SpreadInterface; +//import net.laffyco.java-matching-engine.core.api.SpreadInterface; // ///** // * Tests the SpreadController. From ea626b55a85869e27021a49db5046b303d446e28 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Nov 2021 16:49:17 +0000 Subject: [PATCH 19/30] Renaming packages --- .../restapi/controllers/OrderController.java | 6 +++--- .../restapi/controllers/SpreadController.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java index 60ca0b6..3d3b488 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java @@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import net.laffyco.java-matching-engine.core.api.OrderInterface; -import net.laffyco.java-matching-engine.core.engine.Order; -import net.laffyco.java-matching-engine.core.engine.Side; +import net.laffyco.javamatchingengine.core.api.OrderInterface; +import net.laffyco.javamatchingengine.core.engine.Order; +import net.laffyco.javamatchingengine.core.engine.Side; /** * Controller for orders. diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java index 82148c8..0ee5f3b 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import net.laffyco.java-matching-engine.core.api.SpreadInterface; +import net.laffyco.javamatchingengine.core.api.SpreadInterface; /** * Spread controller. From 5985cc0377f4121d4e9cab76f1470e2642bfa1ff Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Nov 2021 16:50:41 +0000 Subject: [PATCH 20/30] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ea176f3..0e3dc4b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,4 +27,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file From 345c0c93934001c109a4496d9b4fee466255f780 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Nov 2021 09:47:34 +0000 Subject: [PATCH 21/30] Remove redundant scope --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4259b1..0828de6 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,6 @@ net.laffyco.java-matching-engine core 0.0.1-SNAPSHOT - compile org.springframework.boot From 36d3a11d7be7180c3b0928c158fcf964e4480888 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 16:48:52 +0000 Subject: [PATCH 22/30] Create build.yml --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a5d49fd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml From 43eb1a5324938731d2691f9a6a648b537f650c46 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 16:51:57 +0000 Subject: [PATCH 23/30] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5d49fd..c05b17d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,4 +23,4 @@ jobs: distribution: 'adopt' cache: maven - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -s settings.xml -B package --file pom.xml From 1807a45ecfa8bbe989f9ef7f227d2b6fae550c16 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 17:08:31 +0000 Subject: [PATCH 24/30] Update build.yml --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c05b17d..1fb4a17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,5 +22,11 @@ jobs: java-version: '11' distribution: 'adopt' cache: maven + server-id: github + server-username: GITHUB_USER_REF + server-password: GITHUB_TOKEN_REF - name: Build with Maven + env: + GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} + GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} run: mvn -s settings.xml -B package --file pom.xml From d9fe63dbded7265f88e819073783988f689c4820 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 10:51:18 +0000 Subject: [PATCH 25/30] Update .classpath --- .classpath | 1 + 1 file changed, 1 insertion(+) diff --git a/.classpath b/.classpath index d575057..fc790a6 100644 --- a/.classpath +++ b/.classpath @@ -28,5 +28,6 @@ + From a4c4c29629f0830f0c3278dbb92ad150a7e0a88a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 10:55:54 +0000 Subject: [PATCH 26/30] Copy dependencies --- pom.xml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 0828de6..f5158c2 100644 --- a/pom.xml +++ b/pom.xml @@ -34,11 +34,11 @@ GitHub OWNER Apache Maven Packages https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core - true - - - true - + true + + + true + @@ -72,6 +72,24 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory} + false + true + + + + From 883a894ed19d3628c274ded1abba83004235b844 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 11:10:32 +0000 Subject: [PATCH 27/30] Remove spring plugin --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f5158c2..c34d74d 100644 --- a/pom.xml +++ b/pom.xml @@ -69,8 +69,8 @@ - org.springframework.boot - spring-boot-maven-plugin + org.apache.maven.plugins + maven-surefire-plugin org.apache.maven.plugins From ce0a97ec9393ae6ac6456b4cb34af1b5ce1a0166 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 11:11:46 +0000 Subject: [PATCH 28/30] Remove duplicated action --- .github/workflows/build.yml | 32 -------------------------------- .github/workflows/maven.yml | 12 +++++++----- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1fb4a17..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - cache: maven - server-id: github - server-username: GITHUB_USER_REF - server-password: GITHUB_TOKEN_REF - - name: Build with Maven - env: - GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} - GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn -s settings.xml -B package --file pom.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e3dc4b..1fb4a17 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Java CI with Maven @@ -16,10 +16,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: '11' + distribution: 'adopt' + cache: maven server-id: github server-username: GITHUB_USER_REF server-password: GITHUB_TOKEN_REF @@ -27,4 +29,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn -s settings.xml -B package --file pom.xml From 46581485e2188e398b044b8a066ff19b2ae797ec Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 14:05:10 +0000 Subject: [PATCH 29/30] Update to JDK 17 --- .classpath | 7 +------ .github/workflows/maven.yml | 4 ++-- pom.xml | 20 +------------------- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/.classpath b/.classpath index fc790a6..6fd6b4f 100644 --- a/.classpath +++ b/.classpath @@ -18,16 +18,11 @@ - - - - - - + diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1fb4a17..e855b3f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'adopt' cache: maven server-id: github diff --git a/pom.xml b/pom.xml index c34d74d..571f108 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ rest-api Rest API for the Java Matching Engine - 1.8 + 17 @@ -72,24 +72,6 @@ org.apache.maven.plugins maven-surefire-plugin - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - ${project.build.directory} - false - true - - - - From 9e16ae1b83a6e89d21a94c7c924e1610b835d20f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Dec 2021 09:03:08 +0000 Subject: [PATCH 30/30] URL best practices --- README.md | 16 ++++++++-------- .../restapi/controllers/OrderController.java | 2 +- .../restapi/controllers/SpreadController.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1669634..41da75f 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ User A creates a buy order of 2 items (e.g. 2 shares, 2 bitcoin, etc) with a pri ##### Request ``` -POST /order/ - ?side=BUY - &amount=2 - &price=5 +POST /api/v1/order/ + ?side=BUY + &amount=2 + &price=5 ``` ##### Response @@ -67,10 +67,10 @@ User B creates a sell order of 2 items with a price of 5. ##### Request ``` -POST /order/ - ?side=SELL - &amount=2 - &price=5 +POST api/v1//order/ + ?side=SELL + &amount=2 + &price=5 ``` ##### Response diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java index 3d3b488..071ae08 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java @@ -25,7 +25,7 @@ * */ @RestController -@RequestMapping("/order") +@RequestMapping("/api/v1/order") public class OrderController { /** diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java index 0ee5f3b..de6e598 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java @@ -16,7 +16,7 @@ * */ @RestController -@RequestMapping("/spread") +@RequestMapping("/api/v1/spread") public class SpreadController { /**