Skip to content

Commit feacf57

Browse files
authored
Merge pull request saturnism#6 from Fork-World/feature/vaadin-sru
Small changes for Vaadin
2 parents 349b164 + 2cce6ca commit feacf57

File tree

4 files changed

+242
-207
lines changed

4 files changed

+242
-207
lines changed

chat-example/chat-server/src/main/java/com/example/grpc/chat/ChatServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
*/
3131
public class ChatServiceImpl extends ChatServiceGrpc.ChatServiceImplBase {
3232
// @aiborisov mentioned this needs to be thread safe. It was using non-thread-safe HashSet
33-
private static Set<StreamObserver<Chat.ChatMessageFromServer>> observers =
34-
Collections.newSetFromMap(new ConcurrentHashMap<>());
33+
private static Set<StreamObserver<Chat.ChatMessageFromServer>> observers = ConcurrentHashMap.newKeySet();
34+
// Collections.newSetFromMap(new ConcurrentHashMap<>());
3535

3636
@Override
3737
public StreamObserver<Chat.ChatMessage> chat(StreamObserver<Chat.ChatMessageFromServer> responseObserver) {
Lines changed: 178 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -1,178 +1,186 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
3-
<modelVersion>4.0.0</modelVersion>
4-
<parent>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
56
<artifactId>chat-example</artifactId>
67
<groupId>com.example.chat</groupId>
78
<version>1.0-SNAPSHOT</version>
89
</parent>
910

10-
<groupId>org.test</groupId>
11-
<artifactId>chat-vaadin-client</artifactId>
12-
<packaging>war</packaging>
13-
<version>1.0-SNAPSHOT</version>
14-
15-
<prerequisites>
16-
<maven>3</maven>
17-
</prerequisites>
18-
19-
<properties>
20-
<vaadin.version>8.0.6</vaadin.version>
21-
<vaadin.plugin.version>8.0.6</vaadin.plugin.version>
22-
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
23-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24-
<maven.compiler.source>1.8</maven.compiler.source>
25-
<maven.compiler.target>1.8</maven.compiler.target>
26-
<!-- If there are no local customisations, this can also be "fetch" or "cdn" -->
27-
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
28-
</properties>
29-
30-
<repositories>
31-
<repository>
32-
<id>vaadin-addons</id>
33-
<url>http://maven.vaadin.com/vaadin-addons</url>
34-
</repository>
35-
</repositories>
36-
37-
<dependencyManagement>
38-
<dependencies>
39-
<dependency>
40-
<groupId>com.vaadin</groupId>
41-
<artifactId>vaadin-bom</artifactId>
42-
<version>${vaadin.version}</version>
43-
<type>pom</type>
44-
<scope>import</scope>
45-
</dependency>
46-
</dependencies>
47-
</dependencyManagement>
48-
49-
<dependencies>
50-
<dependency>
51-
<groupId>javax.servlet</groupId>
52-
<artifactId>javax.servlet-api</artifactId>
53-
<version>3.0.1</version>
54-
<scope>provided</scope>
55-
</dependency>
56-
<dependency>
57-
<groupId>com.vaadin</groupId>
58-
<artifactId>vaadin-server</artifactId>
59-
</dependency>
60-
<dependency>
61-
<groupId>com.vaadin</groupId>
62-
<artifactId>vaadin-push</artifactId>
63-
</dependency>
64-
<dependency>
65-
<groupId>com.vaadin</groupId>
66-
<artifactId>vaadin-client-compiled</artifactId>
67-
</dependency>
68-
<dependency>
69-
<groupId>com.vaadin</groupId>
70-
<artifactId>vaadin-themes</artifactId>
71-
</dependency>
72-
<dependency>
73-
<groupId>com.example.chat</groupId>
74-
<artifactId>chat-server</artifactId>
75-
<version>${project.version}</version>
76-
</dependency>
77-
</dependencies>
78-
79-
<build>
80-
<plugins>
81-
<plugin>
82-
<groupId>org.apache.maven.plugins</groupId>
83-
<artifactId>maven-war-plugin</artifactId>
84-
<version>3.0.0</version>
85-
<configuration>
86-
<failOnMissingWebXml>false</failOnMissingWebXml>
87-
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
88-
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
89-
</configuration>
90-
</plugin>
91-
<plugin>
92-
<groupId>com.vaadin</groupId>
93-
<artifactId>vaadin-maven-plugin</artifactId>
94-
<version>${vaadin.plugin.version}</version>
95-
<executions>
96-
<execution>
97-
<goals>
98-
<goal>update-theme</goal>
99-
<goal>update-widgetset</goal>
100-
<goal>compile</goal>
101-
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
102-
<goal>compile-theme</goal>
103-
</goals>
104-
</execution>
105-
</executions>
106-
</plugin>
107-
<plugin>
108-
<groupId>org.apache.maven.plugins</groupId>
109-
<artifactId>maven-clean-plugin</artifactId>
110-
<version>3.0.0</version>
111-
<!-- Clean up also any pre-compiled themes -->
112-
<configuration>
113-
<filesets>
114-
<fileset>
115-
<directory>src/main/webapp/VAADIN/themes</directory>
116-
<includes>
117-
<include>**/styles.css</include>
118-
<include>**/styles.scss.cache</include>
119-
</includes>
120-
</fileset>
121-
</filesets>
122-
</configuration>
123-
</plugin>
124-
125-
<!-- The Jetty plugin allows us to easily test the development build by
126-
running jetty:run on the command line. -->
127-
<plugin>
128-
<groupId>org.eclipse.jetty</groupId>
129-
<artifactId>jetty-maven-plugin</artifactId>
130-
<version>${jetty.plugin.version}</version>
131-
<configuration>
132-
<scanIntervalSeconds>2</scanIntervalSeconds>
133-
</configuration>
134-
</plugin>
135-
</plugins>
136-
</build>
137-
138-
<profiles>
139-
<profile>
140-
<!-- Vaadin pre-release repositories -->
141-
<id>vaadin-prerelease</id>
142-
<activation>
143-
</activation>
144-
145-
<repositories>
146-
<repository>
147-
<id>vaadin-prereleases</id>
148-
<url>http://maven.vaadin.com/vaadin-prereleases</url>
149-
</repository>
150-
<repository>
151-
<id>vaadin-snapshots</id>
152-
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
153-
<releases>
154-
<enabled>false</enabled>
155-
</releases>
156-
<snapshots>
157-
</snapshots>
158-
</repository>
159-
</repositories>
160-
<pluginRepositories>
161-
<pluginRepository>
162-
<id>vaadin-prereleases</id>
163-
<url>http://maven.vaadin.com/vaadin-prereleases</url>
164-
</pluginRepository>
165-
<pluginRepository>
166-
<id>vaadin-snapshots</id>
167-
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
168-
<releases>
169-
<enabled>false</enabled>
170-
</releases>
171-
<snapshots>
172-
</snapshots>
173-
</pluginRepository>
174-
</pluginRepositories>
175-
</profile>
176-
</profiles>
11+
<groupId>org.test</groupId>
12+
<artifactId>chat-vaadin-client</artifactId>
13+
<packaging>war</packaging>
14+
<version>1.0-SNAPSHOT</version>
15+
16+
<prerequisites>
17+
<maven>3</maven>
18+
</prerequisites>
19+
20+
<properties>
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
<maven.compiler.source>1.8</maven.compiler.source>
23+
<maven.compiler.target>1.8</maven.compiler.target>
24+
25+
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
26+
<vaadin.version>8.1.6</vaadin.version>
27+
<!-- If there are no local customisations, this can also be "fetch" or "cdn" -->
28+
<vaadin.widgetset.mode>cdn</vaadin.widgetset.mode>
29+
</properties>
30+
31+
<repositories>
32+
<repository>
33+
<id>vaadin-addons</id>
34+
<url>http://maven.vaadin.com/vaadin-addons</url>
35+
</repository>
36+
</repositories>
37+
38+
<dependencyManagement>
39+
<dependencies>
40+
<dependency>
41+
<groupId>com.vaadin</groupId>
42+
<artifactId>vaadin-bom</artifactId>
43+
<version>${vaadin.version}</version>
44+
<type>pom</type>
45+
<scope>import</scope>
46+
</dependency>
47+
</dependencies>
48+
</dependencyManagement>
49+
50+
<dependencies>
51+
<dependency>
52+
<groupId>javax.servlet</groupId>
53+
<artifactId>javax.servlet-api</artifactId>
54+
<version>3.0.1</version>
55+
<scope>provided</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.vaadin</groupId>
59+
<artifactId>vaadin-server</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.vaadin</groupId>
63+
<artifactId>vaadin-push</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>com.vaadin</groupId>
67+
<artifactId>vaadin-client-compiled</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>com.vaadin</groupId>
71+
<artifactId>vaadin-themes</artifactId>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.example.chat</groupId>
75+
<artifactId>chat-server</artifactId>
76+
<version>${project.version}</version>
77+
</dependency>
78+
79+
<!--Development-->
80+
81+
<dependency>
82+
<groupId>org.rapidpm.microservice</groupId>
83+
<artifactId>rapidpm-microservice-modules-core</artifactId>
84+
<version>0.9.1</version>
85+
<scope>test</scope>
86+
</dependency>
87+
<!--TDD stuff-->
88+
<dependency>
89+
<groupId>org.rapidpm</groupId>
90+
<artifactId>rapidpm-functional-reactive</artifactId>
91+
<version>0.0.6</version>
92+
<scope>test</scope>
93+
</dependency>
94+
95+
</dependencies>
96+
97+
<build>
98+
<plugins>
99+
<!--Vaadin -->
100+
101+
<plugin>
102+
<groupId>com.vaadin</groupId>
103+
<artifactId>vaadin-maven-plugin</artifactId>
104+
<version>${vaadin.version}</version>
105+
<configuration>
106+
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
107+
<webappDirectory>
108+
${basedir}/target/classes/VAADIN/widgetsets
109+
</webappDirectory>
110+
<draftCompile>true</draftCompile>
111+
<compileReport>false</compileReport>
112+
<!-- Change to PRETTY (or possibly DETAILED) to get
113+
unobfuscated client side stack traces. A better approach
114+
for debugging is to use Super Dev Mode -->
115+
<style>OBF</style>
116+
<strict>true</strict>
117+
</configuration>
118+
<executions>
119+
<execution>
120+
<goals>
121+
<goal>update-widgetset</goal>
122+
<goal>compile</goal>
123+
</goals>
124+
</execution>
125+
</executions>
126+
</plugin>
127+
<plugin>
128+
<groupId>org.apache.maven.plugins</groupId>
129+
<artifactId>maven-war-plugin</artifactId>
130+
<version>3.0.0</version>
131+
<configuration>
132+
<failOnMissingWebXml>false</failOnMissingWebXml>
133+
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
134+
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
135+
</configuration>
136+
</plugin>
137+
<!--<plugin>-->
138+
<!--<groupId>com.vaadin</groupId>-->
139+
<!--<artifactId>vaadin-maven-plugin</artifactId>-->
140+
<!--<version>${vaadin.plugin.version}</version>-->
141+
<!--<executions>-->
142+
<!--<execution>-->
143+
<!--<goals>-->
144+
<!--<goal>update-theme</goal>-->
145+
<!--<goal>update-widgetset</goal>-->
146+
<!--<goal>compile</goal>-->
147+
<!--&lt;!&ndash; Comment out compile-theme goal to use on-the-fly theme compilation &ndash;&gt;-->
148+
<!--<goal>compile-theme</goal>-->
149+
<!--</goals>-->
150+
<!--</execution>-->
151+
<!--</executions>-->
152+
<!--</plugin>-->
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-clean-plugin</artifactId>
156+
<version>3.0.0</version>
157+
<!-- Clean up also any pre-compiled themes -->
158+
<configuration>
159+
<filesets>
160+
<fileset>
161+
<directory>src/main/webapp/VAADIN/themes</directory>
162+
<includes>
163+
<include>**/styles.css</include>
164+
<include>**/styles.scss.cache</include>
165+
</includes>
166+
</fileset>
167+
</filesets>
168+
</configuration>
169+
</plugin>
170+
171+
<!-- The Jetty plugin allows us to easily test the development build by
172+
running jetty:run on the command line. -->
173+
<plugin>
174+
<groupId>org.eclipse.jetty</groupId>
175+
<artifactId>jetty-maven-plugin</artifactId>
176+
<version>${jetty.plugin.version}</version>
177+
<configuration>
178+
<scanIntervalSeconds>2</scanIntervalSeconds>
179+
</configuration>
180+
</plugin>
181+
</plugins>
182+
</build>
183+
184+
177185

178186
</project>

0 commit comments

Comments
 (0)