Skip to content

Commit 5a5c88b

Browse files
author
Alejandro
authored
Merge pull request #1 from Fork-World/feature/V14RC7
update to V14RC7
2 parents f8b07b9 + 3e4a928 commit 5a5c88b

File tree

4 files changed

+200
-24
lines changed

4 files changed

+200
-24
lines changed

.gitignore

Lines changed: 115 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,123 @@
1-
target/
2-
!.mvn/wrapper/maven-wrapper.jar
3-
rebel.xml
4-
5-
### STS/Eclipse ###
6-
.apt_generated
7-
.classpath
8-
.factorypath
9-
.project
10-
.settings
11-
.springBeans
12-
13-
### IntelliJ IDEA ###
14-
.idea
15-
*.iws
1+
package.json
2+
package-lock.json
3+
webpack.generated.js
4+
webpack.config.js
5+
6+
node
7+
node_modules
8+
9+
1610
*.iml
17-
*.ipr
11+
.idea/*
12+
_data/webdrivers/*
13+
14+
# Created by .ignore support plugin (hsz.mobi)
15+
### JetBrains template
16+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
17+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
18+
19+
# User-specific stuff
20+
.idea/**/workspace.xml
21+
.idea/**/tasks.xml
22+
.idea/**/dictionaries
23+
.idea/**/shelf
24+
25+
# Sensitive or high-churn files
26+
.idea/**/dataSources/
27+
.idea/**/dataSources.ids
28+
.idea/**/dataSources.local.xml
29+
.idea/**/sqlDataSources.xml
30+
.idea/**/dynamic.xml
31+
.idea/**/uiDesigner.xml
32+
33+
# Gradle
34+
.idea/**/gradle.xml
35+
.idea/**/libraries
36+
37+
# CMake
38+
cmake-build-debug/
39+
cmake-build-release/
40+
41+
# Mongo Explorer plugin
42+
.idea/**/mongoSettings.xml
43+
44+
# File-based project format
45+
*.iws
46+
47+
# IntelliJ
48+
out/
49+
50+
# mpeltonen/sbt-idea plugin
51+
.idea_modules/
52+
53+
# JIRA plugin
54+
atlassian-ide-plugin.xml
1855

19-
### NetBeans ###
56+
# Cursive Clojure plugin
57+
.idea/replstate.xml
58+
59+
# Crashlytics plugin (for Android Studio and IntelliJ)
60+
com_crashlytics_export_strings.xml
61+
crashlytics.properties
62+
crashlytics-build.properties
63+
fabric.properties
64+
65+
# Editor-based Rest Client
66+
.idea/httpRequests
67+
### Maven template
68+
target/
69+
pom.xml.tag
70+
pom.xml.releaseBackup
71+
pom.xml.versionsBackup
72+
pom.xml.next
73+
release.properties
74+
dependency-reduced-pom.xml
75+
buildNumber.properties
76+
.mvn/timing.properties
77+
78+
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
79+
!/.mvn/wrapper/maven-wrapper.jar
80+
### Java template
81+
# Compiled class file
82+
*.class
83+
84+
# Log file
85+
*.log
86+
87+
# BlueJ files
88+
*.ctxt
89+
90+
# Mobile Tools for Java (J2ME)
91+
.mtj.tmp/
92+
93+
# Package Files #
94+
*.jar
95+
*.war
96+
*.nar
97+
*.ear
98+
*.zip
99+
*.tar.gz
100+
*.rar
101+
102+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
103+
hs_err_pid*
104+
### Kotlin template
105+
# Compiled class file
106+
107+
# Log file
108+
109+
# BlueJ files
110+
111+
# Mobile Tools for Java (J2ME)
112+
113+
# Package Files #
114+
115+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
116+
### NetBeans template
20117
nbproject/private/
21118
build/
22119
nbbuild/
23120
dist/
24121
nbdist/
25122
.nb-gradle/
123+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function greet(name, element) {
1+
window.greet = function greet(name, element) {
22
console.log("Hi, " + name);
33
element.$server.greet("server");
4-
}
4+
}

pom.xml

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<failOnMissingWebXml>false</failOnMissingWebXml>
1414

15-
<vaadin.version>12.0.3</vaadin.version>
15+
<!-- <vaadin.version>12.0.3</vaadin.version>-->
16+
<vaadin.version>14.0.0.rc7</vaadin.version>
17+
<frontend-maven-plugin.nodeVersion>v10.16.0</frontend-maven-plugin.nodeVersion>
18+
<frontend-maven-plugin.npmVersion>6.9.0</frontend-maven-plugin.npmVersion>
1619
</properties>
1720

