Skip to content

Commit 8da3aff

Browse files
[ogm-hiking] Update to Bean Validation 2 Alpha 1 and Hibernate Validator 6 Alpha 1
Use the patch mechanism of Wildfly to update BV
1 parent bd66c1c commit 8da3aff

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

hibernate-ogm/hiking-demo/pom.xml

+61-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<maven.compiler.target>1.8</maven.compiler.target>
1717

1818
<org.hibernate.ogm.version>5.1.0.CR1</org.hibernate.ogm.version>
19+
<org.hibernate.validator.version>6.0.0.Alpha1</org.hibernate.validator.version>
1920
<!-- used to find the wildfly module dist -->
2021
<org.hibernate.orm.version>5.1.2.Final</org.hibernate.orm.version>
2122
<org.hibernate.search.version>5.6.0.Final</org.hibernate.search.version>
@@ -24,6 +25,7 @@
2425
<org.jboss.wildfly-arquillian.version>8.2.1.Final</org.jboss.wildfly-arquillian.version>
2526
<org.jboss.wildfly.version>10.1.0.Final</org.jboss.wildfly.version>
2627
<org.hibernate.ogm.wildfly.classifier>wildfly-10-dist</org.hibernate.ogm.wildfly.classifier>
28+
<wildfly-maven-plugin.version>1.1.0.Alpha11</wildfly-maven-plugin.version>
2729

2830
<jboss.home>${project.build.directory}/wildfly-${org.jboss.wildfly.version}</jboss.home>
2931
</properties>
@@ -93,7 +95,7 @@
9395
<dependency>
9496
<groupId>org.hibernate</groupId>
9597
<artifactId>hibernate-validator</artifactId>
96-
<version>5.4.0.Final</version>
98+
<version>${org.hibernate.validator.version}</version>
9799
<scope>provided</scope>
98100
</dependency>
99101
<dependency>
@@ -184,7 +186,7 @@
184186
<plugin>
185187
<groupId>org.wildfly.plugins</groupId>
186188
<artifactId>wildfly-maven-plugin</artifactId>
187-
<version>1.0.1.Final</version>
189+
<version>${wildfly-maven-plugin.version}</version>
188190
</plugin>
189191
<plugin>
190192
<groupId>org.jboss.as.plugins</groupId>
@@ -293,7 +295,64 @@
293295
</artifactItems>
294296
</configuration>
295297
</execution>
298+
<execution>
299+
<id>copy-bv-patch</id>
300+
<phase>pre-integration-test</phase>
301+
<goals>
302+
<goal>copy</goal>
303+
</goals>
304+
<configuration>
305+
<artifactItems>
306+
<artifactItem>
307+
<groupId>org.hibernate.validator</groupId>
308+
<artifactId>hibernate-validator-modules</artifactId>
309+
<version>${org.hibernate.validator.version}</version>
310+
<classifier>wildfly-${org.jboss.wildfly.version}-patch</classifier>
311+
<type>zip</type>
312+
<outputDirectory>${project.build.directory}</outputDirectory>
313+
</artifactItem>
314+
</artifactItems>
315+
</configuration>
316+
</execution>
317+
</executions>
318+
</plugin>
319+
<plugin>
320+
<groupId>org.wildfly.plugins</groupId>
321+
<artifactId>wildfly-maven-plugin</artifactId>
322+
<executions>
323+
<!-- Currently the WF Maven plug-in cannot apply offline commands, although patch itself wouldn't require a running
324+
server; see https://issues.jboss.org/projects/WFMP/issues/WFMP-11 -->
325+
<execution>
326+
<id>start-wildfly-for-patching</id>
327+
<phase>pre-integration-test</phase>
328+
<goals>
329+
<goal>start</goal>
330+
</goals>
331+
</execution>
332+
<execution>
333+
<id>apply-patch-file</id>
334+
<phase>pre-integration-test</phase>
335+
<goals>
336+
<goal>execute-commands</goal>
337+
</goals>
338+
<configuration>
339+
<fail-on-error>false</fail-on-error>
340+
<commands>
341+
<command>patch apply --path ${project.build.directory}/hibernate-validator-modules-${org.hibernate.validator.version}-wildfly-${org.jboss.wildfly.version}-patch.zip</command>
342+
</commands>
343+
</configuration>
344+
</execution>
345+
<execution>
346+
<id>shutdown-wildfly-for-patching</id>
347+
<phase>pre-integration-test</phase>
348+
<goals>
349+
<goal>shutdown</goal>
350+
</goals>
351+
</execution>
296352
</executions>
353+
<configuration>
354+
<jbossHome>${jboss.home}</jbossHome>
355+
</configuration>
297356
</plugin>
298357
</plugins>
299358
</build>

0 commit comments

Comments
 (0)