Skip to content

Commit bbf9654

Browse files
committed
feat: Split project into Maven modules
fix #18
1 parent 20bedae commit bbf9654

File tree

94 files changed

+415
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+415
-52
lines changed

app/pom.xml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>key-value-storage</artifactId>
7+
<groupId>ru.andrey</groupId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>app</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<properties>
16+
<java.version>13</java.version>
17+
<maven.compiler.source>${java.version}</maven.compiler.source>
18+
<maven.compiler.target>${java.version}</maven.compiler.target>
19+
20+
<project.encoding>UTF-8</project.encoding>
21+
<project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
22+
<project.reporting.outputEncoding>${project.encoding}</project.reporting.outputEncoding>
23+
<project.resources.sourceEncoding>${project.encoding}</project.resources.sourceEncoding>
24+
<archetype.encoding>${project.encoding}</archetype.encoding>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>ru.andrey</groupId>
30+
<artifactId>common</artifactId>
31+
<version>${project.parent.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>ru.andrey</groupId>
35+
<artifactId>client</artifactId>
36+
<version>${project.parent.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>io.netty</groupId>
40+
<artifactId>netty-all</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.projectlombok</groupId>
44+
<artifactId>lombok</artifactId>
45+
<scope>provided</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>com.fasterxml.jackson.core</groupId>
49+
<artifactId>jackson-databind</artifactId>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.mockito</groupId>
53+
<artifactId>mockito-all</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>junit</groupId>
58+
<artifactId>junit</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.apache.commons</groupId>
63+
<artifactId>commons-lang3</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.jetbrains.kotlin</groupId>
67+
<artifactId>kotlin-stdlib-jdk8</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.jetbrains.kotlin</groupId>
71+
<artifactId>kotlin-test-junit</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
</dependencies>
75+
76+
</project>

client/pom.xml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>key-value-storage</artifactId>
7+
<groupId>ru.andrey</groupId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>client</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<properties>
16+
<java.version>13</java.version>
17+
<maven.compiler.source>${java.version}</maven.compiler.source>
18+
<maven.compiler.target>${java.version}</maven.compiler.target>
19+
20+
<project.encoding>UTF-8</project.encoding>
21+
<project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
22+
<project.reporting.outputEncoding>${project.encoding}</project.reporting.outputEncoding>
23+
<project.resources.sourceEncoding>${project.encoding}</project.resources.sourceEncoding>
24+
<archetype.encoding>${project.encoding}</archetype.encoding>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>ru.andrey</groupId>
30+
<artifactId>common</artifactId>
31+
<version>${project.parent.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>ru.andrey</groupId>
35+
<artifactId>server</artifactId>
36+
<version>${project.parent.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>io.netty</groupId>
40+
<artifactId>netty-all</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.projectlombok</groupId>
44+
<artifactId>lombok</artifactId>
45+
<scope>provided</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>com.fasterxml.jackson.core</groupId>
49+
<artifactId>jackson-databind</artifactId>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.mockito</groupId>
53+
<artifactId>mockito-all</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>junit</groupId>
58+
<artifactId>junit</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.apache.commons</groupId>
63+
<artifactId>commons-lang3</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.jetbrains.kotlin</groupId>
67+
<artifactId>kotlin-stdlib-jdk8</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.jetbrains.kotlin</groupId>
71+
<artifactId>kotlin-test-junit</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
</dependencies>
75+
76+
</project>

src/main/java/ru/andrey/kvstorage/jclient/connection/ConnectionPool.java client/src/main/java/ru/andrey/kvstorage/jclient/connection/ConnectionPool.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import ru.andrey.kvstorage.resp.ByteToRespDecoder;
1212
import ru.andrey.kvstorage.resp.RespToByteEncoder;
1313
import ru.andrey.kvstorage.resp.object.RespObject;
14-
import ru.andrey.kvstorage.server.connector.KvsClientInboundHandler;
1514

1615
import java.util.*;
1716
import java.util.concurrent.ConcurrentHashMap;

src/main/java/ru/andrey/kvstorage/server/connector/KvsClientInboundHandler.java client/src/main/java/ru/andrey/kvstorage/jclient/connection/KvsClientInboundHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
package ru.andrey.kvstorage.server.connector;
1+
package ru.andrey.kvstorage.jclient.connection;
22

33
import io.netty.channel.ChannelHandlerContext;
44
import io.netty.channel.ChannelInboundHandlerAdapter;
5-
import ru.andrey.kvstorage.jclient.connection.ConnectionPool;
65
import ru.andrey.kvstorage.resp.object.RespArray;
76
import ru.andrey.kvstorage.resp.object.RespCommandId;
87
import ru.andrey.kvstorage.resp.object.RespObject;

common/pom.xml

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>ru.andrey</groupId>
7+
<artifactId>key-value-storage</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>common</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<properties>
16+
<java.version>13</java.version>
17+
<maven.compiler.source>${java.version}</maven.compiler.source>
18+
<maven.compiler.target>${java.version}</maven.compiler.target>
19+
20+
<project.encoding>UTF-8</project.encoding>
21+
<project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
22+
<project.reporting.outputEncoding>${project.encoding}</project.reporting.outputEncoding>
23+
<project.resources.sourceEncoding>${project.encoding}</project.resources.sourceEncoding>
24+
<archetype.encoding>${project.encoding}</archetype.encoding>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>io.netty</groupId>
30+
<artifactId>netty-all</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.projectlombok</groupId>
34+
<artifactId>lombok</artifactId>
35+
<scope>provided</scope>
36+
</dependency>
37+
<dependency>
38+
<groupId>com.fasterxml.jackson.core</groupId>
39+
<artifactId>jackson-databind</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.mockito</groupId>
43+
<artifactId>mockito-all</artifactId>
44+
<scope>test</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>junit</groupId>
48+
<artifactId>junit</artifactId>
49+
<scope>test</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.apache.commons</groupId>
53+
<artifactId>commons-lang3</artifactId>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.jetbrains.kotlin</groupId>
57+
<artifactId>kotlin-stdlib-jdk8</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.jetbrains.kotlin</groupId>
61+
<artifactId>kotlin-test-junit</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
</dependencies>
65+
66+
<build>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.jetbrains.kotlin</groupId>
70+
<artifactId>kotlin-maven-plugin</artifactId>
71+
<version>${kotlin.version}</version>
72+
<executions>
73+
<execution>
74+
<id>compile</id>
75+
<phase>process-sources</phase>
76+
<goals>
77+
<goal>compile</goal>
78+
</goals>
79+
</execution>
80+
<execution>
81+
<id>test-compile</id>
82+
<phase>test-compile</phase>
83+
<goals>
84+
<goal>test-compile</goal>
85+
</goals>
86+
</execution>
87+
</executions>
88+
<configuration>
89+
<jvmTarget>1.8</jvmTarget>
90+
</configuration>
91+
</plugin>
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-compiler-plugin</artifactId>
95+
<executions>
96+
<execution>
97+
<id>compile</id>
98+
<phase>compile</phase>
99+
<goals>
100+
<goal>compile</goal>
101+
</goals>
102+
</execution>
103+
<execution>
104+
<id>testCompile</id>
105+
<phase>test-compile</phase>
106+
<goals>
107+
<goal>testCompile</goal>
108+
</goals>
109+
</execution>
110+
</executions>
111+
<configuration>
112+
<source>${java.version}</source>
113+
<target>${java.version}</target>
114+
</configuration>
115+
</plugin>
116+
</plugins>
117+
</build>
118+
119+
</project>

0 commit comments

Comments
 (0)