Skip to content

Commit

Permalink
Merge pull request #1490 from odrotbohm
Browse files Browse the repository at this point in the history
* pr/1490:
  Revert optimizations in Spring Modulith dependency setup

Closes gh-1490
  • Loading branch information
mhalbritter committed May 28, 2024
2 parents 43ec67c + 4145dbb commit 038395a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public void customize(Build build) {
dependencies.add("modulith-observability",
modulithDependency("observability").scope(DependencyScope.RUNTIME));
}
boolean persistenceBackendAdded = addEventPublicationRegistryBackend(build);
if (persistenceBackendAdded) {
dependencies.remove("modulith");
}
addEventPublicationRegistryBackend(build);
dependencies.add("modulith-starter-test",
modulithDependency("starter-test").scope(DependencyScope.TEST_COMPILE));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,7 @@ void presenceOfSpringDataModuleAddsModuleEventStarter(String store) {
build.dependencies().add("data-" + store);
this.customizer.customize(build);
assertThat(build.dependencies().ids()).contains("modulith-starter-" + store);
assertThat(build.dependencies().ids()).doesNotContain("modulith");
}

@ParameterizedTest
@ValueSource(strings = { "jdbc", "jpa", "mongodb" })
void presenceOfSpringDataModuleRemovesCoreStarter(String store) {
Build build = createBuild("modulith");
build.dependencies().add("data-" + store);
this.customizer.customize(build);
assertThat(build.dependencies().ids()).doesNotContain("modulith");
assertThat(build.dependencies().ids()).doesNotContain("modulith-starter-core");
}

private Build createBuild(String... dependencies) {
Expand Down

0 comments on commit 038395a

Please sign in to comment.