GH-28 - Consolidate sample and integration tests module.
This commit is contained in:
1
pom.xml
1
pom.xml
@@ -93,7 +93,6 @@ limitations under the License.
|
||||
</activation>
|
||||
|
||||
<modules>
|
||||
<module>spring-modulith-sample</module>
|
||||
<module>spring-modulith-integration-test</module>
|
||||
</modules>
|
||||
|
||||
|
||||
@@ -24,13 +24,6 @@
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-sample</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.structurizr</groupId>
|
||||
<artifactId>structurizr-core</artifactId>
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-test</artifactId>
|
||||
@@ -24,20 +30,28 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-sample</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-docs</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jmolecules</groupId>
|
||||
<artifactId>jmolecules-events</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<artifactId>micrometer-tracing</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Testing -->
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
= Modulith
|
||||
|
||||
== Overview
|
||||
|
||||
include::jQA:Summary[]
|
||||
|
||||
[[default]]
|
||||
[role=group,includesConcepts="modulith:ModuleDependencies,modulith:ModuleExposesType"]
|
||||
== Reports
|
||||
|
||||
[[modulith:ModulithApplication]]
|
||||
[source,cypher,role=concept]
|
||||
.Classes annotated by `org.springframework.modulith.Modulith` are labeled with `Modulith` and `Application`.
|
||||
----
|
||||
MATCH
|
||||
(:Artifact)-[:CONTAINS]->(modulith:Type)-[:ANNOTATED_BY]->()-[:OF_TYPE]->(:Type{fqn:"org.springframework.modulith.Modulith"})
|
||||
SET
|
||||
modulith:Modulith:Application
|
||||
RETURN
|
||||
modulith as Modulith
|
||||
----
|
||||
|
||||
[[modulith:Module]]
|
||||
[source,cypher,role=concept,requiresConcepts="modulith:ModulithApplication"]
|
||||
.Each package that is located within the same package as the Modulith application class is labeled with `Module`.
|
||||
----
|
||||
MATCH
|
||||
(root:Package)-[:CONTAINS]->(modulith:Modulith:Application),
|
||||
(root)-[:CONTAINS]->(module:Package)
|
||||
OPTIONAL MATCH
|
||||
(module)-[:CONTAINS]->(:Type{name:"package-info"})-[:ANNOTATED_BY]->(moduleInfo),
|
||||
(moduleInfo)-[:OF_TYPE]->(:Type{fqn:"org.springframework.modulith.Module"}),
|
||||
(moduleInfo)-[:HAS]->(displayName:Value{name:"displayName"})
|
||||
SET
|
||||
module:Module
|
||||
SET
|
||||
module.displayName = coalesce(displayName.value, module.name)
|
||||
RETURN
|
||||
module.displayName as Module
|
||||
ORDER BY
|
||||
Module
|
||||
----
|
||||
|
||||
[[modulith:ModuleDependencies]]
|
||||
[source,cypher,role=concept,requiresConcepts="modulith:Module",reportType="plantuml-component-diagram"]
|
||||
.A dependency between two modules exists if there's a type dependency between both. The module dependency is represented by `DEPENDS_ON_MODULE` relationships having a `weight` property indicating the degree of coupling.
|
||||
----
|
||||
MATCH
|
||||
(module1:Module)-[:CONTAINS*]->(type1:Type),
|
||||
(module2:Module)-[:CONTAINS*]->(type2:Type),
|
||||
(type1)-[dependsOn:DEPENDS_ON]->(type2)
|
||||
WHERE
|
||||
module1 <> module2
|
||||
WITH
|
||||
module1, module2, count(dependsOn) as weight
|
||||
MERGE
|
||||
(module1)-[dependsOnModule:DEPENDS_ON_MODULE]->(module2)
|
||||
SET
|
||||
dependsOnModule.weight = weight
|
||||
RETURN
|
||||
module1, dependsOnModule, module2
|
||||
----
|
||||
|
||||
[[modulith:ModuleExposesType]]
|
||||
[source,cypher,role=concept,requiresConcepts="modulith:ModuleDependencies"]
|
||||
.A type of a module is exposed if it is referenced at least once by a type in another module.
|
||||
----
|
||||
MATCH
|
||||
(module:Module)
|
||||
OPTIONAL MATCH
|
||||
(dependent:Module)-[:DEPENDS_ON_MODULE]->(module),
|
||||
(dependent)-[:CONTAINS*]->(dependentType:Type),
|
||||
(module)-[:CONTAINS*]->(type:Type),
|
||||
(dependentType)-[:DEPENDS_ON]->(type)
|
||||
RETURN
|
||||
module.displayName as Module, collect(type.fqn) as ExposedTypes
|
||||
ORDER BY
|
||||
Module
|
||||
----
|
||||
@@ -1,97 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.experimental</groupId>
|
||||
<artifactId>spring-modulith</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<name>Spring Modulith - Sample</name>
|
||||
<artifactId>spring-modulith-sample</artifactId>
|
||||
|
||||
<properties>
|
||||
<module.name>org.springframework.modulith.sample</module.name>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>jqa</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.buschmais.jqassistant</groupId>
|
||||
<artifactId>jqassistant-maven-plugin</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-cli</id>
|
||||
<goals>
|
||||
<goal>scan</goal>
|
||||
<goal>analyze</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-modulith-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jmolecules</groupId>
|
||||
<artifactId>jmolecules-events</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
spring.main.banner-mode=OFF
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d %5p %40.40c:%4L - %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="OFF">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user