Skip to content

Commit 06bdfe7

Browse files
committed
Upgrade to Vaadin 14
1 parent ff55a4d commit 06bdfe7

File tree

3 files changed

+229
-73
lines changed

3 files changed

+229
-73
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
/target
33
/.classpath
44
/.project
5+
/node_modules
6+
/webpack.generated.js

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
# App Layout Add-on
66

7-
Vaadin 10 Java integration of https://github.com/PolymerElements/app-layout
7+
Vaadin Flow Java integration of https://github.com/PolymerElements/app-layout
88
This addon is particularly usefull if you want to create a new application with some initial support for responsiveness.
9-
9+
1010
## Features
1111

1212
* Left side menu with hamburguer button, and now with support for sub-menus and icons

pom.xml

Lines changed: 225 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44

55
<groupId>com.flowingcode.addons.applayout</groupId>
66
<artifactId>app-layout-addon</artifactId>
7-
<version>1.0.8-SNAPSHOT</version>
7+
<version>2.0.0-SNAPSHOT</version>
88
<name>App Layout Addon</name>
9-
<description>Integration of app-layout for Vaadin 10</description>
9+
<description>Integration of app-layout for Vaadin Flow</description>
1010

1111
<properties>
12-
<vaadin.version>10.0.0</vaadin.version>
12+
<vaadin.version>14.0.7</vaadin.version>
13+
1314
<maven.compiler.source>1.8</maven.compiler.source>
1415
<maven.compiler.target>1.8</maven.compiler.target>
1516
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1617
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
18+
19+
<drivers.dir>${project.basedir}/drivers</drivers.dir>
20+
21+
<jetty.version>9.4.15.v20190215</jetty.version>
1722
</properties>
18-
19-
<organization>
23+
<organization>
2024
<name>Flowing Code</name>
2125
<url>https://www.flowingcode.com</url>
22-
</organization>
26+
</organization>
2327
<inceptionYear>2018</inceptionYear>
2428
<licenses>
2529
<license>
@@ -33,7 +37,7 @@
3337
<url>https://github.com/FlowingCode/AppLayoutAddon</url>
3438
<connection>scm:git:git://github.com/FlowingCode/AppLayoutAddon.git</connection>
3539
<developerConnection>scm:git:ssh://[email protected]:/FlowingCode/AppLayoutAddon.git</developerConnection>
36-
<tag>App Layout add-on for Vaadin</tag>
40+
<tag>app-layout-addon-2.0.0</tag>
3741
</scm>
3842

3943
<dependencyManagement>
@@ -53,68 +57,52 @@
5357
<id>Vaadin Directory</id>
5458
<url>https://maven.vaadin.com/vaadin-addons</url>
5559
</repository>
56-
<repository>
57-
<id>Vaadin prereleases</id>
58-
<url>https://maven.vaadin.com/vaadin-prereleases</url>
59-
</repository>
60-
<!-- The bintray repository contain webjars immediately after generation. If the webjar is available
61-
in Maven central, you do not need this repository -->
62-
<repository>
63-
<id>webjars</id>
64-
<url>https://dl.bintray.com/webjars/maven</url>
65-
</repository>
6660
</repositories>
6761

6862
<dependencies>
6963
<dependency>
7064
<groupId>com.vaadin</groupId>
7165
<artifactId>vaadin-core</artifactId>
66+
<exclusions>
67+
<!-- Webjars are only needed when running in Vaadin 13 compatibility mode in V14.
68+
Your add-on can support npm in the same version mode and V13 compatiblity mode at the same time,
69+
or with separate versions. Any V13 version should work with the compatibility mode in V14. -->
70+
<exclusion>
71+
<groupId>com.vaadin.webjar</groupId>
72+
<artifactId>*</artifactId>
73+
</exclusion>
74+
<exclusion>
75+
<groupId>org.webjars.bowergithub.insites</groupId>
76+
<artifactId>*</artifactId>
77+
</exclusion>
78+
<exclusion>
79+
<groupId>org.webjars.bowergithub.polymer</groupId>
80+
<artifactId>*</artifactId>
81+
</exclusion>
82+
<exclusion>
83+
<groupId>org.webjars.bowergithub.polymerelements</groupId>
84+
<artifactId>*</artifactId>
85+
</exclusion>
86+
<exclusion>
87+
<groupId>org.webjars.bowergithub.vaadin</groupId>
88+
<artifactId>*</artifactId>
89+
</exclusion>
90+
<exclusion>
91+
<groupId>org.webjars.bowergithub.webcomponents</groupId>
92+
<artifactId>*</artifactId>
93+
</exclusion>
94+
</exclusions>
7295
</dependency>
7396
<dependency>
7497
<groupId>org.slf4j</groupId>
7598
<artifactId>slf4j-simple</artifactId>
7699
<scope>test</scope>
77100
</dependency>
78101
<dependency>
79-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
80-
<artifactId>app-layout</artifactId>
81-
<version>2.1.1</version>
102+
<groupId>com.vaadin</groupId>
103+
<artifactId>vaadin-testbench</artifactId>
104+
<scope>test</scope>
82105
</dependency>
83-
<dependency>
84-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
85-
<artifactId>paper-icon-button</artifactId>
86-
<version>2.2.0</version>
87-
</dependency>
88-
<dependency>
89-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
90-
<artifactId>iron-icons</artifactId>
91-
<version>2.1.1</version>
92-
</dependency>
93-
<dependency>
94-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
95-
<artifactId>paper-listbox</artifactId>
96-
<version>2.1.1</version>
97-
</dependency>
98-
<dependency>
99-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
100-
<artifactId>paper-item</artifactId>
101-
<version>2.1.1</version>
102-
</dependency>
103-
<dependency>
104-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
105-
<artifactId>paper-card</artifactId>
106-
<version>2.1.0</version>
107-
</dependency>
108-
<dependency>
109-
<groupId>org.webjars.bowergithub.polymerelements</groupId>
110-
<artifactId>paper-button</artifactId>
111-
<version>2.1.1</version>
112-
</dependency>
113-
<dependency>
114-
<groupId>org.webjars.bowergithub.jifalops</groupId>
115-
<artifactId>iron-collapse-button</artifactId>
116-
<version>1.0.1</version>
117-
</dependency>
118106
</dependencies>
119107

