Skip to content

Commit af16e2d

Browse files
committed
Dedup code
1 parent 3ea139c commit af16e2d

File tree

10 files changed

+107
-231
lines changed

10 files changed

+107
-231
lines changed

demo/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<module>webapp-it-base</module>
4242
<module>webapp-rest</module>
4343
<module>webapp-rest-it</module>
44+
<module>webapp-shared</module>
4445
<module>webapp-vaadin</module>
4546
<module>webapp-vaadin-it</module>
4647
</modules>
@@ -114,6 +115,12 @@
114115
<version>0.0.8-SNAPSHOT</version>
115116
</dependency>
116117

118+
<dependency>
119+
<groupId>software.xdev.sse.demo</groupId>
120+
<artifactId>webapp-shared</artifactId>
121+
<version>0.0.8-SNAPSHOT</version>
122+
</dependency>
123+
117124
<dependency>
118125
<groupId>software.xdev</groupId>
119126
<artifactId>tci-base</artifactId>

demo/webapp-rest/pom.xml

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -20,59 +20,7 @@
2020
<!-- Internal -->
2121
<dependency>
2222
<groupId>software.xdev.sse.demo</groupId>
23-
<artifactId>persistence</artifactId>
24-
</dependency>
25-
26-
<!-- Spring -->
27-
<dependency>
28-
<groupId>org.springframework.boot</groupId>
29-
<artifactId>spring-boot-starter-logging</artifactId>
30-
<exclusions>
31-
<!-- There is nothing that uses the log4j api so we don't need it -->
32-
<exclusion>
33-
<groupId>org.apache.logging.log4j</groupId>
34-
<artifactId>log4j-to-slf4j</artifactId>
35-
</exclusion>
36-
</exclusions>
37-
</dependency>
38-
39-
<dependency>
40-
<groupId>org.springframework.boot</groupId>
41-
<artifactId>spring-boot-starter-web</artifactId>
42-
</dependency>
43-
44-
<dependency>
45-
<groupId>org.springframework.boot</groupId>
46-
<artifactId>spring-boot-starter-security</artifactId>
47-
</dependency>
48-
49-
<dependency>
50-
<groupId>org.springframework.boot</groupId>
51-
<artifactId>spring-boot-starter-oauth2-client</artifactId>
52-
</dependency>
53-
54-
<dependency>
55-
<groupId>org.springframework.boot</groupId>
56-
<artifactId>spring-boot-starter-actuator</artifactId>
57-
</dependency>
58-
59-
<dependency>
60-
<groupId>software.xdev</groupId>
61-
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId>
62-
<scope>runtime</scope>
63-
</dependency>
64-
65-
<dependency>
66-
<groupId>io.micrometer</groupId>
67-
<artifactId>micrometer-registry-prometheus</artifactId>
68-
<exclusions>
69-
<!-- Exclude default module so that dependency is properly removed -->
70-
<exclusion>
71-
<groupId>io.prometheus</groupId>
72-
<artifactId>prometheus-metrics-exposition-formats</artifactId>
73-
</exclusion>
74-
</exclusions>
75-
<scope>runtime</scope>
23+
<artifactId>webapp-shared</artifactId>
7624
</dependency>
7725

7826
<dependency>
@@ -81,35 +29,10 @@
8129
<optional>true</optional>
8230
</dependency>
8331

84-
<dependency>
85-
<groupId>software.xdev</groupId>
86-
<artifactId>spring-security-advanced-authentication-ui</artifactId>
87-
</dependency>
88-
89-
<!-- SSE -->
90-
<dependency>
91-
<groupId>software.xdev.sse</groupId>
92-
<artifactId>csp</artifactId>
93-
</dependency>
94-
<dependency>
95-
<groupId>software.xdev.sse</groupId>
96-
<artifactId>oauth2-oidc</artifactId>
97-
</dependency>
98-
<dependency>
99-
<groupId>software.xdev.sse</groupId>
100-
<artifactId>web-sidecar-actuator</artifactId>
101-
</dependency>
102-
10332
<dependency>
10433
<groupId>org.springdoc</groupId>
10534
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
10635
</dependency>
107-
108-
<!-- DB Impl -->
109-
<dependency>
110-
<groupId>org.mariadb.jdbc</groupId>
111-
<artifactId>mariadb-java-client</artifactId>
112-
</dependency>
11336
</dependencies>
11437

