Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependabot config and update dependencies where possible #1346

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d269d8d
Update dependabot config
marko-bekhta Apr 17, 2024
a539134
Replace relocation Groovy artifact
marko-bekhta Apr 17, 2024
9a4fdc4
Bump the build-dependencies group across 1 directory with 63 updates
dependabot[bot] Apr 17, 2024
784f004
Bump the build-dependencies group with 5 updates
dependabot[bot] May 7, 2024
731da54
Bump the build-dependencies group across 1 directory with 7 updates
dependabot[bot] May 14, 2024
73aa5e4
Bump the build-dependencies group across 1 directory with 3 updates
dependabot[bot] May 21, 2024
c459d3f
Bump the build-dependencies group across 1 directory with 4 updates
dependabot[bot] May 28, 2024
3cc5274
Bump the build-dependencies group across 1 directory with 5 updates
dependabot[bot] Jun 4, 2024
1c3bbf2
Make use of a simple test appender
marko-bekhta Apr 17, 2024
644bdf8
Address checkstyle issues
marko-bekhta Apr 17, 2024
91d274e
Update Test policy for a Security Manager
marko-bekhta Apr 17, 2024
e17471e
Use a version of Wildfly core that does not fail applying the patch
marko-bekhta Apr 17, 2024
76accce
Update asciidoctor configuration and theme
marko-bekhta Apr 8, 2024
34b2a5d
Don't use filtering on theme-copy
marko-bekhta Apr 17, 2024
a3f7bae
Update javadoc build parameters
marko-bekhta Apr 17, 2024
b81a172
Bump org.glassfish:javax.el from 3.0.1-b11 to 3.0.1-b12
dependabot[bot] Apr 17, 2024
1e3a1c4
Bump org.openjfx:javafx-base from 11.0.2 to 22
dependabot[bot] Apr 17, 2024
4ba3e87
HV-1985 Bump joda-time:joda-time from 2.9.7 to 2.12.7
dependabot[bot] Apr 17, 2024
bd1faec
HV-1981 Bump org.jboss.logging:jboss-logging from 3.4.3.Final to 3.5.…
dependabot[bot] Apr 17, 2024
11b43a0
HV-1983 Bump com.fasterxml:classmate from 1.5.1 to 1.7.0
dependabot[bot] Apr 17, 2024
3ddb0b2
HV-1982 Bump javax.money:money-api from 1.0.1 to 1.1
dependabot[bot] Apr 17, 2024
5fad4a3
Bump org.openjfx:javafx-base from 11.0.2 to 22.0.1
dependabot[bot] Apr 18, 2024
c599189
Update maven plugins configurations
marko-bekhta Apr 18, 2024
7a2d1d9
HV-1974 Upgrade to forbiddenapis 3.7
marko-bekhta Apr 15, 2024
894c059
Update JQAssistant configurations
marko-bekhta Apr 18, 2024
b523e17
HV-1981 Bump minimum maven version
marko-bekhta Apr 18, 2024
8e4417d
Move reduced pom from shade plugin to target directory
marko-bekhta May 1, 2024
7d7646e
HV-1980 Use env variable name instead of the passphrase in GPG config…
marko-bekhta May 16, 2024
47fba0c
HV-1979 Bump jakarta.validation:jakarta.validation-api from 3.0.2 to …
dependabot[bot] May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 58 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,61 @@ updates:
- package-ecosystem: "maven"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
allow:
- dependency-name: jakarta.*:*
- dependency-name: org.glassfish.expressly:expressly
- dependency-name: org.jboss.weld:*
interval: "weekly"
day: "tuesday"
assignees: [ "marko-bekhta" ]
open-pull-requests-limit: 20
groups:
# This group combines all build-only dependencies. Published artifacts do not depend on them.
# Grouping such dependencies will make Dependabot create PRs with a branch name
# following the pattern (`dependabot/maven/build-dependencies-.*`)
# and with a title like `Bump the build-dependencies group with 8 updates` that we can easily
# use for Hibernate Bot rules.
build-dependencies:
patterns:
# Maven plugins:
- "*maven*plugin*"
- "org.apache.maven*:*"
- "*surefire*"
- "*forbiddenapis*"
- "com.puppycrawl.tools:*"
# Other test/build dependencies
- "org.apache.groovy:groovy-jsr223"
- "org.openjdk.jmh:*" # performance testing dependency
- "com.google.guava:guava" # Guava is used in our test utils
- "org.asciidoctor:*" # Asciidoctor is used for rendering the documentation
- "org.apache.logging.log4j:*"
- "org.slf4j:*"
- "org.ow2.asm:*" # for Surefire/Failsafe plugins to support builds on latest JDKs
- "junit:*"
- "org.testng:*"
- "org.easymock:*"
- "org.jboss.arquillian:*"
- "org.jboss.arquillian.container:*"
- "org.jboss.modules:*"
- "com.fasterxml.woodstox:*"
- "io.rest-assured:*"
- "net.bytebuddy:*"
- "com.fasterxml.jackson.core:*"
- "org.springframework:*"
# only used for perf tests based on javax:
- "org.glassfish:javax.el"
ignore:
- dependency-name: "javax.validation:*"
- dependency-name: "org.apache.bval:*"
# dependencies that we align on Wildfly version that is used:
- dependency-name: "org.jboss.weld:*"
- dependency-name: "org.wildfly.arquillian:*"
- dependency-name: "jakarta.enterprise:jakarta.enterprise.cdi-api"
- dependency-name: "jakarta.ejb:jakarta.ejb-api"
- dependency-name: "jakarta.interceptor:jakarta.interceptor-api"
- dependency-name: "jakarta.annotation:jakarta.annotation-api"
- dependency-name: "jakarta.inject:jakarta.inject-api"
- dependency-name: "jakarta.persistence:jakarta.persistence-api"
- dependency-name: "jakarta.ws.rs:jakarta.ws.rs-api"
# cannot upgrade wildfly dist and core to latest as patching modules is failing on them
# see https://github.com/jbossas/patch-gen/issues/34 the issue causing the problem.
- dependency-name: "org.wildfly:wildfly-dist"
- dependency-name: "org.wildfly.core:*"
# Bean Validation TCK requires a particular version of AssertJ and using others leads to errors:
- dependency-name: "org.assertj:*"
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
*/

