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

Fix Vert.x and Hibernate validator examples #238

Merged
merged 8 commits into from Mar 23, 2024
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
@@ -1,18 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2017 - 2023 The ModiTect authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The original authors
#
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0

name: Build

Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
@@ -1,18 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2017 - 2023 The ModiTect authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The original authors
#
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0


name: Release

Expand Down
184 changes: 112 additions & 72 deletions integrationtest/hibernate-validator/pom.xml
Expand Up @@ -7,48 +7,70 @@
Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.moditect</groupId>
<artifactId>moditect-integrationtest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>moditect-integrationtest-hibernate-validator</artifactId>
<packaging>jar</packaging>
<name>ModiTect Integration Test - Hibernate Validator</name>

<properties>
<hibernate.validator.version>6.0.20.Final</hibernate.validator.version>
<bean.validation.version>2.0.1.Final</bean.validation.version>
<jboss.logging.version>3.3.2.Final</jboss.logging.version>
<classmate.version>1.3.4</classmate.version>
<javax.el.version>3.0.1-b08</javax.el.version>
<hibernate.validator.version>8.0.1.Final</hibernate.validator.version>
<jboss-logging.version>3.5.3.Final</jboss-logging.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>11-ea+19</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.validator.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>${javax.el.version}</version>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.12.7</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss-logging.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
<version>2.2.1.Final</version>
</dependency>
<dependency>
<groupId>javax.money</groupId>
<artifactId>money-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
<version>2.8</version>
</dependency>
</dependencies>

Expand All @@ -59,7 +81,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>9</release>
<release>11</release>
<compilerArgs>
<compilerArg>--module-path</compilerArg>
<compilerArg>${project.build.directory}/modules</compilerArg>
Expand All @@ -70,106 +92,124 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-exisitng-modules</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<includeGroupIds>
org.glassfish.expressly,org.openjfx,com.fasterxml,org.jboss.logging,jakarta
</includeGroupIds>
<excludeArtifactIds>
jboss-logging-processor,jboss-logging-annotations,jakarta.jakartaee-web-api
</excludeArtifactIds>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-infos</id>
<id>add-module-info-to-dependencies</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<overwriteExistingFiles>true</overwriteExistingFiles>
<failOnWarning>false</failOnWarning>
<jdepsExtraArgs>
<arg>--module-path</arg>
<arg>${project.build.directory}/modules</arg>
<arg>--ignore-missing-deps</arg>
</jdepsExtraArgs>
<modules>
<module>
<artifact>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</artifact>
<moduleInfo>
<name>org.openjfx.javafx.base</name>
<name>org.joda.time</name>
</moduleInfo>
</module>
<module>
<artifact>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
</artifact>
<moduleInfo>
<addServiceUses>true</addServiceUses>
<name>jboss.logging.processor</name>
</moduleInfo>
</module>
<module>
<artifact>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>${javax.el.version}</version>
<groupId>javax.money</groupId>
<artifactId>money-api</artifactId>
</artifact>
<moduleInfo>
<name>java.el</name>
<name>money.api</name>
</moduleInfo>
</module>
<module>
<artifact>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
</artifact>
<moduleInfo>
<name>com.fasterxml.classmate</name>
<name>jboss.logging.annotations</name>
</moduleInfo>
</module>
<module>
<artifact>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
</artifact>
<moduleInfoSource>
module paranamer {
requires static javax.inject;
}
</moduleInfoSource>
</module>
<module>
<artifact>
<groupId>org.jboss.jdeparser</groupId>
<artifactId>jdeparser</artifactId>
</artifact>
<moduleInfo>
<name>org.hibernate.validator</name>
<requires>
static jboss.logging.annotations;
transitive java.validation;
*;
</requires>
<exports>
org.hibernate.validator.internal.util.logging to org.jboss.logging;
!org.hibernate.validator.internal*;
*;
</exports>
<uses>
javax.validation.ConstraintValidator;
javax.validation.valueextraction.ValueExtractor;
</uses>
<name>jdeparser</name>
</moduleInfo>
</module>

<module>
<artifact>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</artifact>
<moduleInfo>
<name>org.jboss.logging</name>
<requires>
static jboss.logmanager;
static log4j;
static log4j.api;
static slf4j.api;
*;
</requires>
<name>org.hibernate.validator</name>
</moduleInfo>
</module>
</modules>
<module>
<mainClass>com.example.ValidationTest</mainClass>
<moduleInfo>
<name>com.example</name>
<open>true</open>
</moduleInfo>
<moduleInfoSource>
open module com.example {
requires transitive org.hibernate.validator;
}
</moduleInfoSource>
</module>
</configuration>
<goals>
<goal>add-module-info</goal>
</goals>
</execution>
</executions>
</plugin>
Expand Down
Expand Up @@ -9,10 +9,10 @@

import java.util.Set;

import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.constraints.NotNull;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import jakarta.validation.constraints.NotNull;

/**
* @author Gunnar Morling
Expand Down
2 changes: 0 additions & 2 deletions integrationtest/undertow/pom.xml
Expand Up @@ -14,11 +14,9 @@
<groupId>org.moditect</groupId>
<artifactId>moditect-integrationtest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>moditect-integrationtest-undertow</artifactId>
<packaging>jar</packaging>
<name>ModiTect Integration Test - Undertow</name>

<properties>
Expand Down