11538
<build>

demo/webapp-shared/pom.xml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0"?>
2+
<project
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>software.xdev.sse.demo</groupId>
9+
<artifactId>demo</artifactId>
10+
<version>0.0.8-SNAPSHOT</version>
11+
</parent>
12+
<artifactId>webapp-shared</artifactId>
13+
14+
<dependencies>
15+
<!-- Internal -->
16+
<dependency>
17+
<groupId>software.xdev.sse.demo</groupId>
18+
<artifactId>persistence</artifactId>
19+
</dependency>
20+
21+
<!-- Spring -->
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-logging</artifactId>
25+
<exclusions>
26+
<!-- There is nothing that uses the log4j api so we don't need it -->
27+
<exclusion>
28+
<groupId>org.apache.logging.log4j</groupId>
29+
<artifactId>log4j-to-slf4j</artifactId>
30+
</exclusion>
31+
</exclusions>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-starter-web</artifactId>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-security</artifactId>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-starter-oauth2-client</artifactId>
47+
</dependency>
48+
49+
<dependency>
50+
<groupId>org.springframework.boot</groupId>
51+
<artifactId>spring-boot-starter-actuator</artifactId>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>software.xdev</groupId>
56+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId>
57+
<scope>runtime</scope>
58+
</dependency>
59+
60+
<dependency>
61+
<groupId>io.micrometer</groupId>
62+
<artifactId>micrometer-registry-prometheus</artifactId>
63+
<exclusions>
64+
<!-- Exclude default module so that dependency is properly removed -->
65+
<exclusion>
66+
<groupId>io.prometheus</groupId>
67+
<artifactId>prometheus-metrics-exposition-formats</artifactId>
68+
</exclusion>
69+
</exclusions>
70+
<scope>runtime</scope>
71+
</dependency>
72+
73+
<dependency>
74+
<groupId>software.xdev</groupId>
75+
<artifactId>spring-security-advanced-authentication-ui</artifactId>
76+
</dependency>
77+
78+
<!-- SSE -->
79+
<dependency>
80+
<groupId>software.xdev.sse</groupId>
81+
<artifactId>csp</artifactId>
82+
</dependency>
83+
<dependency>
84+
<groupId>software.xdev.sse</groupId>
85+
<artifactId>oauth2-oidc</artifactId>
86+
</dependency>
87+
<dependency>
88+
<groupId>software.xdev.sse</groupId>
89+
<artifactId>web-sidecar-actuator</artifactId>
90+
</dependency>
91+
92+
<!-- DB Impl -->
93+
<dependency>
94+
<groupId>org.mariadb.jdbc</groupId>
95+
<artifactId>mariadb-java-client</artifactId>
96+
</dependency>
97+
</dependencies>
98+
</project>

demo/webapp-rest/src/main/java/software/xdev/sse/demo/DemoJPAConfig.java renamed to demo/webapp-shared/src/main/java/software/xdev/sse/demo/DemoJPAConfig.java

File renamed without changes.

demo/webapp-rest/src/main/java/software/xdev/sse/demo/init/DemoFlywayConfigurationCustomizer.java renamed to demo/webapp-shared/src/main/java/software/xdev/sse/demo/init/DemoFlywayConfigurationCustomizer.java

File renamed without changes.
File renamed without changes.