120108
<build>
@@ -130,6 +118,14 @@
130118
<artifactId>maven-deploy-plugin</artifactId>
131119
<version>2.8.2</version>
132120
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-surefire-plugin</artifactId>
124+
<version>2.22.1</version>
125+
<configuration>
126+
<useSystemClassLoader>false</useSystemClassLoader>
127+
</configuration>
128+
</plugin>
133129
</plugins>
134130
</pluginManagement>
135131

@@ -148,7 +144,7 @@
148144
<plugin>
149145
<groupId>org.apache.maven.plugins</groupId>
150146
<artifactId>maven-jar-plugin</artifactId>
151-
<version>3.0.2</version>
147+
<version>3.1.2</version>
152148
<configuration>
153149
<archive>
154150
<index>true</index>
@@ -163,24 +159,30 @@
163159
</configuration>
164160
</plugin>
165161

162+
<plugin>
163+
<groupId>com.vaadin</groupId>
164+
<artifactId>vaadin-maven-plugin</artifactId>
165+
<version>${vaadin.version}</version>
166+
<executions>
167+
<execution>
168+
<goals>
169+
<goal>prepare-frontend</goal>
170+
</goals>
171+
</execution>
172+
</executions>
173+
</plugin>
166174
<plugin>
167175
<groupId>org.eclipse.jetty</groupId>
168176
<artifactId>jetty-maven-plugin</artifactId>
169-
<version>9.3.7.v20160115</version>
177+
<version>${jetty.version}</version>
170178
<configuration>
171-
<scanIntervalSeconds>-1</scanIntervalSeconds>
172-
<!-- Use test scope because the UI/demo classes are in
173-
the test package. -->
179+
<scanIntervalSeconds>3</scanIntervalSeconds>
180+
<!-- Use test scope because the UI/demo classes are in
181+
the test package. -->
174182
<useTestScope>true</useTestScope>
175-
<webAppConfig>
176-
<resourceBases>
177-
<resourceBase>src/test/resources/META-INF/resources</resourceBase>
178-
<resourceBase>src/main/resources/META-INF/resources</resourceBase>
179-
<!-- This is only needed to be able to unzip webjars
180-
directly into src/test/webjar-debug and modify them for testing -->
181-
<resourceBase>src/test/webjar-debug/META-INF/resources</resourceBase>
182-
</resourceBases>
183-
</webAppConfig>
183+
<supportedPackagings>
184+
<supportedPackaging>jar</supportedPackaging>
185+
</supportedPackagings>
184186
</configuration>
185187
</plugin>
186188
</plugins>
@@ -242,10 +244,162 @@
242244
<additionalparam>-Xdoclint:none</additionalparam>
243245
</configuration>
244246
</plugin>
247+
<plugin>
248+
<groupId>org.apache.maven.plugins</groupId>
249+
<artifactId>maven-jar-plugin</artifactId>
250+
<version>3.1.2</version>
251+
<configuration>
252+
<!-- Generated file that shouldn't be included in add-ons -->
253+
<excludes>
254+
<exclude>META-INF/VAADIN/config/flow-build-info.json</exclude>
255+
</excludes>
256+
</configuration>
257+
</plugin>
245258
</plugins>
246259
</build>
247260
</profile>
248-
</profiles>
249-
</project>
250261

