diff --git a/README.md b/README.md index af9742c6..99a30c2a 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/easy-random-bean-validation/pom.xml b/easy-random-bean-validation/pom.xml index b8de213a..cce35bbc 100644 --- a/easy-random-bean-validation/pom.xml +++ b/easy-random-bean-validation/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-random - 6.2.1 + 7.0.0 4.0.0 easy-random-bean-validation @@ -53,10 +53,6 @@ io.github.dvgaba easy-random-randomizers - - javax.validation - validation-api - org.assertj assertj-core @@ -64,7 +60,7 @@ org.glassfish - javax.el + jakarta.el test @@ -72,6 +68,17 @@ hibernate-validator test + + + org.glassfish.expressly + expressly + test + + + jakarta.validation + jakarta.validation-api + + org.junit.jupiter junit-jupiter diff --git a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/BeanValidationRandomizerRegistry.java b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/BeanValidationRandomizerRegistry.java index ff91133e..4c4c9747 100644 --- a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/BeanValidationRandomizerRegistry.java +++ b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/BeanValidationRandomizerRegistry.java @@ -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; diff --git a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/DecimalMinMaxAnnotationHandler.java b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/DecimalMinMaxAnnotationHandler.java index 37af5366..dc1548e4 100644 --- a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/DecimalMinMaxAnnotationHandler.java +++ b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/DecimalMinMaxAnnotationHandler.java @@ -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; diff --git a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/MinMaxAnnotationHandler.java b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/MinMaxAnnotationHandler.java index deb4f76d..9295bafe 100644 --- a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/MinMaxAnnotationHandler.java +++ b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/MinMaxAnnotationHandler.java @@ -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; diff --git a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/PatternAnnotationHandler.java b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/PatternAnnotationHandler.java index ec6ecae5..d6e92b1f 100644 --- a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/PatternAnnotationHandler.java +++ b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/PatternAnnotationHandler.java @@ -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; diff --git a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/SizeAnnotationHandler.java b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/SizeAnnotationHandler.java index 8cb39684..d440f651 100644 --- a/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/SizeAnnotationHandler.java +++ b/easy-random-bean-validation/src/main/java/org/jeasy/random/validation/SizeAnnotationHandler.java @@ -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; diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationAnnotatedBean.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationAnnotatedBean.java index f3bd2546..5176e4a4 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationAnnotatedBean.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationAnnotatedBean.java @@ -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 { diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationMethodAnnotatedBean.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationMethodAnnotatedBean.java index d9399817..85b9c680 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationMethodAnnotatedBean.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationMethodAnnotatedBean.java @@ -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 { diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationTest.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationTest.java index 190d2a21..eaec1417 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationTest.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationTest.java @@ -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; diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationWithoutReadMethodBean.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationWithoutReadMethodBean.java index fc106f2e..9d93612d 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationWithoutReadMethodBean.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationWithoutReadMethodBean.java @@ -23,7 +23,7 @@ */ package org.jeasy.random.validation; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; public class BeanValidationWithoutReadMethodBean { diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/EmbeddedBean.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/EmbeddedBean.java index 9ead1815..0a1f28b9 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/EmbeddedBean.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/EmbeddedBean.java @@ -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 { diff --git a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/MyCustomBeanValidationRandomizerRegistry.java b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/MyCustomBeanValidationRandomizerRegistry.java index 6d8929a2..adbda9b8 100644 --- a/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/MyCustomBeanValidationRandomizerRegistry.java +++ b/easy-random-bean-validation/src/test/java/org/jeasy/random/validation/MyCustomBeanValidationRandomizerRegistry.java @@ -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 { diff --git a/easy-random-core/pom.xml b/easy-random-core/pom.xml index caad6047..0aa4781f 100644 --- a/easy-random-core/pom.xml +++ b/easy-random-core/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-random - 6.2.1 + 7.0.0 4.0.0 easy-random-core diff --git a/easy-random-protobuf/pom.xml b/easy-random-protobuf/pom.xml index 587560fd..f974afd5 100644 --- a/easy-random-protobuf/pom.xml +++ b/easy-random-protobuf/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-random - 6.2.1 + 7.0.0 4.0.0 easy-random-protobuf diff --git a/easy-random-randomizers/pom.xml b/easy-random-randomizers/pom.xml index f0d99e48..eba896e6 100644 --- a/easy-random-randomizers/pom.xml +++ b/easy-random-randomizers/pom.xml @@ -4,7 +4,7 @@ io.github.dvgaba easy-random - 6.2.1 + 7.0.0 4.0.0 easy-random-randomizers diff --git a/easy-random-randomizers/src/test/java/org/jeasy/random/randomizers/RandomizersTest.java b/easy-random-randomizers/src/test/java/org/jeasy/random/randomizers/RandomizersTest.java index a497781c..bae2158e 100644 --- a/easy-random-randomizers/src/test/java/org/jeasy/random/randomizers/RandomizersTest.java +++ b/easy-random-randomizers/src/test/java/org/jeasy/random/randomizers/RandomizersTest.java @@ -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), "jacob.hansen@hotmail.com" }, { 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" }, @@ -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" }, }; } @@ -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), "alice.masson@hotmail.fr" }, { 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 @@ -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" }, }; } diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..b77c4b33 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,4 @@ +jdk: + - openjdk17 +install: + - mvn install -Dmaven.javadoc.skip=true -DskipTests \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0ddbb38d..80c11953 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 io.github.dvgaba easy-random - 6.2.1 + 7.0.0 pom @@ -115,11 +115,6 @@ io.github.dvgaba ${project.version} - - validation-api - javax.validation - ${validation-api.version} - objenesis org.objenesis @@ -137,12 +132,22 @@ ${classgraph.version} - hibernate-validator org.hibernate.validator + hibernate-validator ${hibernate-validator.version} - javax.el + org.glassfish.expressly + expressly + ${expressly.version} + + + jakarta.validation + jakarta.validation-api + ${jakarta.validation-api.version} + + + jakarta.el org.glassfish ${javax.el.version} @@ -310,13 +315,13 @@ - 3.24.2 - 4.8.162 - 1.6.0 - 6.1.6.Final - 16 - 3.0.0 - 5.9.3 + 3.25.1 + 4.8.165 + 2.1.0 + 8.0.1.Final + 17 + 4.0.2 + 5.10.1 3.10.1 1.6 3.2.0 @@ -325,7 +330,7 @@ 2.5.3 3.2.1 2.22.2 - 4.11.0 + 5.9.0 1.6.12 3.3 1.7.0 @@ -333,11 +338,12 @@ 2.7.1 UTF-8 0.6.1 - 3.23.4 - 2.0 + 3.25.2 + 2.2 2.26.0 - 2.0.1.Final 2.3 + 5.0.0 + 3.0.2