build: add standard WCS core module

This commit is contained in:
zgw
2026-08-10 15:00:23 +08:00
parent 352c17eb9f
commit 77067e07b3
5 changed files with 94 additions and 0 deletions

38
ruoyi-wcs/pom.xml Normal file
View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.8.9</version>
</parent>
<artifactId>ruoyi-wcs</artifactId>
<packaging>jar</packaging>
<description>标准四向车 WCS 内核</description>
<dependencies>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</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>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,9 @@
package com.ruoyi.wcs;
/**
* Stable marker for the standard WCS core module.
*/
public final class WcsModule {
private WcsModule() {
}
}

View File

@@ -0,0 +1,25 @@
package com.ruoyi.wcs.architecture;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import org.junit.jupiter.api.Test;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
import static org.junit.jupiter.api.Assertions.assertEquals;
class WcsModuleArchitectureTest {
@Test
void exposesAStableModuleMarker() throws Exception {
assertEquals("com.ruoyi.wcs.WcsModule",
Class.forName("com.ruoyi.wcs.WcsModule").getName());
}
@Test
void coreDoesNotDependOnProjectOrPlcPackages() {
noClasses().that().resideInAPackage("com.ruoyi.wcs..")
.should().dependOnClassesThat()
.resideInAnyPackage("com.ruoyi.schedule..", "com.ruoyi.api..",
"HslCommunication..", "org.apache.plc4x..")
.check(new ClassFileImporter().importPackages("com.ruoyi.wcs"));
}
}