1821
<repositories>
@@ -49,9 +52,38 @@
4952
</dependencyManagement>
5053

5154
<dependencies>
55+
<!--Vaadin -->
5256
<dependency>
5357
<groupId>com.vaadin</groupId>
58+
<!-- Replace artifactId with vaadin-core to use only free components -->
5459
<artifactId>vaadin-core</artifactId>
60+
<exclusions>
61+
<!-- Webjars are only needed when running in Vaadin 13 compatibility mode -->
62+
<exclusion>
63+
<groupId>com.vaadin.webjar</groupId>
64+
<artifactId>*</artifactId>
65+
</exclusion>
66+
<exclusion>
67+
<groupId>org.webjars.bowergithub.insites</groupId>
68+
<artifactId>*</artifactId>
69+
</exclusion>
70+
<exclusion>
71+
<groupId>org.webjars.bowergithub.polymer</groupId>
72+
<artifactId>*</artifactId>
73+
</exclusion>
74+
<exclusion>
75+
<groupId>org.webjars.bowergithub.polymerelements</groupId>
76+
<artifactId>*</artifactId>
77+
</exclusion>
78+
<exclusion>
79+
<groupId>org.webjars.bowergithub.vaadin</groupId>
80+
<artifactId>*</artifactId>
81+
</exclusion>
82+
<exclusion>
83+
<groupId>org.webjars.bowergithub.webcomponents</groupId>
84+
<artifactId>*</artifactId>
85+
</exclusion>
86+
</exclusions>
5587
</dependency>
5688

5789
<!-- Added to provide logging output as Flow uses -->
@@ -75,7 +107,7 @@
75107
<plugin>
76108
<groupId>org.eclipse.jetty</groupId>
77109
<artifactId>jetty-maven-plugin</artifactId>
78-
<version>9.4.11.v20180605</version>
110+
<version>9.4.19.v20190610</version>
79111
<configuration>
80112
<scanIntervalSeconds>1</scanIntervalSeconds>
81113
</configuration>
@@ -117,5 +149,52 @@
117149
</plugins>
118150
</build>
119151
</profile>
152+
<profile>
153+
<id>vaadin-install-nodejs</id>
154+
<activation>
155+
<activeByDefault>true</activeByDefault>
156+
</activation>
157+
<build>
158+
<plugins>
159+
<plugin>
160+
<groupId>com.vaadin</groupId>
161+
<artifactId>vaadin-maven-plugin</artifactId>
162+
<version>${vaadin.version}</version>
163+
<executions>
164+
<execution>
165+
<goals>
166+
<goal>prepare-frontend</goal>
167+
<goal>build-frontend</goal>
168+
</goals>
169+
</execution>
170+
</executions>
171+
</plugin>
172+
<plugin>
173+
<groupId>com.github.eirslett</groupId>
174+
<artifactId>frontend-maven-plugin</artifactId>
175+
<version>1.7.6</version>
176+
<executions>
177+
<execution>
178+
<!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
179+
<id>install node and npm</id>
180+
<goals>
181+
<goal>install-node-and-npm</goal>
182+
</goals>
183+
<!-- optional: default phase is "generate-resources" -->
184+
<phase>generate-resources</phase>
185+
</execution>
186+
</executions>
187+
<configuration>
188+
<nodeVersion>${frontend-maven-plugin.nodeVersion}</nodeVersion>
189+
<!-- optional: with node version greater than 4.0.0 will use npm provided by node distribution -->
190+
<npmVersion>${frontend-maven-plugin.npmVersion}</npmVersion>
191+
<!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
192+
<!-- <downloadRoot>http://myproxy.example.org/nodejs/</downloadRoot>-->
193+
<installDirectory>${frontend-maven-plugin.installDirectory}</installDirectory>
194+
</configuration>
195+
</plugin>
196+
</plugins>
197+
</build>
198+
</profile>
120199
</profiles>
121200
</project>

src/main/java/com/example/MainView.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
import com.vaadin.flow.component.html.Div;
66
import com.vaadin.flow.router.Route;
77

8-
@JavaScript("frontend://script.js")
8+
@JavaScript("./script.js")
99
@Route
1010
public class MainView extends Div {
1111

1212
public MainView() {
13-
getElement().executeJavaScript("greet($0, $1)", "client", getElement());
13+
getElement().executeJs("greet($0,$1)", "client", getElement());
1414
}
1515

1616
@ClientCallable
1717
public void greet(String name) {
1818
System.out.println("Hi, " + name);
1919
}
20-
2120
}

0 commit comments

Comments
 (0)