@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 17 Latest'
@Field final String MAVEN_TOOL = 'Apache Maven 3.6'
@Field final String MAVEN_TOOL = 'Apache Maven 3.9'

// Default node pattern, to be used for resource-intensive stages.
// Should not include the controller node.
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
</property>
</activation>
<properties>
<javadoc.additional.options>-html5 -source 8</javadoc.additional.options>
<javadoc.additional.options>-html5</javadoc.additional.options>
</properties>
</profile>
</profiles>
Expand Down
5 changes: 1 addition & 4 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<asciidoctor.engine-source-dir>${basedir}/../engine/src/main/java</asciidoctor.engine-source-dir>
<asciidoctor.osgi-integrationtest-source-dir>${basedir}/../osgi/integrationtest/src/test/java</asciidoctor.osgi-integrationtest-source-dir>

<html.meta.description>Hibernate Validator, Annotation based constraints for your domain model - Reference Documentation</html.meta.description>
<html.meta.keywords>hibernate, validator, hibernate validator, validation, jakarta bean validation, bean validation</html.meta.keywords>
<html.meta.project-key>validator</html.meta.project-key>
<html.google-analytics.id>G-282CVRCQHZ</html.google-analytics.id>
<html.outdated-content.project-key>${html.meta.project-key}</html.outdated-content.project-key>
Expand Down Expand Up @@ -72,7 +70,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -170,7 +168,6 @@
<resources>
<resource>
<directory>${asciidoctor.theme-dir}</directory>
<filtering>true</filtering>
</resource>
</resources>
<outputDirectory>${asciidoctor.aggregated-resources-dir}</outputDirectory>
Expand Down
3 changes: 3 additions & 0 deletions documentation/src/main/asciidoc/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Hardy Ferentschik; Gunnar Morling; Guillaume Smet
:docinfodir: {docinfodir}
:docinfo: shared,private
:title-logo-image: image:hibernate_logo_a.png[align=left,pdfwidth=33%]
:html-meta-description: Hibernate Validator, Annotation based constraints for your domain model - Reference Documentation
:html-meta-keywords: hibernate, validator, hibernate validator, validation, jakarta bean validation, bean validation
:html-meta-canonical-link: https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/

