Skip to content

Commit 125a0ed

Browse files
authored
Merge pull request #356 from xdev-software/develop
Release
2 parents ad2fef1 + 08012e9 commit 125a0ed

File tree

10 files changed

+71
-16
lines changed

10 files changed

+71
-16
lines changed

.config/pmd/ruleset.xml

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
<!-- Prohibits singleton pattern -->
6060
<exclude name="MutableStaticState"/>
6161

62+
<!-- Checks LoC, already handled by Checkstyle -->
63+
<exclude name="NcssCount"/>
64+
6265
<!-- Some override methods or Junit require this -->
6366
<exclude name="SignatureDeclareThrowsException"/>
6467

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
cache: 'maven'
161161

162162
- name: Build site
163-
run: ../mvnw -B site -DskipTests
163+
run: ../mvnw -B compile site -DskipTests -T2C
164164
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
165165

166166
- name: Deploy to Github pages

.github/workflows/test-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2525

2626
- name: Publish to OSSRH
27-
run: ../mvnw -B deploy -Possrh
27+
run: ../mvnw -B deploy -Possrh -DskipTests
2828
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
2929
env:
3030
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
## 4.1.1
2+
* Only use client-side locale for formatting when no ``formatLocale`` has been set #353
3+
14
## 4.1.0
25
* Updated to Vaadin 24.4
6+
* Minor code improvements
37

48
## 4.0.2
59
* ⚠️ GroupId changed from ``com.xdev-software`` to ``software.xdev``

CONTRIBUTING.md

+28
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,31 @@ If the ``develop`` is ready for release, create a pull request to the ``master``
5858
When the release is finished do the following:
5959
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``
6060
* Ensure that [Vaadin Directory](https://vaadin.com/directory) syncs the update and maybe update the component / version there
61+
62+
### Release failures
63+
64+
There are 2 modes of release failure:
65+
1. The remote server was e.g. down and non of the artifacts got published
66+
2. There was a build failure during release and only parts of the artifacts got released
67+
68+
In case 1 we can re-release the existing version,<br/>in case 2 we have to release a new version when we can't get the artifacts deleted (as is the case with Maven Central)
69+
70+
#### How-to: Re-Releasing an existing version
71+
72+
1. Delete the release on GitHub
73+
2. Delete the release Git tag from the repo (locally and remote!)
74+
3. Delete the ``master``-Branch and re-create it from the ``develop`` branch (or reset it to the state before the release-workflow commits have been done)
75+
* This requires __temporarily__ removing the branch protection
76+
* Once this was done a new release is triggered immediately!
77+
78+
#### How-to: Releasing a new version
79+
80+
1. Merge the ``master`` branch back into ``develop`` (or another temporary branch)
81+
2. Make sure all master branch versions are prepared for a new release<br/>e.g. if the broken release was ``1.0.0`` the version should now be at ``1.0.1-SNAPSHOT`` - the ``SNAPSHOT`` is important for the workflow!
82+
3. Mark the broken release as broken e.g. inside the Changelog, GitHub Release page, etc.<br/>
83+
You can use something like this:
84+
```
85+
> [!WARNING]
86+
> This release is broken as my cat accidentally clicked the abort button during the process
87+
```
88+
4. Merge the changes back into the ``master`` branch to trigger a new release

pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<plugin>
7171
<groupId>org.apache.maven.plugins</groupId>
7272
<artifactId>maven-pmd-plugin</artifactId>
73-
<version>3.23.0</version>
73+
<version>3.24.0</version>
7474
<configuration>
7575
<includeTests>true</includeTests>
7676
<printFailingErrors>true</printFailingErrors>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.3.0</version>
85+
<version>7.4.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.3.0</version>
90+
<version>7.4.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>

renovate.json5

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
"maven"
1010
],
1111
"enabled": false
12+
},
13+
{
14+
"description": "Group net.sourceforge.pmd",
15+
"matchPackagePatterns": [
16+
"^net.sourceforge.pmd"
17+
],
18+
"datasources": [
19+
"maven"
20+
],
21+
"groupName": "net.sourceforge.pmd"
1222
}
1323
]
1424
}

vaadin-date-range-picker-demo/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<mainClass>software.xdev.vaadin.Application</mainClass>
3030

