From bfada4d5b3a6c7f88e69b0f9bd13afc0b73436b6 Mon Sep 17 00:00:00 2001 From: "nikita.smirnov" Date: Tue, 14 May 2024 13:51:51 +0400 Subject: [PATCH] Corrected project structure --- build.gradle | 16 ++++++---------- cradle-admin-tool-cli/build.gradle | 12 ++++++++++-- cradle-admin-tool-core/build.gradle | 5 +++++ .../adm/InvalidConfigurationException.java | 0 .../th2/cradle/adm/modes/AbstractMode.java | 2 +- .../th2/cradle/adm/modes/GetAllBooksMode.java | 4 ++-- .../th2/cradle/adm/modes/GetBookInfoMode.java | 4 ++-- .../th2/cradle/adm/modes/InitException.java | 0 .../cradle/adm/modes/ListAllBookSchemasMode.java | 2 +- .../cradle/adm/modes/NewBookCreationMode.java | 3 +-- .../cradle/adm/modes/NewPageCreationMode.java | 2 +- .../th2/cradle/adm/modes/RemovePageMode.java | 2 +- .../th2/cradle/adm/modes/ResultConverter.java | 4 ++-- .../th2/cradle/adm/modes/UpdatePageMode.java | 2 +- .../th2/cradle/adm/params/CmdParams.java | 0 .../th2/cradle/adm/params/GetAllBooksParams.java | 0 .../th2/cradle/adm/params/GetBookInfoParams.java | 0 .../cradle/adm/params/NewBookCreationParams.java | 0 .../th2/cradle/adm/params/NewPageParams.java | 0 .../exactpro/th2/cradle/adm/params/NoParams.java | 0 .../th2/cradle/adm/params/ParamUtils.java | 0 .../th2/cradle/adm/params/RemovePageParams.java | 0 .../th2/cradle/adm/params/UpdatePageParams.java | 0 .../th2/cradle/adm/results/BookSchemaInfo.java | 0 .../th2/cradle/adm/results/BooksListInfo.java | 0 .../adm/results/ResultBookDetailedInfo.java | 0 .../th2/cradle/adm/results/ResultBookInfo.java | 0 .../th2/cradle/adm/results/ResultPageInfo.java | 0 .../th2/cradle/adm/results/SimpleResult.java | 0 cradle-admin-tool-http/build.gradle | 16 +++++++++++----- cradle-admin-tool-test/build.gradle | 5 +++++ .../th2/cradle/adm/TestBookPageBuilder.java | 0 settings.gradle | 2 ++ 33 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 cradle-admin-tool-core/build.gradle rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/InvalidConfigurationException.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/InitException.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java (99%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/CmdParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/GetAllBooksParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/GetBookInfoParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/NewBookCreationParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/NewPageParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/NoParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/ParamUtils.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/RemovePageParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/params/UpdatePageParams.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/BookSchemaInfo.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/BooksListInfo.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/ResultBookDetailedInfo.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/ResultBookInfo.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/ResultPageInfo.java (100%) rename {src => cradle-admin-tool-core/src}/main/java/com/exactpro/th2/cradle/adm/results/SimpleResult.java (100%) create mode 100644 cradle-admin-tool-test/build.gradle rename {src/test => cradle-admin-tool-test/src/main}/java/com/exactpro/th2/cradle/adm/TestBookPageBuilder.java (100%) diff --git a/build.gradle b/build.gradle index aa7d343..1536c78 100644 --- a/build.gradle +++ b/build.gradle @@ -41,21 +41,17 @@ allprojects { } dependencies { - implementation("com.exactpro.th2:common:$commonVersion") { - exclude group: 'com.squareup.okhttp3', module: 'okhttp' - } - implementation "com.exactpro.th2:cradle-core:$cradleVersion" - implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion" - implementation 'org.apache.commons:commons-lang3' - implementation "org.slf4j:slf4j-api" - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' - testImplementation 'org.mockito:mockito-inline:5.2.0' testImplementation 'org.mockito:mockito-junit-jupiter:5.10.0' + testImplementation 'com.exactpro.th2:junit-jupiter-integration:0.0.1' + + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' + + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2' } test { diff --git a/cradle-admin-tool-cli/build.gradle b/cradle-admin-tool-cli/build.gradle index 657a064..d038e82 100644 --- a/cradle-admin-tool-cli/build.gradle +++ b/cradle-admin-tool-cli/build.gradle @@ -3,10 +3,18 @@ plugins { } dependencies { - implementation project(':') + implementation project(':cradle-admin-tool-core') + + implementation("com.exactpro.th2:common:$commonVersion") { + exclude group: 'com.squareup.okhttp3', module: 'okhttp' + } + + implementation "com.exactpro.th2:cradle-core:$cradleVersion" + implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion" + implementation 'commons-cli:commons-cli:1.7.0' - testImplementation project(':').sourceSets.test.output + testImplementation project(':cradle-admin-tool-test') } application { diff --git a/cradle-admin-tool-core/build.gradle b/cradle-admin-tool-core/build.gradle new file mode 100644 index 0000000..dccbb95 --- /dev/null +++ b/cradle-admin-tool-core/build.gradle @@ -0,0 +1,5 @@ +dependencies { + implementation "com.exactpro.th2:cradle-core:$cradleVersion" + implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion" + implementation 'org.apache.commons:commons-lang3' +} \ No newline at end of file diff --git a/src/main/java/com/exactpro/th2/cradle/adm/InvalidConfigurationException.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/InvalidConfigurationException.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/InvalidConfigurationException.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/InvalidConfigurationException.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java index 83f43c8..2234631 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/AbstractMode.java @@ -16,8 +16,8 @@ package com.exactpro.th2.cradle.adm.modes; -import com.exactpro.cradle.CradleStorage; import com.exactpro.th2.cradle.adm.results.SimpleResult; +import com.exactpro.cradle.CradleStorage; public abstract class AbstractMode { diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java index 8da235a..d08ca51 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetAllBooksMode.java @@ -16,11 +16,11 @@ package com.exactpro.th2.cradle.adm.modes; +import com.exactpro.th2.cradle.adm.results.BooksListInfo; +import com.exactpro.th2.cradle.adm.results.ResultBookInfo; import com.exactpro.cradle.BookInfo; import com.exactpro.cradle.utils.CradleStorageException; import com.exactpro.th2.cradle.adm.params.GetAllBooksParams; -import com.exactpro.th2.cradle.adm.results.BooksListInfo; -import com.exactpro.th2.cradle.adm.results.ResultBookInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java index 7ca6eed..1bf308f 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/GetBookInfoMode.java @@ -16,12 +16,12 @@ package com.exactpro.th2.cradle.adm.modes; +import com.exactpro.th2.cradle.adm.results.BooksListInfo; +import com.exactpro.th2.cradle.adm.results.ResultBookDetailedInfo; import com.exactpro.cradle.BookInfo; import com.exactpro.cradle.PageInfo; import com.exactpro.cradle.utils.CradleStorageException; import com.exactpro.th2.cradle.adm.params.GetBookInfoParams; -import com.exactpro.th2.cradle.adm.results.BooksListInfo; -import com.exactpro.th2.cradle.adm.results.ResultBookDetailedInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/InitException.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/InitException.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/InitException.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/InitException.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java index 466939c..9e85ca9 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ListAllBookSchemasMode.java @@ -1,8 +1,8 @@ package com.exactpro.th2.cradle.adm.modes; +import com.exactpro.th2.cradle.adm.results.BookSchemaInfo; import com.exactpro.cradle.BookListEntry; import com.exactpro.th2.cradle.adm.params.NoParams; -import com.exactpro.th2.cradle.adm.results.BookSchemaInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java similarity index 99% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java index 0112ddd..377a0ac 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewBookCreationMode.java @@ -16,13 +16,12 @@ package com.exactpro.th2.cradle.adm.modes; -import com.exactpro.th2.cradle.adm.params.NewBookCreationParams; import com.exactpro.th2.cradle.adm.results.SimpleResult; +import com.exactpro.th2.cradle.adm.params.NewBookCreationParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.time.Instant; -import java.util.UUID; public class NewBookCreationMode extends AbstractMode { diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java index 02dd171..e092cd8 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/NewPageCreationMode.java @@ -16,8 +16,8 @@ package com.exactpro.th2.cradle.adm.modes; -import com.exactpro.th2.cradle.adm.params.NewPageParams; import com.exactpro.th2.cradle.adm.results.SimpleResult; +import com.exactpro.th2.cradle.adm.params.NewPageParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java index 896c4af..27a2491 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/RemovePageMode.java @@ -16,12 +16,12 @@ package com.exactpro.th2.cradle.adm.modes; +import com.exactpro.th2.cradle.adm.results.SimpleResult; import com.exactpro.cradle.PageId; import com.exactpro.cradle.PageInfo; import com.exactpro.cradle.counters.Interval; import com.exactpro.cradle.utils.CradleStorageException; import com.exactpro.th2.cradle.adm.params.RemovePageParams; -import com.exactpro.th2.cradle.adm.results.SimpleResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java index 881bbe5..79783ce 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/ResultConverter.java @@ -16,10 +16,10 @@ package com.exactpro.th2.cradle.adm.modes; -import com.exactpro.cradle.BookInfo; -import com.exactpro.cradle.PageInfo; import com.exactpro.th2.cradle.adm.results.ResultBookInfo; import com.exactpro.th2.cradle.adm.results.ResultPageInfo; +import com.exactpro.cradle.BookInfo; +import com.exactpro.cradle.PageInfo; public class ResultConverter { diff --git a/src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java index c005a20..e5d81e8 100644 --- a/src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java +++ b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/modes/UpdatePageMode.java @@ -1,8 +1,8 @@ package com.exactpro.th2.cradle.adm.modes; +import com.exactpro.th2.cradle.adm.results.SimpleResult; import com.exactpro.cradle.PageInfo; import com.exactpro.th2.cradle.adm.params.UpdatePageParams; -import com.exactpro.th2.cradle.adm.results.SimpleResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/CmdParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/CmdParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/CmdParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/CmdParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/GetAllBooksParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/GetAllBooksParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/GetAllBooksParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/GetAllBooksParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/GetBookInfoParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/GetBookInfoParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/GetBookInfoParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/GetBookInfoParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/NewBookCreationParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NewBookCreationParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/NewBookCreationParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NewBookCreationParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/NewPageParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NewPageParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/NewPageParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NewPageParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/NoParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NoParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/NoParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/NoParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/ParamUtils.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/ParamUtils.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/ParamUtils.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/ParamUtils.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/RemovePageParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/RemovePageParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/RemovePageParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/RemovePageParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/params/UpdatePageParams.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/UpdatePageParams.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/params/UpdatePageParams.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/params/UpdatePageParams.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/BookSchemaInfo.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/BookSchemaInfo.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/BookSchemaInfo.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/BookSchemaInfo.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/BooksListInfo.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/BooksListInfo.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/BooksListInfo.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/BooksListInfo.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookDetailedInfo.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookDetailedInfo.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookDetailedInfo.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookDetailedInfo.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookInfo.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookInfo.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookInfo.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultBookInfo.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/ResultPageInfo.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultPageInfo.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/ResultPageInfo.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/ResultPageInfo.java diff --git a/src/main/java/com/exactpro/th2/cradle/adm/results/SimpleResult.java b/cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/SimpleResult.java similarity index 100% rename from src/main/java/com/exactpro/th2/cradle/adm/results/SimpleResult.java rename to cradle-admin-tool-core/src/main/java/com/exactpro/th2/cradle/adm/results/SimpleResult.java diff --git a/cradle-admin-tool-http/build.gradle b/cradle-admin-tool-http/build.gradle index 18e09d9..068ef36 100644 --- a/cradle-admin-tool-http/build.gradle +++ b/cradle-admin-tool-http/build.gradle @@ -8,17 +8,23 @@ ext { } dependencies { - implementation project(':') + implementation project(':cradle-admin-tool-core') + implementation("com.exactpro.th2:common:$commonVersion") { + exclude group: 'com.squareup.okhttp3', module: 'okhttp' + } + implementation "com.exactpro.th2:cradle-core:$cradleVersion" + implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion" + implementation "org.eclipse.jetty:jetty-server:${jettyVersion}" implementation "org.eclipse.jetty:jetty-servlet:${jettyVersion}" + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2' - testImplementation project(':').sourceSets.test.output - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2' + implementation 'org.apache.commons:commons-lang3' + + testImplementation project(':cradle-admin-tool-test') testImplementation "org.eclipse.jetty:jetty-http:${jettyVersion}:tests" testImplementation "org.eclipse.jetty:jetty-util:${jettyVersion}" - - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2' } application { diff --git a/cradle-admin-tool-test/build.gradle b/cradle-admin-tool-test/build.gradle new file mode 100644 index 0000000..dccbb95 --- /dev/null +++ b/cradle-admin-tool-test/build.gradle @@ -0,0 +1,5 @@ +dependencies { + implementation "com.exactpro.th2:cradle-core:$cradleVersion" + implementation "com.exactpro.th2:cradle-cassandra:$cradleVersion" + implementation 'org.apache.commons:commons-lang3' +} \ No newline at end of file diff --git a/src/test/java/com/exactpro/th2/cradle/adm/TestBookPageBuilder.java b/cradle-admin-tool-test/src/main/java/com/exactpro/th2/cradle/adm/TestBookPageBuilder.java similarity index 100% rename from src/test/java/com/exactpro/th2/cradle/adm/TestBookPageBuilder.java rename to cradle-admin-tool-test/src/main/java/com/exactpro/th2/cradle/adm/TestBookPageBuilder.java diff --git a/settings.gradle b/settings.gradle index 0349831..40ea77a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'th2-cradle-admin-tool' include 'cradle-admin-tool-http' +include 'cradle-admin-tool-core' +include 'cradle-admin-tool-test' include 'cradle-admin-tool-cli'