Skip to content

Commit 386394f

Browse files
authored
Merge pull request #749 from gsmet/rename-bv-to-hv
Rename the Bean Validation extension to Hibernate Validator
2 parents 8d27706 + 90ee4d4 commit 386394f

File tree

38 files changed

+69
-77
lines changed

38 files changed

+69
-77
lines changed

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
<dependency>
3636
<groupId>org.jboss.shamrock</groupId>
37-
<artifactId>shamrock-bean-validation-deployment</artifactId>
37+
<artifactId>shamrock-hibernate-validator-deployment</artifactId>
3838
<version>${project.version}</version>
3939
<scope>provided</scope>
4040
</dependency>

build-parent/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@
138138
</dependency>
139139
<dependency>
140140
<groupId>org.jboss.shamrock</groupId>
141-
<artifactId>shamrock-bean-validation-deployment</artifactId>
141+
<artifactId>shamrock-hibernate-validator-deployment</artifactId>
142142
<version>${project.version}</version>
143143
</dependency>
144144
<dependency>
145145
<groupId>org.jboss.shamrock</groupId>
146-
<artifactId>shamrock-bean-validation-runtime</artifactId>
146+
<artifactId>shamrock-hibernate-validator-runtime</artifactId>
147147
<version>${project.version}</version>
148148
</dependency>
149149
<dependency>

