build: add standard WCS core module
This commit is contained in:
16
pom.xml
16
pom.xml
@@ -223,6 +223,13 @@
|
|||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 标准 WCS 内核 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-wcs</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!--hutool工具包-->
|
<!--hutool工具包-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
@@ -249,6 +256,7 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-admin</module>
|
<module>ruoyi-admin</module>
|
||||||
|
<module>ruoyi-wcs</module>
|
||||||
<module>ruoyi-framework</module>
|
<module>ruoyi-framework</module>
|
||||||
<module>ruoyi-system</module>
|
<module>ruoyi-system</module>
|
||||||
<module>ruoyi-quartz</module>
|
<module>ruoyi-quartz</module>
|
||||||
@@ -269,6 +277,14 @@
|
|||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.2.5</version>
|
||||||
|
<configuration>
|
||||||
|
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,12 @@
|
|||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 标准 WCS 内核 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-wcs</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 定时任务-->
|
<!-- 定时任务-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
|
|||||||
38
ruoyi-wcs/pom.xml
Normal file
38
ruoyi-wcs/pom.xml
Normal 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>
|
||||||
9
ruoyi-wcs/src/main/java/com/ruoyi/wcs/WcsModule.java
Normal file
9
ruoyi-wcs/src/main/java/com/ruoyi/wcs/WcsModule.java
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
package com.ruoyi.wcs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stable marker for the standard WCS core module.
|
||||||
|
*/
|
||||||
|
public final class WcsModule {
|
||||||
|
private WcsModule() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user