Skip to content

Commit b058b53

Browse files
authored
Merge branch 'master' into dependabot/maven/org.apache.maven.plugins-maven-install-plugin-3.1.1
2 parents 958d041 + 4d60da9 commit b058b53

36 files changed

+285
-60
lines changed

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v2
25-
- name: Set up JDK 1.8
25+
- name: Set up JDK 17
2626
uses: actions/setup-java@v1
2727
with:
28-
java-version: 1.8
28+
java-version: 17
2929
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
3030
settings-path: ${{ github.workspace }} # location for the settings.xml file
3131

.github/workflows/maven-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
java: [ '16' ]
21+
java: [ '17' ]
2222

2323
runs-on: ubuntu-latest
2424

.sdkmanrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Enable auto-env through the sdkman_auto_env config
2+
# Add key=value pairs of SDKs to use below
3+
java=17.0.11-zulu

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cron-utils is available on [Maven central](http://search.maven.org/#search%7Cga%
1616
<dependency>
1717
<groupId>com.cronutils</groupId>
1818
<artifactId>cron-utils</artifactId>
19-
<version>9.2.0</version>
19+
<version>9.2.1</version>
2020
</dependency>
2121

2222
For Android developers, cron-utils 7.0.0 assumes Android 26+. For earlier Android versions consider using cron-utils 6.0.6.

pom.xml

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonatype.oss</groupId>
77
<artifactId>oss-parent</artifactId>
8-
<version>7</version>
8+
<version>9</version>
99
</parent>
1010

1111
<groupId>com.cronutils</groupId>
@@ -59,9 +59,9 @@
5959
</distributionManagement>
6060

6161
<properties>
62-
<slf4j.version>2.0.7</slf4j.version>
63-
<junit.version>5.8.1</junit.version>
64-
<mockito.version>4.11.0</mockito.version>
62+
<slf4j.version>2.0.13</slf4j.version>
63+
<junit.version>5.10.2</junit.version>
64+
<mockito.version>5.2.0</mockito.version>
6565

6666
<github.global.server>github</github.global.server>
6767
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -76,9 +76,9 @@
7676
<version>${slf4j.version}</version>
7777
</dependency>
7878
<dependency>
79-
<groupId>javax.validation</groupId>
80-
<artifactId>validation-api</artifactId>
81-
<version>2.0.1.Final</version>
79+
<groupId>jakarta.validation</groupId>
80+
<artifactId>jakarta.validation-api</artifactId>
81+
<version>3.0.2</version>
8282
<scope>provided</scope>
8383
</dependency>
8484

@@ -108,26 +108,23 @@
108108
<scope>test</scope>
109109
</dependency>
110110
<dependency>
111-
<groupId>org.apache.bval</groupId>
112-
<artifactId>bval-jsr</artifactId>
113-
<version>2.0.6</version>
114-
<!--The Hibernate dependency is no longer used, due to security vulnerabilities -->
115-
<!-- https://stackoverflow.com/questions/48323244/java-lang-nosuchmethoderror-javax-validation-bootstrapconfiguration-getclockproExecutionTimeQuartzIntegrationTest -->
116-
<!-- https://stackoverflow.com/questions/24386771/javax-validation-validationexception-hv000183-unable-to-load-javax-el-express -->
111+
<groupId>org.hibernate.validator</groupId>
112+
<artifactId>hibernate-validator</artifactId>
113+
<version>8.0.1.Final</version>
117114
<scope>test</scope>
118115
</dependency>
119116
<dependency>
120117
<groupId>org.springframework</groupId>
121118
<artifactId>spring-context</artifactId>
122-
<version>5.3.26</version>
119+
<version>6.1.6</version>
123120
<scope>test</scope>
124121
</dependency>
125122

126123

127124
<dependency>
128-
<groupId>javax.el</groupId>
129-
<artifactId>javax.el-api</artifactId>
130-
<version>3.0.0</version>
125+
<groupId>jakarta.el</groupId>
126+
<artifactId>jakarta.el-api</artifactId>
127+
<version>6.0.0</version>
131128
<scope>provided</scope>
132129
</dependency>
133130
<dependency>
@@ -139,7 +136,7 @@
139136
<dependency>
140137
<groupId>org.projectlombok</groupId>
141138
<artifactId>lombok</artifactId>
142-
<version>1.18.26</version>
139+
<version>1.18.32</version>
143140
<scope>provided</scope>
144141
</dependency>
145142
</dependencies>
@@ -149,24 +146,24 @@
149146
<plugin>
150147
<groupId>org.apache.maven.plugins</groupId>
151148
<artifactId>maven-checkstyle-plugin</artifactId>
152-
<version>3.2.1</version>
149+
<version>3.3.1</version>
153150
<configuration>
154151
<configLocation>config/checkstyle.xml</configLocation>
155152
</configuration>
156153
</plugin>
157154
<plugin>
158155
<groupId>org.apache.maven.plugins</groupId>
159156
<artifactId>maven-compiler-plugin</artifactId>
160-
<version>3.11.0</version>
157+
<version>3.13.0</version>
161158
<configuration>
162-
<source>1.8</source>
163-
<target>1.8</target>
159+
<source>17</source>
160+
<target>17</target>
164161
</configuration>
165162
</plugin>
166163
<plugin>
167164
<groupId>org.apache.maven.plugins</groupId>
168165
<artifactId>maven-assembly-plugin</artifactId>
169-
<version>3.5.0</version>
166+
<version>3.7.1</version>
170167
<configuration>
171168
<archive>
172169
<manifest>
@@ -181,7 +178,7 @@
181178
<plugin>
182179
<groupId>org.apache.maven.plugins</groupId>
183180
<artifactId>maven-source-plugin</artifactId>
184-
<version>3.2.1</version>
181+
<version>3.3.1</version>
185182
<executions>
186183
<execution>
187184
<id>attach-sources</id>
@@ -194,17 +191,17 @@
194191
<plugin>
195192
<groupId>org.apache.maven.plugins</groupId>
196193
<artifactId>maven-clean-plugin</artifactId>
197-
<version>3.2.0</version>
194+
<version>3.3.2</version>
198195
</plugin>
199196
<plugin>
200197
<groupId>org.apache.maven.plugins</groupId>
201198
<artifactId>maven-install-plugin</artifactId>
202-
<version>3.1.1</version>
199+
<version>3.1.2</version>
203200
</plugin>
204201
<plugin>
205202
<groupId>org.apache.maven.plugins</groupId>
206203
<artifactId>maven-jar-plugin</artifactId>
207-
<version>3.3.0</version>
204+
<version>3.4.1</version>
208205
<configuration>
209206
<archive>
210207
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
@@ -221,12 +218,12 @@
221218
<plugin>
222219
<groupId>org.apache.maven.plugins</groupId>
223220
<artifactId>maven-resources-plugin</artifactId>
224-
<version>3.3.0</version>
221+
<version>3.3.1</version>
225222
</plugin>
226223
<plugin>
227224
<groupId>org.apache.maven.plugins</groupId>
228225
<artifactId>maven-javadoc-plugin</artifactId>
229-
<version>3.5.0</version>
226+
<version>3.6.3</version>
230227
<executions>
231228
<execution>
232229
<id>attach-javadocs</id>
@@ -244,12 +241,12 @@
244241
<plugin>
245242
<groupId>org.apache.maven.plugins</groupId>
246243
<artifactId>maven-surefire-plugin</artifactId>
247-
<version>3.0.0</version>
244+
<version>3.2.5</version>
248245
</plugin>
249246
<plugin>
250247
<groupId>org.apache.maven.plugins</groupId>
251248
<artifactId>maven-deploy-plugin</artifactId>
252-
<version>3.1.0</version>
249+
<version>3.1.2</version>
253250
</plugin>
254251
<plugin>
255252
<groupId>org.sonatype.plugins</groupId>
@@ -265,7 +262,7 @@
265262
<plugin>
266263
<groupId>org.codehaus.mojo</groupId>
267264
<artifactId>findbugs-maven-plugin</artifactId>
268-
<version>2.5.3</version>
265+
<version>3.0.5</version>
269266
</plugin>
270267
<plugin>
271268
<groupId>org.codehaus.mojo</groupId>
@@ -275,14 +272,14 @@
275272
<plugin>
276273
<groupId>org.codehaus.mojo</groupId>
277274
<artifactId>versions-maven-plugin</artifactId>
278-
<version>2.1</version>
275+
<version>2.16.2</version>
279276
</plugin>
280277

281278
<!-- Get code coverage reports! -->
282279
<plugin>
283280
<groupId>org.jacoco</groupId>
284281
<artifactId>jacoco-maven-plugin</artifactId>
285-
<version>0.8.6</version>
282+
<version>0.8.12</version>
286283

287284
<executions>
288285
<execution>
@@ -305,7 +302,7 @@
305302
<plugin>
306303
<groupId>org.apache.felix</groupId>
307304
<artifactId>maven-bundle-plugin</artifactId>
308-
<version>5.1.8</version>
305+
<version>5.1.9</version>
309306
<executions>
310307
<execution>
311308
<id>bundle-manifest</id>
@@ -342,7 +339,7 @@
342339
<plugin>
343340
<groupId>org.apache.maven.plugins</groupId>
344341
<artifactId>maven-gpg-plugin</artifactId>
345-
<version>3.0.1</version>
342+
<version>3.2.4</version>
346343
<executions>
347344
<execution>
348345
<id>sign-artifacts</id>
@@ -371,7 +368,7 @@
371368
<plugin>
372369
<groupId>org.eluder.coveralls</groupId>
373370
<artifactId>coveralls-maven-plugin</artifactId>
374-
<version>2.2.0</version>
371+
<version>4.3.0</version>
375372
</plugin>
376373
</plugins>
377374
</build>

src/main/java/com/cronutils/descriptor/DescriptionStrategy.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected String describe(final Between between, final boolean and) {
157157
protected String describe(final Every every, final boolean and) {
158158
String description;
159159
if (every.getPeriod().getValue() > 1) {
160-
description = String.format("%s %s ", bundle.getString(EVERY), nominalValue(every.getPeriod()))
160+
description = String.format("%s %s ", bundle.getString(EVERY), every.getPeriod())
161161
+ " replace_plural ";
162162
} else {
163163
description = bundle.getString(EVERY) + " %s ";
@@ -167,6 +167,10 @@ protected String describe(final Every every, final boolean and) {
167167
description += MessageFormat.format(bundle.getString("between_x_and_y"), nominalValue(between.getFrom()),
168168
nominalValue(between.getTo())) + WHITE_SPACE;
169169
}
170+
if (every.getExpression() instanceof On) {
171+
final On on = (On) every.getExpression();
172+
description += bundle.getString("from") + " %s " + nominalValue(on.getTime());
173+
}
170174
return description;
171175
}
172176

src/main/java/com/cronutils/mapper/CronMapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import com.cronutils.model.field.definition.FieldDefinition;
3030
import com.cronutils.model.field.expression.*;
3131
import com.cronutils.model.field.expression.visitor.FieldExpressionVisitorAdaptor;
32-
import com.cronutils.model.field.expression.visitor.ValueMappingFieldExpressionVisitor;
3332
import com.cronutils.model.field.value.FieldValue;
3433
import com.cronutils.model.field.value.IntegerFieldValue;
3534
import com.cronutils.model.field.value.SpecialChar;
@@ -286,12 +285,14 @@ static Function<CronField, CronField> dayOfWeekMapping(final DayOfWeekFieldDefin
286285
final FieldExpression expression = field.getExpression();
287286
FieldExpression dest = null;
288287
dest = expression.accept(new FieldExpressionVisitorAdaptor() {
288+
@Override
289289
public FieldExpression visit(Every every) {
290290
return new Every(every.getExpression().accept(this), every.getPeriod());
291291
}
292292

293+
@Override
293294
public FieldExpression visit(On on) {
294-
return new On(mapDayOfWeek(sourceDef, targetDef, on.getTime()), on.getSpecialChar());
295+
return new On(mapDayOfWeek(sourceDef, targetDef, on.getTime()), on.getSpecialChar(), on.getNth());
295296
}
296297

297298
@Override

src/main/java/com/cronutils/validation/Cron.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import com.cronutils.model.CronType;
44

5-
import javax.validation.Constraint;
6-
import javax.validation.Payload;
5+
import jakarta.validation.Constraint;
6+
import jakarta.validation.Payload;
77
import java.lang.annotation.*;
88

99
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})

src/main/java/com/cronutils/validation/CronValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import com.cronutils.model.definition.CronDefinitionBuilder;
66
import com.cronutils.parser.CronParser;
77

8-
import javax.validation.ConstraintValidator;
9-
import javax.validation.ConstraintValidatorContext;
8+
import jakarta.validation.ConstraintValidator;
9+
import jakarta.validation.ConstraintValidatorContext;
1010

1111
public class CronValidator implements ConstraintValidator<Cron, String> {
1212

src/main/resources/com/cronutils/CronUtilsI18N.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=between {0} and {1}
22
every=every
33
and=and
44
at=at
5+
from=from
56
day=day
67
days=days
78
hour=hour

src/main/resources/com/cronutils/CronUtilsI18N_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=zwischen {0} und {1}
22
every=jede
33
and=und
44
at=um
5+
from=von
56
day=Tag
67
days=Tage
78
hour=Stunde

src/main/resources/com/cronutils/CronUtilsI18N_el.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=\u03BC\u03B5\u03C4\u03B1\u03BE\u03CD {0} \u03BA\u03B1\u03B9 {1}
22
every=\u03BA\u03AC\u03B8\u03B5
33
and=\u03BA\u03B1\u03B9
44
at=\u03C3\u03C4\u03BF/\u03C3\u03C4\u03B7/\u03C3\u03C4\u03B9\u03C2/\u03C4\u03B7
5+
from=\u03B1\u03C0\u03CC
56
day=\u03BC\u03AD\u03C1\u03B1
67
days=\u03BC\u03AD\u03C1\u03B5\u03C2
78
hour=\u03CE\u03C1\u03B1

src/main/resources/com/cronutils/CronUtilsI18N_en.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=between {0} and {1}
22
every=every
33
and=and
44
at=at
5+
from=from
56
day=day
67
days=days
78
hour=hour

src/main/resources/com/cronutils/CronUtilsI18N_es.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=entre {0} y {1}
22
every=cada
33
and=y
44
at=en
5+
from=de
56
day=dia
67
days=dias
78
hour=hora
@@ -21,6 +22,6 @@ last=ultimo
2122
the_nearest_weekday_to_the=dia de semana mas cercano a
2223
last_day_of_month=ultimo dia del mes
2324
last_weekday_of_month=ultimo dia de semana del mes
24-
day_before_last_day_of_month=un día antes del último día del mes
25-
days_before_last_day_of_month={0} días antes del último día del mes
25+
day_before_last_day_of_month=un d�a antes del �ltimo d�a del mes
26+
days_before_last_day_of_month={0} d�as antes del �ltimo d�a del mes
2627

src/main/resources/com/cronutils/CronUtilsI18N_fr.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ every=chaque
33
second=seconde
44
and=et
55
at=\u00e0
6+
from=de
67
day=jour
78
hour=heure
89
hours=heures

src/main/resources/com/cronutils/CronUtilsI18N_id.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=antara {0} dan {1}
22
every=setiap
33
and=dan
44
at=di
5+
from=dari
56
day=hari
67
days=hari
78
hour=jam

src/main/resources/com/cronutils/CronUtilsI18N_it.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ between_x_and_y=tra {0} e {1}
22
every=ogni
33
and=e
44
at=alle
5+
from=da
56
day=giorno
67
days=giorni
78
hour=ora

0 commit comments

Comments
 (0)