Skip to content

Commit

Permalink
Version 7.0.0 release
Browse files Browse the repository at this point in the history
1. Bumped JDK to 17
2. Bumped data-faker to 2.1.x from 1.6.x
3. Bumped validation framework to jakarta from javax

+ other 3PP Version bump.
  • Loading branch information
dvgaba committed Jan 16, 2024
1 parent 722362c commit 5f4e2c0
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
uses: actions/checkout@v1
with:
ref: master
- name: Set up JDK 16
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 16
java-version: 17
- name: Build with Maven
run: mvn clean package
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Active

## Latest news
* 1/15/2024 7.0.0 Major release, default Java version bumped to 17 and other 3PP version bump. [Breaking changes].
* 9/1/2023 6.2.1 Minor release to initialize leaf nodes for Records [Breaking change].
* 8/10/2023 6.2.0 Minor release to add custom radomizer support for protobuf, 3PP and code refactoring.
* 5/23/2023 6.1.8 Patch release to fix [#26](https://github.com/dvgaba/easy-random/issues/26) and [#28](https://github.com/dvgaba/easy-random/issues/28), thanks @[carborgar](https://github.com/carborgar).
Expand Down
19 changes: 13 additions & 6 deletions easy-random-bean-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random</artifactId>
<version>6.2.1</version>
<version>7.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>easy-random-bean-validation</artifactId>
Expand Down Expand Up @@ -53,25 +53,32 @@
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random-randomizers</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<artifactId>jakarta.el</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;
import org.jeasy.random.EasyRandomParameters;
import org.jeasy.random.annotation.Priority;
import org.jeasy.random.api.Randomizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

import java.lang.reflect.Field;
import java.math.BigDecimal;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import org.jeasy.random.api.Randomizer;
import org.jeasy.random.util.ReflectionUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

import java.lang.reflect.Field;
import java.math.BigDecimal;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import org.jeasy.random.api.Randomizer;
import org.jeasy.random.util.ReflectionUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.lang.reflect.Field;
import java.util.Random;
import javax.validation.constraints.Pattern;
import jakarta.validation.constraints.Pattern;
import org.jeasy.random.api.Randomizer;
import org.jeasy.random.randomizers.RegularExpressionRandomizer;
import org.jeasy.random.util.ReflectionUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Collection;
import java.util.EnumMap;
import java.util.Map;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.Size;
import org.jeasy.random.EasyRandom;
import org.jeasy.random.EasyRandomParameters;
import org.jeasy.random.api.Randomizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.*;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;

class BeanValidationAnnotatedBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.*;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;

class BeanValidationMethodAnnotatedBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
import java.util.Date;
import java.util.List;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Valid;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.Valid;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import jakarta.validation.ValidatorFactory;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.jeasy.random.EasyRandom;
import org.jeasy.random.EasyRandomParameters;
import org.jeasy.random.randomizers.range.BigDecimalRangeRandomizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.jeasy.random.validation;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class BeanValidationWithoutReadMethodBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package org.jeasy.random.validation;

import java.util.List;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.Size;

public class EmbeddedBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.jeasy.random.validation;

import javax.validation.constraints.Digits;
import jakarta.validation.constraints.Digits;
import org.jeasy.random.EasyRandomParameters;

public class MyCustomBeanValidationRandomizerRegistry extends BeanValidationRandomizerRegistry {
Expand Down
2 changes: 1 addition & 1 deletion easy-random-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random</artifactId>
<version>6.2.1</version>
<version>7.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>easy-random-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion easy-random-protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random</artifactId>
<version>6.2.1</version>
<version>7.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>easy-random-protobuf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion easy-random-randomizers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random</artifactId>
<version>6.2.1</version>
<version>7.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>easy-random-randomizers</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ static Object[][] generateSeededRandomizersAndTheirExpectedValues() {
{ new CityRandomizer(SEED), "Breannaberg" },
{ new CompanyRandomizer(SEED), "Hegmann, Hansen and Mills" },
{ new CountryRandomizer(SEED), "Peru" },
{ new CreditCardNumberRandomizer(SEED), "1211-1221-1234-2201" },
{ new CreditCardNumberRandomizer(SEED), "6762-0695-7475-3962" },
{ new EmailRandomizer(SEED), "[email protected]" },
{ new FirstNameRandomizer(SEED), "Jacob" },
{ new FullNameRandomizer(SEED), "Breanna Mills" },
{ new Ipv4AddressRandomizer(SEED), "16.188.76.229" },
{ new Ipv6AddressRandomizer(SEED), "b3f4:4994:c9e8:b21a:c493:e923:f711:1115" },
{ new IsbnRandomizer(SEED), "9781786075390" },
{ new Ipv6AddressRandomizer(SEED), "d119:54cc:1cbd:a03d:6170:26a2:57ab:af62" },
{ new IsbnRandomizer(SEED), "9790893392719" },
{ new LastNameRandomizer(SEED), "Durgan" },
{ new LatitudeRandomizer(SEED), "40.17135654" },
{ new LongitudeRandomizer(SEED), "80.34271308" },
Expand All @@ -87,13 +87,13 @@ static Object[][] generateSeededRandomizersAndTheirExpectedValues() {
new ParagraphRandomizer(SEED),
"Totam assumenda eius autem similique. Aut voluptatem enim praesentium. Suscipit cupiditate doloribus debitis dolor. Cumque sapiente occaecati. Quos maiores quae.",
},
{ new PhoneNumberRandomizer(SEED), "1-352-773-9574" },
{ new PhoneNumberRandomizer(SEED), "(352) 773-9574 x7539" },
{ new RegularExpressionRandomizer("\\d+[A-Z]{5}", SEED), "8UYSMT" },
{ new SentenceRandomizer(SEED), "Dolor totam assumenda eius autem." },
{ new StateRandomizer(SEED), "North Carolina" },
{ new StreetRandomizer(SEED), "Hegmann Locks" },
{ new WordRandomizer(SEED), "repellat" },
{ new ZipCodeRandomizer(SEED), "06957" },
{ new ZipCodeRandomizer(SEED), "20695" },
};
}

Expand All @@ -108,16 +108,16 @@ void shouldGenerateTheSameValueForTheSameSeed(Randomizer<?> randomizer, Object e

static Object[][] generateSeededRandomizersWithLocaleAndTheirExpectedValues() {
return new Object[][] {
{ new CityRandomizer(SEED, LOCALE), "Versailles" },
{ new CityRandomizer(SEED, LOCALE), "Neuilly-sur-Seine" },
{ new CompanyRandomizer(SEED, LOCALE), "Masson et Lambert" },
{ new CountryRandomizer(SEED, LOCALE), "Peru" },
{ new CreditCardNumberRandomizer(SEED, LOCALE), "1211-1221-1234-2201" },
{ new CreditCardNumberRandomizer(SEED, LOCALE), "6762-0695-7475-3962" },
{ new EmailRandomizer(SEED, LOCALE), "[email protected]" },
{ new FirstNameRandomizer(SEED, LOCALE), "Alice" },
{ new FullNameRandomizer(SEED, LOCALE), "Masson Emilie" },
{ new Ipv4AddressRandomizer(SEED, LOCALE), "16.188.76.229" },
{ new Ipv6AddressRandomizer(SEED, LOCALE), "b3f4:4994:c9e8:b21a:c493:e923:f711:1115" },
{ new IsbnRandomizer(SEED, LOCALE), "9781786075390" },
{ new Ipv6AddressRandomizer(SEED, LOCALE), "d119:54cc:1cbd:a03d:6170:26a2:57ab:af62" },
{ new IsbnRandomizer(SEED, LOCALE), "9790893392719" },
{ new LastNameRandomizer(SEED, LOCALE), "Faure" },
{ new LatitudeRandomizer(SEED, LOCALE), "40,17135654" }, // should really be "40.171357", seems like a bug in java-faker
{ new LongitudeRandomizer(SEED, LOCALE), "80,34271308" }, // should really be "80.342713", seems like a bug in java-faker
Expand All @@ -129,9 +129,9 @@ static Object[][] generateSeededRandomizersWithLocaleAndTheirExpectedValues() {
{ new PhoneNumberRandomizer(SEED, LOCALE), "03 06 95 74 75" },
{ new SentenceRandomizer(SEED, LOCALE), "Dolor totam assumenda eius autem." },
{ new StateRandomizer(SEED, LOCALE), "Lorraine" },
{ new StreetRandomizer(SEED, LOCALE), "Rue de Presbourg" },
{ new StreetRandomizer(SEED, LOCALE), "Passage des Francs-Bourgeois" },
{ new WordRandomizer(SEED, LOCALE), "repellat" },
{ new ZipCodeRandomizer(SEED, LOCALE), "06957" },
{ new ZipCodeRandomizer(SEED, LOCALE), "20695" },
};
}

Expand Down
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdk:
- openjdk17
install:
- mvn install -Dmaven.javadoc.skip=true -DskipTests
44 changes: 25 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-random</artifactId>
<version>6.2.1</version>
<version>7.0.0</version>
<packaging>pom</packaging>

<build>
Expand Down Expand Up @@ -115,11 +115,6 @@
<groupId>io.github.dvgaba</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>validation-api</artifactId>
<groupId>javax.validation</groupId>
<version>${validation-api.version}</version>
</dependency>
<dependency>
<artifactId>objenesis</artifactId>
<groupId>org.objenesis</groupId>
Expand All @@ -137,12 +132,22 @@
<version>${classgraph.version}</version>
</dependency>
<dependency>
<artifactId>hibernate-validator</artifactId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<artifactId>javax.el</artifactId>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<version>${expressly.version}</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>${jakarta.validation-api.version}</version>
</dependency>
<dependency>
<artifactId>jakarta.el</artifactId>
<groupId>org.glassfish</groupId>
<version>${javax.el.version}</version>
</dependency>
Expand Down Expand Up @@ -310,13 +315,13 @@
</profiles>

<properties>
<assertj.version>3.24.2</assertj.version>
<classgraph.version>4.8.162</classgraph.version>
<datafaker.version>1.6.0</datafaker.version>
<hibernate-validator.version>6.1.6.Final</hibernate-validator.version>
<java.version>16</java.version>
<javax.el.version>3.0.0</javax.el.version>
<junit.version>5.9.3</junit.version>
<assertj.version>3.25.1</assertj.version>
<classgraph.version>4.8.165</classgraph.version>
<datafaker.version>2.1.0</datafaker.version>
<hibernate-validator.version>8.0.1.Final</hibernate-validator.version>
<java.version>17</java.version>
<javax.el.version>4.0.2</javax.el.version>
<junit.version>5.10.1</junit.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
Expand All @@ -325,19 +330,20 @@
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.9.0</mockito.version>
<nexus-staging-maven-plugin.version>1.6.12</nexus-staging-maven-plugin.version>
<objenesis.version>3.3</objenesis.version>
<os-maven-plugin.version>1.7.0</os-maven-plugin.version>
<prettier-java.version>1.6.2</prettier-java.version>
<prettier.version>2.7.1</prettier.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<protobuf.version>3.23.4</protobuf.version>
<snakeyaml.version>2.0</snakeyaml.version>
<protobuf.version>3.25.2</protobuf.version>
<snakeyaml.version>2.2</snakeyaml.version>
<spotless-maven-plugin.version>2.26.0</spotless-maven-plugin.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<velocity-engine-core.version>2.3</velocity-engine-core.version>
<expressly.version>5.0.0</expressly.version>
<jakarta.validation-api.version>3.0.2</jakarta.validation-api.version>
</properties>

<scm>
Expand Down

0 comments on commit 5f4e2c0

Please sign in to comment.