Skip to content

Commit 9dd667f

Browse files
phillip-krugeraloubyansky
authored andcommitted
Introduce Dev only module for Websocket next extension
Signed-off-by: Phillip Kruger <[email protected]>
1 parent 734f6bc commit 9dd667f

File tree

8 files changed

+64
-7
lines changed

8 files changed

+64
-7
lines changed

bom/application/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,6 +2409,11 @@
24092409
<artifactId>quarkus-websockets-next</artifactId>
24102410
<version>${project.version}</version>
24112411
</dependency>
2412+
<dependency>
2413+
<groupId>io.quarkus</groupId>
2414+
<artifactId>quarkus-websockets-next-dev</artifactId>
2415+
<version>${project.version}</version>
2416+
</dependency>
24122417
<dependency>
24132418
<groupId>io.quarkus</groupId>
24142419
<artifactId>quarkus-websockets-next-deployment</artifactId>

extensions/websockets-next/deployment/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
<groupId>io.quarkus</groupId>
3434
<artifactId>quarkus-websockets-next</artifactId>
3535
</dependency>
36-
36+
<dependency>
37+
<groupId>io.quarkus</groupId>
38+
<artifactId>quarkus-websockets-next-dev</artifactId>
39+
</dependency>
3740
<!-- Test dependencies -->
3841
<dependency>
3942
<groupId>io.quarkus</groupId>

extensions/websockets-next/deployment/src/main/java/io/quarkus/websockets/next/deployment/devui/WebSocketServerDevUIProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import org.jboss.jandex.Type;
1515
import org.jboss.jandex.Type.Kind;
1616

17-
import io.quarkus.deployment.IsDevelopment;
17+
import io.quarkus.deployment.IsLocalDevelopment;
1818
import io.quarkus.deployment.annotations.BuildProducer;
1919
import io.quarkus.deployment.annotations.BuildStep;
2020
import io.quarkus.devui.spi.JsonRPCProvidersBuildItem;
@@ -24,11 +24,11 @@
2424
import io.quarkus.websockets.next.deployment.GeneratedEndpointBuildItem;
2525
import io.quarkus.websockets.next.deployment.WebSocketEndpointBuildItem;
2626
import io.quarkus.websockets.next.deployment.WebSocketProcessor;
27-
import io.quarkus.websockets.next.runtime.devui.WebSocketNextJsonRPCService;
27+
import io.quarkus.websockets.next.runtime.dev.ui.WebSocketNextJsonRPCService;
2828

2929
public class WebSocketServerDevUIProcessor {
3030

31-
@BuildStep(onlyIf = IsDevelopment.class)
31+
@BuildStep(onlyIf = IsLocalDevelopment.class)
3232
public void pages(List<WebSocketEndpointBuildItem> endpoints, List<GeneratedEndpointBuildItem> generatedEndpoints,
3333
BuildProducer<CardPageBuildItem> cardPages) {
3434

@@ -45,7 +45,7 @@ public void pages(List<WebSocketEndpointBuildItem> endpoints, List<GeneratedEndp
4545
cardPages.produce(pageBuildItem);
4646
}
4747

48-
@BuildStep
48+
@BuildStep(onlyIf = IsLocalDevelopment.class)
4949
JsonRPCProvidersBuildItem rpcProvider() {
5050
return new JsonRPCProvidersBuildItem(WebSocketNextJsonRPCService.class);
5151
}

extensions/websockets-next/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<module>runtime</module>
2121
<module>kotlin</module>
2222
<module>spi</module>
23+
<module>runtime-dev</module>
2324
</modules>
2425

2526
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>quarkus-websockets-next-parent</artifactId>
7+
<groupId>io.quarkus</groupId>
8+
<version>999-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>quarkus-websockets-next-dev</artifactId>
13+
<name>Quarkus - WebSockets Next - Runtime Dev mode</name>
14+
<description>Implementation of the WebSocket API with enhanced efficiency and usability - Dev mode only</description>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>io.quarkus</groupId>
19+
<artifactId>quarkus-websockets-next</artifactId>
20+
</dependency>
21+
<!-- Test dependencies -->
22+
<dependency>
23+
<groupId>org.junit.jupiter</groupId>
24+
<artifactId>junit-jupiter</artifactId>
25+
<scope>test</scope>
26+
</dependency>
27+
</dependencies>
28+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.quarkus.websockets.next.runtime.devui;
1+
package io.quarkus.websockets.next.runtime.dev.ui;
22

33
import java.time.LocalDateTime;
44
import java.time.ZoneId;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.quarkus.websockets.next.runtime.devui;
1+
package io.quarkus.websockets.next.runtime.dev.ui;
22

33
import static org.junit.jupiter.api.Assertions.assertFalse;
44
import static org.junit.jupiter.api.Assertions.assertTrue;

extensions/websockets-next/runtime/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@
4747
<groupId>io.quarkus.security</groupId>
4848
<artifactId>quarkus-security</artifactId>
4949
</dependency>
50+
<!-- Dependencies used for integration with OpenTelemetry extension -->
51+
<dependency>
52+
<groupId>io.opentelemetry</groupId>
53+
<artifactId>opentelemetry-api</artifactId>
54+
<optional>true</optional>
55+
</dependency>
56+
<dependency>
57+
<groupId>io.opentelemetry.semconv</groupId>
58+
<artifactId>opentelemetry-semconv</artifactId>
59+
<optional>true</optional>
60+
</dependency>
61+
<!-- Dependencies used for integration with Micrometer extension -->
62+
<dependency>
63+
<groupId>io.micrometer</groupId>
64+
<artifactId>micrometer-core</artifactId>
65+
<optional>true</optional>
66+
</dependency>
5067
<!-- Test dependencies -->
5168
<dependency>
5269
<groupId>org.junit.jupiter</groupId>
@@ -64,6 +81,9 @@
6481
<capabilities>
6582
<provides>io.quarkus.websockets.next</provides>
6683
</capabilities>
84+
<conditionalDevDependencies>
85+
<artifact>${project.groupId}:${project.artifactId}-dev:${project.version}</artifact>
86+
</conditionalDevDependencies>
6787
</configuration>
6888
</plugin>
6989
<plugin>

0 commit comments

Comments
 (0)