cli/common/src/main/filtered/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
"artifactId": "shamrock-arc-deployment"
2121
},
2222
{
23-
"name": "Bean Validation",
23+
"name": "Hibernate Validator",
2424
"labels": [
25+
"hibernate-validator",
2526
"bean-validation",
2627
"validation"
2728
],
2829
"groupId": "org.jboss.shamrock",
29-
"artifactId": "shamrock-bean-validation-deployment"
30+
"artifactId": "shamrock-hibernate-validator-deployment"
3031
},
3132
{
3233
"name": "Fault Tolerance",

cli/common/src/test/java/org/jboss/shamrock/cli/commands/AddExtensionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public void addExtension() throws IOException {
2424
.doCreateProject(new HashMap<>());
2525

2626
new AddExtensions(pom)
27-
.addExtensions(asList("agroal", "arc", "bean-validation"));
27+
.addExtensions(asList("agroal", "arc", "hibernate-validator"));
2828

2929
Model model = MojoUtils.readPom(pom);
3030
hasDependency(model, "shamrock-agroal-deployment");
3131
hasDependency(model, "shamrock-arc-deployment");
32-
hasDependency(model, "shamrock-bean-validation-deployment");
32+
hasDependency(model, "shamrock-hibernate-validator-deployment");
3333
}
3434

3535
private void hasDependency(final Model model, final String artifactId) {

cli/common/src/test/java/org/jboss/shamrock/cli/commands/ListExtensionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public void listWithoutBom() throws IOException {
9898
assertTrue(line.startsWith("update"), "JAX-RS should list as having an update: " + line);
9999
assertTrue(line.endsWith(getPluginVersion()), "JAX-RS should list as having an update: " + line);
100100
jaxrs = true;
101-
} else if (line.contains(" Bean Validation ")) {
102-
assertTrue(line.startsWith(" "), "Bean Validation should not list as anything: " + line);
101+
} else if (line.contains(" Hibernate Validator ")) {
102+
assertTrue(line.startsWith(" "), "Hibernate Validator should not list as anything: " + line);
103103
bean = true;
104104
}
105105
}

core/deployment/src/main/java/org/jboss/shamrock/deployment/builditem/FeatureBuildItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public final class FeatureBuildItem extends MultiBuildItem {
2424
public static final String MP_REACTIVE_OPERATORS = "mp-reactive-streams-operators";
2525
public static final String MP_REACTIVE_MESSAGING = "mp-reactive-streams-messaging";
2626
public static final String REACTIVE_CONVERTERS = "reactive-type-converters";
27-
public static final String BEAN_VALIDATION = "bean-validation";
27+
public static final String HIBERNATE_VALIDATOR = "hibernate-validator";
2828
public static final String JPA = "jpa";
2929
public static final String SCHEDULER = "scheduler";
3030
public static final String SECURITY = "security";

docs/src/main/asciidoc/json-and-validation-guide.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ mvn org.jboss.shamrock:shamrock-maven-plugin:{shamrock-version}:create \
4141
-DprojectArtifactId=input-validation \
4242
-DclassName="org.acme.validation.BookResource" \
4343
-Dpath="/books" \
44-
-Dextensions="jaxrs-json, validation"
44+
-Dextensions="jaxrs-json, hibernate-validator"
4545
----
4646

47-
This command generates a Maven structure importing the JAX-RS, JSON and validation support.
47+
This command generates a Maven structure importing the JAX-RS, JSON and Hibernate Validator/Bean Validation support.
4848

4949
== Accessing the Validator
5050

extensions/bean-validation/deployment/pom.xml renamed to extensions/hibernate-validator/deployment/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2121
<parent>
22-
<artifactId>shamrock-bean-validation</artifactId>
22+
<artifactId>shamrock-hibernate-validator</artifactId>
2323
<groupId>org.jboss.shamrock</groupId>
2424
<version>1.0.0.Alpha1-SNAPSHOT</version>
2525
<relativePath>../</relativePath>
2626
</parent>
2727
<modelVersion>4.0.0</modelVersion>
2828

29-
<artifactId>shamrock-bean-validation-deployment</artifactId>
30-
<name>Shamrock - Bean Validation - Deployment</name>
29+
<artifactId>shamrock-hibernate-validator-deployment</artifactId>
30+
<name>Shamrock - Hibernate Validator - Deployment</name>
3131

3232
<dependencies>
3333
<dependency>
@@ -40,7 +40,7 @@
4040
</dependency>
4141
<dependency>
4242
<groupId>org.jboss.shamrock</groupId>
43-
<artifactId>shamrock-bean-validation-runtime</artifactId>
43+
<artifactId>shamrock-hibernate-validator-runtime</artifactId>
4444
</dependency>
4545
</dependencies>
4646

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.jboss.shamrock.beanvalidation;
17+
package org.jboss.shamrock.hibernate.validator;
1818

1919
import static org.jboss.shamrock.deployment.annotations.ExecutionTime.STATIC_INIT;
2020

@@ -36,23 +36,23 @@
3636
import org.jboss.jandex.DotName;
3737
import org.jboss.jandex.IndexView;
3838
import org.jboss.jandex.Type;
39+
import org.jboss.shamrock.arc.deployment.AdditionalBeanBuildItem;
40+
import org.jboss.shamrock.arc.deployment.AnnotationsTransformerBuildItem;
3941
import org.jboss.shamrock.deployment.annotations.BuildProducer;
4042
import org.jboss.shamrock.deployment.annotations.BuildStep;
4143
import org.jboss.shamrock.deployment.annotations.Record;
42-
import org.jboss.shamrock.arc.deployment.AdditionalBeanBuildItem;
43-
import org.jboss.shamrock.arc.deployment.AnnotationsTransformerBuildItem;
44-
import org.jboss.shamrock.beanvalidation.runtime.ValidatorProvider;
45-
import org.jboss.shamrock.beanvalidation.runtime.ValidatorTemplate;
46-
import org.jboss.shamrock.beanvalidation.runtime.interceptor.MethodValidationInterceptor;
4744
import org.jboss.shamrock.deployment.builditem.CombinedIndexBuildItem;
4845
import org.jboss.shamrock.deployment.builditem.FeatureBuildItem;
4946
import org.jboss.shamrock.deployment.builditem.HotDeploymentConfigFileBuildItem;
5047
import org.jboss.shamrock.deployment.builditem.substrate.ReflectiveFieldBuildItem;
5148
import org.jboss.shamrock.deployment.builditem.substrate.ReflectiveMethodBuildItem;
5249
import org.jboss.shamrock.deployment.builditem.substrate.SubstrateConfigBuildItem;
5350
import org.jboss.shamrock.deployment.recording.RecorderContext;
51+
import org.jboss.shamrock.hibernate.validator.runtime.HibernateValidatorTemplate;
52+
import org.jboss.shamrock.hibernate.validator.runtime.ValidatorProvider;
53+
import org.jboss.shamrock.hibernate.validator.runtime.interceptor.MethodValidationInterceptor;
5454

55-
class BeanValidationProcessor {
55+
class HibernateValidatorProcessor {
5656

5757
private static final DotName VALIDATE_ON_EXECUTION = DotName.createSimple(ValidateOnExecution.class.getName());
5858

@@ -73,20 +73,20 @@ void registerAdditionalBeans(BuildProducer<AdditionalBeanBuildItem> additionalBe
7373

7474
if (isResteasyInClasspath()) {
7575
// The CDI interceptor which will validate the methods annotated with @JaxrsEndPointValidated
76-
additionalBeans.produce(new AdditionalBeanBuildItem("org.jboss.shamrock.beanvalidation.runtime.jaxrs.JaxrsEndPointValidationInterceptor"));
76+
additionalBeans.produce(new AdditionalBeanBuildItem("org.jboss.shamrock.hibernate.validator.runtime.jaxrs.JaxrsEndPointValidationInterceptor"));
7777
}
7878
}
7979

8080
@BuildStep
8181
@Record(STATIC_INIT)
82-
public void build(ValidatorTemplate template, RecorderContext recorder,
82+
public void build(HibernateValidatorTemplate template, RecorderContext recorder,
8383
BuildProducer<ReflectiveFieldBuildItem> reflectiveFields,
8484
BuildProducer<ReflectiveMethodBuildItem> reflectiveMethods,
8585
BuildProducer<AnnotationsTransformerBuildItem> annotationsTransformers,
8686
CombinedIndexBuildItem combinedIndexBuildItem,
8787
BuildProducer<FeatureBuildItem> feature) throws Exception {
8888

89-
feature.produce(new FeatureBuildItem(FeatureBuildItem.BEAN_VALIDATION));
89+
feature.produce(new FeatureBuildItem(FeatureBuildItem.HIBERNATE_VALIDATOR));
9090

9191
IndexView indexView = combinedIndexBuildItem.getIndex();
9292

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package org.jboss.shamrock.beanvalidation;
1+
package org.jboss.shamrock.hibernate.validator;
22

33
import java.util.Set;
44

55
import org.jboss.jandex.AnnotationTarget.Kind;
66
import org.jboss.jandex.DotName;
77
import org.jboss.jandex.MethodInfo;
88
import org.jboss.protean.arc.processor.AnnotationsTransformer;
9-
import org.jboss.shamrock.beanvalidation.runtime.interceptor.MethodValidated;
10-
import org.jboss.shamrock.beanvalidation.runtime.jaxrs.JaxrsEndPointValidated;
9+
import org.jboss.shamrock.hibernate.validator.runtime.interceptor.MethodValidated;
10+
import org.jboss.shamrock.hibernate.validator.runtime.jaxrs.JaxrsEndPointValidated;
1111

1212
/**
1313
* Add {@link MethodValidated} annotations to the methods requiring validation.

0 commit comments

Comments
 (0)