3131
<!-- Dependency-Versions -->
32-
<vaadin.version>24.4.4</vaadin.version>
32+
<vaadin.version>24.4.7</vaadin.version>
3333

34-
<org.springframework.boot.version>3.3.1</org.springframework.boot.version>
34+
<org.springframework.boot.version>3.3.2</org.springframework.boot.version>
3535
</properties>
3636

3737
<dependencyManagement>

vaadin-date-range-picker/pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5050

5151
<!-- Dependency-Versions -->
52-
<vaadin.version>24.4.4</vaadin.version>
52+
<vaadin.version>24.4.7</vaadin.version>
5353
</properties>
5454

5555
<dependencyManagement>
@@ -112,12 +112,12 @@
112112
<plugin>
113113
<groupId>org.apache.maven.plugins</groupId>
114114
<artifactId>maven-site-plugin</artifactId>
115-
<version>4.0.0-M15</version>
115+
<version>4.0.0-M16</version>
116116
</plugin>
117117
<plugin>
118118
<groupId>org.apache.maven.plugins</groupId>
119119
<artifactId>maven-project-info-reports-plugin</artifactId>
120-
<version>3.6.1</version>
120+
<version>3.6.2</version>
121121
</plugin>
122122
</plugins>
123123
</pluginManagement>
@@ -180,7 +180,7 @@
180180
<plugin>
181181
<groupId>org.apache.maven.plugins</groupId>
182182
<artifactId>maven-javadoc-plugin</artifactId>
183-
<version>3.7.0</version>
183+
<version>3.8.0</version>
184184
<executions>
185185
<execution>
186186
<id>attach-javadocs</id>
@@ -333,7 +333,7 @@
333333
<plugin>
334334
<groupId>org.apache.maven.plugins</groupId>
335335
<artifactId>maven-pmd-plugin</artifactId>
336-
<version>3.23.0</version>
336+
<version>3.24.0</version>
337337
<configuration>
338338
<includeTests>true</includeTests>
339339
<printFailingErrors>true</printFailingErrors>
@@ -345,12 +345,12 @@
345345
<dependency>
346346
<groupId>net.sourceforge.pmd</groupId>
347347
<artifactId>pmd-core</artifactId>
348-
<version>7.3.0</version>
348+
<version>7.4.0</version>
349349
</dependency>
350350
<dependency>
351351
<groupId>net.sourceforge.pmd</groupId>
352352
<artifactId>pmd-java</artifactId>
353-
<version>7.3.0</version>
353+
<version>7.4.0</version>
354354
</dependency>
355355
</dependencies>
356356
</plugin>

vaadin-date-range-picker/src/main/java/software/xdev/vaadin/daterange_picker/ui/DateRangePicker.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class DateRangePicker<D extends DateRange> extends Composite<VerticalLayo
7676
/*
7777
* Config
7878
*/
79-
79+
protected boolean useClientSideLocale = true;
8080
protected Optional<Locale> formatLocale = Optional.empty();
8181
protected ItemLabelGenerator<D> dateRangeLocalizerFunction = DateRange::getDefaultDescription;
8282
protected Optional<DatePickerI18n> datePickerI18n = Optional.empty();
@@ -149,8 +149,15 @@ public Optional<DatePickerI18n> getDatePickerI18n()
149149
return this.datePickerI18n;
150150
}
151151

152+
/**
153+
* Sets the locale used for formatting the "expand" button.
154+
* <p>If the locale is <code>null</code> (default) the clientside locale will be used or {@link Locale#US} if none
155+
* could be detected.
156+
* </p>
157+
*/
152158
public DateRangePicker<D> withFormatLocale(final Locale locale)
153159
{
160+
this.useClientSideLocale = locale == null;
154161
this.formatLocale = Optional.ofNullable(locale);
155162
return this;
156163
}
@@ -265,7 +272,10 @@ protected void onAttach(final AttachEvent attachEvent)
265272

266273
protected void setLocaleFromClient()
267274
{
268-
this.formatLocale = Optional.ofNullable(VaadinService.getCurrentRequest().getLocale());
275+
if(this.useClientSideLocale)
276+
{
277+
this.formatLocale = Optional.ofNullable(VaadinService.getCurrentRequest().getLocale());
278+
}
269279
}
270280

271281
protected void addClickOutsideListener()

0 commit comments

Comments
 (0)