Skip to content

Commit 9badb32

Browse files
committed
Update from Jackson 2 -> 3 to support Vaadin 25
1 parent 115ab92 commit 9badb32

File tree

7 files changed

+44
-37
lines changed

7 files changed

+44
-37
lines changed

pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.vaadin.addons.componentfactory</groupId>
88
<artifactId>vcf-input-mask-parent</artifactId>
9-
<version>2.2.1-SNAPSHOT</version>
9+
<version>3.0.0</version>
1010
<packaging>pom</packaging>
1111
<name>Input Mask Add-on Parent</name>
1212

@@ -16,11 +16,6 @@
1616
</organization>
1717

1818
<distributionManagement>
19-
<snapshotRepository>
20-
<id>vaadin-snapshots</id>
21-
<name>Vaadin snapshot repository</name>
22-
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
23-
</snapshotRepository>
2419
<repository>
2520
<id>vaadin-addons</id>
2621
<name>Vaadin add-ons repository</name>

vcf-input-mask-demo/pom.xml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
<packaging>war</packaging>
1010
<name>Input Maks Add-on Demo</name>
1111

12-
<version>2.2.1-SNAPSHOT</version>
12+
<version>3.0.0</version>
1313
<inceptionYear>2023</inceptionYear>
1414
<organization>
1515
<name>Vaadin Ltd</name>
1616
<url>http://vaadin.com/</url>
1717
</organization>
1818

1919
<properties>
20-
<vaadin.version>23.3.26</vaadin.version>
21-
<maven.compiler.source>11</maven.compiler.source>
22-
<maven.compiler.target>11</maven.compiler.target>
20+
<vaadin.version>25.0.0</vaadin.version>
21+
<maven.compiler.source>21</maven.compiler.source>
22+
<maven.compiler.target>21</maven.compiler.target>
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<failOnMissingWebXml>false</failOnMissingWebXml>
2525
</properties>
@@ -42,6 +42,10 @@
4242
<groupId>com.vaadin</groupId>
4343
<artifactId>vaadin-core</artifactId>
4444
</dependency>
45+
<dependency>
46+
<groupId>com.vaadin</groupId>
47+
<artifactId>vaadin-dev</artifactId>
48+
</dependency>
4549

4650
<!-- Component -->
4751
<dependency>
@@ -89,11 +93,11 @@
8993
</plugin>
9094
<!-- We use jetty plugin, replace it with your favourite developing servlet container -->
9195
<plugin>
92-
<groupId>org.eclipse.jetty</groupId>
93-
<artifactId>jetty-maven-plugin</artifactId>
94-
<version>9.4.43.v20210629</version>
96+
<groupId>org.eclipse.jetty.ee10</groupId>
97+
<artifactId>jetty-ee10-maven-plugin</artifactId>
98+
<version>12.0.15</version>
9599
<configuration>
96-
<scanIntervalSeconds>1</scanIntervalSeconds>
100+
<scan>1</scan>
97101
</configuration>
98102
</plugin>
99103
<!--
@@ -105,13 +109,10 @@
105109
<groupId>com.vaadin</groupId>
106110
<artifactId>vaadin-maven-plugin</artifactId>
107111
<version>${vaadin.version}</version>
108-
<executions>
109-
<execution>
110-
<goals>
111-
<goal>prepare-frontend</goal>
112-
</goals>
113-
</execution>
114-
</executions>
112+
<configuration>
113+
<pnpmEnable>true</pnpmEnable>
114+
<requireHomeNodeExec>true</requireHomeNodeExec>
115+
</configuration>
115116
</plugin>
116117
</plugins>
117118
</build>