demo/webapp-vaadin/pom.xml

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- Internal -->
2121
<dependency>
2222
<groupId>software.xdev.sse.demo</groupId>
23-
<artifactId>persistence</artifactId>
23+
<artifactId>webapp-shared</artifactId>
2424
</dependency>
2525

2626
<!-- Vaadin -->
@@ -92,74 +92,7 @@
9292
</exclusions>
9393
</dependency>
9494

95-
<!-- Spring -->
96-
<dependency>
97-
<groupId>org.springframework.boot</groupId>
98-
<artifactId>spring-boot-starter-logging</artifactId>
99-
<exclusions>
100-
<!-- There is nothing that uses the log4j api so we don't need it -->
101-
<exclusion>
102-
<groupId>org.apache.logging.log4j</groupId>
103-
<artifactId>log4j-to-slf4j</artifactId>
104-
</exclusion>
105-
</exclusions>
106-
</dependency>
107-
108-
<dependency>
109-
<groupId>org.springframework.boot</groupId>
110-
<artifactId>spring-boot-starter-web</artifactId>
111-
</dependency>
112-
113-
<dependency>
114-
<groupId>org.springframework.boot</groupId>
115-
<artifactId>spring-boot-starter-security</artifactId>
116-
</dependency>
117-
118-
<dependency>
119-
<groupId>org.springframework.boot</groupId>
120-
<artifactId>spring-boot-starter-oauth2-client</artifactId>
121-
</dependency>
122-
123-
<dependency>
124-
<groupId>org.springframework.boot</groupId>
125-
<artifactId>spring-boot-starter-actuator</artifactId>
126-
</dependency>
127-
128-
<dependency>
129-
<groupId>software.xdev</groupId>
130-
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId>
131-
<scope>runtime</scope>
132-
</dependency>
133-
134-
<dependency>
135-
<groupId>io.micrometer</groupId>
136-
<artifactId>micrometer-registry-prometheus</artifactId>
137-
<exclusions>
138-
<!-- Exclude default module so that dependency is properly removed -->
139-
<exclusion>
140-
<groupId>io.prometheus</groupId>
141-
<artifactId>prometheus-metrics-exposition-formats</artifactId>
142-
</exclusion>
143-
</exclusions>
144-
<scope>runtime</scope>
145-
</dependency>
146-
147-
<dependency>
148-
<groupId>org.springframework.boot</groupId>
149-
<artifactId>spring-boot-devtools</artifactId>
150-
<optional>true</optional>
151-
</dependency>
152-
153-
<dependency>
154-
<groupId>software.xdev</groupId>
155-
<artifactId>spring-security-advanced-authentication-ui</artifactId>
156-
</dependency>
157-
15895
<!-- SSE -->
159-
<dependency>
160-
<groupId>software.xdev.sse</groupId>
161-
<artifactId>csp</artifactId>
162-
</dependency>
16396
<dependency>
16497
<groupId>software.xdev.sse</groupId>
16598
<artifactId>oauth2-oidc-remember-me</artifactId>
@@ -168,21 +101,6 @@
168101
<groupId>software.xdev.sse</groupId>
169102
<artifactId>vaadin</artifactId>
170103
</dependency>
171-
<dependency>
172-
<groupId>software.xdev.sse</groupId>
173-
<artifactId>web-sidecar-actuator</artifactId>
174-
</dependency>
175-
176-
<dependency>
177-
<groupId>org.springdoc</groupId>
178-
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
179-
</dependency>
180-
181-
<!-- DB Impl -->
182-
<dependency>
183-
<groupId>org.mariadb.jdbc</groupId>
184-
<artifactId>mariadb-java-client</artifactId>
185-
</dependency>
186104
</dependencies>
187105

188106
<build>

demo/webapp-vaadin/src/main/java/software/xdev/sse/demo/DemoJPAConfig.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

demo/webapp-vaadin/src/main/java/software/xdev/sse/demo/init/DemoFlywayConfigurationCustomizer.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

demo/webapp-vaadin/src/main/resources/banner.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)