262+
<!-- Run (demo) in production mode-->
263+
<profile>
264+
<id>production</id>
265+
<properties>
266+
<vaadin.productionMode>true</vaadin.productionMode>
267+
</properties>
268+
<dependencies>
269+
<dependency>
270+
<groupId>com.vaadin</groupId>
271+
<artifactId>flow-server-production-mode</artifactId>
272+
</dependency>
273+
</dependencies>
274+
275+
<build>
276+
<plugins>
277+
<plugin>
278+
<groupId>com.vaadin</groupId>
279+
<artifactId>vaadin-maven-plugin</artifactId>
280+
<executions>
281+
<execution>
282+
<goals>
283+
<goal>build-frontend</goal>
284+
</goals>
285+
</execution>
286+
</executions>
287+
</plugin>
288+
</plugins>
289+
</build>
290+
</profile>
291+
292+
<profile>
293+
<id>integration-tests</id>
294+
<build>
295+
<plugins>
296+
<plugin>
297+
<groupId>org.eclipse.jetty</groupId>
298+
<artifactId>jetty-maven-plugin</artifactId>
299+
<version>${jetty.version}</version>
300+
<configuration>
301+
<scanIntervalSeconds>0</scanIntervalSeconds>
302+
<supportedPackagings>
303+
<supportedPackaging>jar</supportedPackaging>
304+
</supportedPackagings>
305+
<stopKey>${project.artifactId}</stopKey>
306+
<stopPort>8081</stopPort>
307+
</configuration>
308+
<executions>
309+
<execution>
310+
<id>start-jetty</id>
311+
<phase>pre-integration-test</phase>
312+
<goals>
313+
<goal>start</goal>
314+
</goals>
315+
</execution>
316+
<execution>
317+
<id>stop-jetty</id>
318+
<phase>post-integration-test</phase>
319+
<goals>
320+
<goal>stop</goal>
321+
</goals>
322+
</execution>
323+
</executions>
324+
</plugin>
325+
326+
<plugin>
327+
<groupId>com.lazerycode.selenium</groupId>
328+
<artifactId>driver-binary-downloader-maven-plugin
329+
</artifactId>
330+
<version>1.0.17</version>
331+
<configuration>
332+
<onlyGetDriversForHostOperatingSystem>
333+
true
334+
</onlyGetDriversForHostOperatingSystem>
335+
<rootStandaloneServerDirectory>
336+
${drivers.dir}/driver
337+
</rootStandaloneServerDirectory>
338+
<downloadedZipFileDirectory>
339+
${drivers.dir}/driver_zips
340+
</downloadedZipFileDirectory>
341+
<customRepositoryMap>
342+
${project.basedir}/drivers.xml
343+
</customRepositoryMap>
344+
</configuration>
345+
<executions>
346+
<execution>
347+
<goals>
348+
<goal>selenium</goal>
349+
</goals>
350+
</execution>
351+
</executions>
352+
</plugin>
251353

354+
<plugin>
355+
<groupId>org.apache.maven.plugins</groupId>
356+
<artifactId>maven-failsafe-plugin</artifactId>
357+
<version>2.22.2</version>
358+
<executions>
359+
<execution>
360+
<goals>
361+
<goal>integration-test</goal>
362+
<goal>verify</goal>
363+
</goals>
364+
</execution>
365+
</executions>
366+
<configuration>
367+
<trimStackTrace>false</trimStackTrace>
368+
<enableAssertions>true</enableAssertions>
369+
<systemPropertyVariables>
370+
<!-- Pass location of downloaded webdrivers to the tests -->
371+
<webdriver.chrome.driver>
372+
${webdriver.chrome.driver}
373+
</webdriver.chrome.driver>
374+
</systemPropertyVariables>
375+
</configuration>
376+
</plugin>
377+
<plugin>
378+
<artifactId>maven-resources-plugin</artifactId>
379+
<version>3.1.0</version>
380+
<executions>
381+
<execution>
382+
<!-- Since the view class is defined in test, after compilation
383+
copy it to the runtime classpath to ensure it gets visited by
384+
vaadin-maven-plugin -->
385+
<id>copy-test-to-classes</id>
386+
<phase>process-test-classes</phase>
387+
<goals>
388+
<goal>copy-resources</goal>
389+
</goals>
390+
<configuration>
391+
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
392+
<resources>
393+
<resource>
394+
<directory>${project.build.testOutputDirectory}</directory>
395+
</resource>
396+
</resources>
397+
</configuration>
398+
</execution>
399+
</executions>
400+
</plugin>
401+
</plugins>
402+
</build>
403+
</profile>
404+
</profiles>
405+
</project>

0 commit comments

Comments
 (0)