vcf-input-mask-demo/src/main/java/com/vaadin/componentfactory/demo/BaseDemoView.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* Base code used in the demo.
1313
*/
1414
@SuppressWarnings("serial")
15-
@CssImport("./styles/demo.css")
1615
public class BaseDemoView extends Div {
1716

1817
protected static final String PHONE_MASK = "(000) 000-0000";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.vaadin.componentfactory.demo;
2+
3+
import com.vaadin.flow.component.dependency.StyleSheet;
4+
import com.vaadin.flow.component.page.AppShellConfigurator;
5+
import com.vaadin.flow.theme.lumo.Lumo;
6+
7+
@StyleSheet("demo.css")
8+
@StyleSheet(Lumo.STYLESHEET)
9+
public class Config implements AppShellConfigurator {
10+
11+
}
File renamed without changes.

vcf-input-mask/pom.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010

1111
<name>Input Mask Add-on</name>
1212

13-
<version>2.2.1-SNAPSHOT</version>
13+
<version>3.0.0</version>
1414
<inceptionYear>2023</inceptionYear>
1515
<organization>
1616
<name>Vaadin Ltd</name>
1717
<url>http://vaadin.com/</url>
1818
</organization>
1919

2020
<properties>
21-
<vaadin.version>23.3.26</vaadin.version>
22-
<flow.version>23.3.22</flow.version>
23-
<maven.compiler.source>11</maven.compiler.source>
24-
<maven.compiler.target>11</maven.compiler.target>
21+
<vaadin.version>25.0.0</vaadin.version>
22+
<maven.compiler.source>21</maven.compiler.source>
23+
<maven.compiler.target>21</maven.compiler.target>
2524
</properties>
2625

2726
<dependencyManagement>
@@ -46,7 +45,7 @@
4645
<dependency>
4746
<groupId>com.vaadin</groupId>
4847
<artifactId>flow-test-generic</artifactId>
49-
<version>${flow.version}</version>
48+
<version>25.0.0</version>
5049
<scope>test</scope>
5150
</dependency>
5251
<dependency>
@@ -62,9 +61,9 @@
6261
<scope>test</scope>
6362
</dependency>
6463
<dependency>
65-
<groupId>javax.servlet</groupId>
66-
<artifactId>javax.servlet-api</artifactId>
67-
<version>3.0.1</version>
64+
<groupId>jakarta.servlet</groupId>
65+
<artifactId>jakarta.servlet-api</artifactId>
66+
<version>6.0.0</version>
6867
<scope>provided</scope>
6968
</dependency>
7069
</dependencies>
@@ -120,7 +119,7 @@
120119
<plugin>
121120
<groupId>org.apache.maven.plugins</groupId>
122121
<artifactId>maven-assembly-plugin</artifactId>
123-
<version>2.6</version>
122+
<version>3.3.0</version>
124123
<configuration>
125124
<appendAssemblyId>false</appendAssemblyId>
126125
<descriptors>
@@ -153,7 +152,7 @@
153152
<plugin>
154153
<groupId>org.apache.maven.plugins</groupId>
155154
<artifactId>maven-javadoc-plugin</artifactId>
156-
<version>2.10.4</version>
155+
<version>3.0.1</version>
157156
<executions>
158157
<execution>
159158
<id>attach-javadocs</id>
@@ -166,7 +165,7 @@
166165
<configuration>
167166
<quiet>true</quiet>
168167
<additionalparam>-Xdoclint:none</additionalparam>
169-
<source>8</source>
168+
<source>21</source>
170169
</configuration>
171170
</plugin>
172171
</plugins>

vcf-input-mask/src/main/java/com/vaadin/componentfactory/addons/inputmask/InputMask.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
package com.vaadin.componentfactory.addons.inputmask;
1515

1616
import static com.vaadin.componentfactory.addons.inputmask.InputMaskOption.option;
17-
import com.fasterxml.jackson.core.JsonProcessingException;
18-
import com.fasterxml.jackson.databind.ObjectMapper;
1917
import com.vaadin.flow.component.AbstractSinglePropertyField;
2018
import com.vaadin.flow.component.Component;
2119
import com.vaadin.flow.component.HasValidation;
@@ -28,6 +26,10 @@
2826
import com.vaadin.flow.dom.Element;
2927
import com.vaadin.flow.function.SerializableConsumer;
3028
import com.vaadin.flow.shared.Registration;
29+
30+
import tools.jackson.core.JacksonException;
31+
import tools.jackson.databind.ObjectMapper;
32+
3133
import java.lang.ref.WeakReference;
3234
import java.util.ArrayList;
3335
import java.util.Arrays;
@@ -94,7 +96,7 @@ private void extend(Component component, UI ui) {
9496
}
9597
});
9698
}
97-
} catch (JsonProcessingException ex) {
99+
} catch (JacksonException ex) {
98100
logger.error("Error serializing InputMask options", ex);
99101
}
100102
}

0 commit comments

Comments
 (0)