include::pr01.asciidoc[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//tag::include[]
public interface Vehicle {

public interface Basic {
interface Basic {
}

@NotNull(groups = Vehicle.Basic.class)
Expand Down
8 changes: 1 addition & 7 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,13 @@
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public interface Cascadable {
*/
CascadingMetaData getCascadingMetaData();

public interface Builder {
interface Builder {

void mergeCascadingMetaData(CascadingMetaDataBuilder cascadingMetaDataBuilder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.test.appender.ListAppender;
import org.hibernate.validator.HibernateValidator;
import org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext;
import org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorContextImpl;
import org.hibernate.validator.messageinterpolation.ExpressionLanguageFeatureLevel;
import org.hibernate.validator.testutil.TestForIssue;
import org.hibernate.validator.testutil.ValidationXmlTestHelper;
import org.hibernate.validator.testutils.ListAppender;
import org.hibernate.validator.testutils.ValidatorUtil;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
Expand All @@ -63,7 +63,8 @@ public static void setupValidationXmlTestHelper() {
public void setUp() {
LoggerContext context = LoggerContext.getContext( false );
Logger logger = context.getLogger( ConstraintValidatorContextImpl.class.getName() );
constraintValidatorContextImplLoglistAppender = (ListAppender) logger.getAppenders().get( "List" );
constraintValidatorContextImplLoglistAppender = new ListAppender( "list" );
logger.addAppender( constraintValidatorContextImplLoglistAppender );
constraintValidatorContextImplLoglistAppender.clear();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
import java.util.Set;

import org.hibernate.validator.testutil.TestForIssue;
import org.hibernate.validator.testutils.ListAppender;

import jakarta.validation.Constraint;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.Payload;
import jakarta.validation.ReportAsSingleViolation;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.test.appender.ListAppender;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Expand All @@ -41,17 +42,15 @@ public class LogValidatedValueConfigurationTest {
@BeforeTest
public void setUp() {
LoggerContext context = LoggerContext.getContext( false );
simpleAppender = (ListAppender) context.getLogger(
"org.hibernate.validator.internal.engine.constraintvalidation.SimpleConstraintTree" )
.getAppenders().get( "List" );
simpleAppender = new ListAppender( "simple" );
context.getLogger( "org.hibernate.validator.internal.engine.constraintvalidation.SimpleConstraintTree" )
.addAppender( simpleAppender );
simpleAppender.clear();

composingAppender = (ListAppender) context.getLogger(
"org.hibernate.validator.internal.engine.constraintvalidation.ComposingConstraintTree" )
.getAppenders().get( "List" );
composingAppender = new ListAppender( "composing" );
context.getLogger( "org.hibernate.validator.internal.engine.constraintvalidation.ComposingConstraintTree" )
.addAppender( composingAppender );
composingAppender.clear();


}

@AfterTest
Expand All @@ -71,7 +70,8 @@ public void testValueLoggingIsEnabled() {

assertThat( constraintViolations ).containsOnlyViolations(
violationOf( Size.class ).withProperty( "value" ),
violationOf( ComposingConstraint.class ).withProperty( "value" )
violationOf( Size.class ).withProperty( "value2" ),
violationOf( ComposingConstraint.class ).withProperty( "value2" )
);

assertTrue(
Expand All @@ -96,7 +96,8 @@ public void testValueLoggingIsDisabledByDefault() {

assertThat( constraintViolations ).containsOnlyViolations(
violationOf( Size.class ).withProperty( "value" ),
violationOf( ComposingConstraint.class ).withProperty( "value" )
violationOf( Size.class ).withProperty( "value2" ),
violationOf( ComposingConstraint.class ).withProperty( "value2" )
);

assertTrue(
Expand All @@ -123,7 +124,8 @@ public void testValueLoggingIsEnabledUsingProperty() {

assertThat( constraintViolations ).containsOnlyViolations(
violationOf( Size.class ).withProperty( "value" ),
violationOf( ComposingConstraint.class ).withProperty( "value" )
violationOf( Size.class ).withProperty( "value2" ),
violationOf( ComposingConstraint.class ).withProperty( "value2" )
);

assertTrue(
Expand All @@ -140,22 +142,32 @@ public void testValueLoggingIsEnabledUsingProperty() {

public static class Foo {
@Size(max = 2)
@ComposingConstraint
private String value = "123";

@ComposingConstraint
private String value2 = "123";
}

@NotNull
@Size(max = 2)
@ReportAsSingleViolation
@Target({ FIELD })
@Retention(RUNTIME)
@Constraint(validatedBy = {})
@Constraint(validatedBy = ComposingConstraint.Validator.class)
@Documented
public @interface ComposingConstraint {
String message() default "";

Class<?>[] groups() default {};

Class<? extends Payload>[] payload() default {};

class Validator implements ConstraintValidator<ComposingConstraint, Object> {

@Override
public boolean isValid(Object value, ConstraintValidatorContext context) {
return false;
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,22 @@ public static class PlushCrocodile {
public interface AllConstraints {

@GroupSequence({ OverlyBasicConstraints.class, SomewhatBasicConstraints.class })
public interface BasicConstraints {
interface BasicConstraints {

public interface OverlyBasicConstraints {
interface OverlyBasicConstraints {
}

public interface SomewhatBasicConstraints {
interface SomewhatBasicConstraints {
}
}

@GroupSequence({ SomewhatComplexConstraints.class, ImmenselyComplexConstraints.class })
public interface ComplexConstraints {
interface ComplexConstraints {

public interface SomewhatComplexConstraints {
interface SomewhatComplexConstraints {
}

public interface ImmenselyComplexConstraints {
interface ImmenselyComplexConstraints {
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.test.appender.ListAppender;
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator;
import org.hibernate.validator.testutil.TestForIssue;
import org.hibernate.validator.testutils.ListAppender;

import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Expand All @@ -43,7 +44,8 @@ public class ParameterMessageInterpolatorTest {
public void setUp() {
LoggerContext context = LoggerContext.getContext( false );
Logger logger = context.getLogger( ParameterMessageInterpolator.class.getName() );
listAppender = (ListAppender) logger.getAppenders().get( "List" );
listAppender = new ListAppender( "list" );
logger.addAppender( listAppender );
listAppender.clear();

validator = getConfiguration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void testUserResourceBundle() {
String actual = interpolator.interpolate(
notNullDescriptor.getAnnotation().message(),
messageInterpolatorContext,
new Locale( "es", "ES" )
Locale.forLanguageTag( "es-ES" )
);
assertEquals( actual, expected, "Wrong substitution" );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Set;

import org.hibernate.validator.test.internal.engine.methodvalidation.model.Customer;
import org.hibernate.validator.test.internal.engine.methodvalidation.service.CustomerRepositoryImpl;

import jakarta.validation.Constraint;
import jakarta.validation.ConstraintValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ public interface CustomerRepository extends RepositoryBase<Customer> {
@ConsistentDateParameters
void methodWithCrossParameterConstraint(@NotNull LocalDate start, @NotNull LocalDate end);

public interface ValidationGroup {
interface ValidationGroup {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ void constraintInLaterPartOfGroupSequenceAtDifferentParameters(@List({
int constraintsInAllPartsOfGroupSequence();


public interface ValidationGroup1 {
interface ValidationGroup1 {
}

public interface ValidationGroup2 {
interface ValidationGroup2 {
}

public interface ValidationGroup3 {
interface ValidationGroup3 {
}

@GroupSequence({ ValidationGroup2.class, ValidationGroup3.class })
public interface ValidationSequence {
interface ValidationSequence {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public interface Person {
@NotEmpty
String getLastName();

public interface PersonValidation {
interface PersonValidation {
}
}