Skip to content

Commit 0f64f72

Browse files
marko-bekhtagsmet
authored andcommitted
HV-1577 Removed JAXB related code
- removed builders and supporting privileged actions - removed beans generation from xsd - added javax.xml.bind to forbidden APIs - remove schema normalization
1 parent 7051314 commit 0f64f72

21 files changed

+9
-1792
lines changed

build-config/src/main/resources/forbidden-common.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ org.assertj.core.api.Assertions#fail()
2626
java.lang.StringBuffer
2727

2828
org.jboss.logging.processor.util.Objects
29+
30+
################################################################################################################
31+
# JAXB shouldn't be used anymore as it is targeted to be removed from the JDK
32+
javax.xml.bind.**

distribution/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
<jdk>[9,)</jdk>
208208
</activation>
209209
<properties>
210-
<javadoc.additional.options>-html5 --add-modules=${maven-javadoc-plugin.jigsaw.modules}</javadoc.additional.options>
210+
<javadoc.additional.options>-html5</javadoc.additional.options>
211211
</properties>
212212
</profile>
213213
</profiles>

documentation/src/main/asciidoc/ch01.asciidoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ These are the module names as declared using the `Automatic-Module-Name` header:
206206

207207
These module names are preliminary and may be changed when providing real module descriptors in a future release.
208208

209-
When using Bean Validation XML descriptors (_META-INF/validation.xml_ and/or constraint mapping files), the `java.xml.bind` module must be enabled.
210-
Do so by appending `--add-modules java.xml.bind` to your _java_ invocation.
211-
212209
[WARNING]
213210
====
214211
When using Hibernate Validator with CDI, be careful to not enable the `java.xml.ws.annotation` module of the JDK.

engine/pom.xml

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -273,39 +273,6 @@
273273
</plugins>
274274
</build>
275275
<profiles>
276-
<profile>
277-
<id>pre-jdk9</id>
278-
<activation>
279-
<jdk>1.8</jdk>
280-
</activation>
281-
<build>
282-
<plugins>
283-
<plugin>
284-
<groupId>org.codehaus.mojo</groupId>
285-
<artifactId>jaxb2-maven-plugin</artifactId>
286-
<executions>
287-
<execution>
288-
<goals>
289-
<goal>xjc</goal>
290-
</goals>
291-
</execution>
292-
</executions>
293-
<configuration>
294-
<packageName>org.hibernate.validator.internal.xml.binding</packageName>
295-
<extension>true</extension>
296-
<!-- Generate correct getters for Boolean properties -->
297-
<enableIntrospection>true</enableIntrospection>
298-
<!-- Makes sure the generated code is compatible with JAXB 2.1 which is what comes with Java 1.6 -->
299-
<target>2.1</target>
300-
<sources>
301-
<source>src/main/xsd/validation-configuration-2.0.xsd</source>
302-
<source>src/main/xsd/validation-mapping-2.0.xsd</source>
303-
</sources>
304-
</configuration>
305-
</plugin>
306-
</plugins>
307-
</build>
308-
</profile>
309276
<profile>
310277
<id>jdk9</id>
311278
<activation>
@@ -314,76 +281,6 @@
314281
<properties>
315282
<maven-surefire-plugin.argLine>--illegal-access=deny</maven-surefire-plugin.argLine>
316283
</properties>
317-
<build>
318-
<plugins>
319-
<plugin>
320-
<groupId>org.apache.maven.plugins</groupId>
321-
<artifactId>maven-antrun-plugin</artifactId>
322-
<executions>
323-
<execution>
324-
<phase>generate-sources</phase>
325-
<configuration>
326-
<tasks>
327-
<echo message="Creating target/generated-sources/jaxb"/>
328-
<mkdir dir="./target/generated-sources/jaxb"/>
329-
</tasks>
330-
</configuration>
331-
<goals>
332-
<goal>run</goal>
333-
</goals>
334-
</execution>
335-
</executions>
336-
</plugin>
337-
<plugin>
338-
<groupId>org.codehaus.mojo</groupId>
339-
<artifactId>exec-maven-plugin</artifactId>
340-
<executions>
341-
<execution>
342-
<id>generate schema types</id>
343-
<phase>generate-sources</phase>
344-
<goals>
345-
<goal>exec</goal>
346-
</goals>
347-
</execution>
348-
</executions>
349-
<configuration>
350-
<executable>xjc</executable>
351-
<arguments>
352-
<argument>-enableIntrospection</argument>
353-
<argument>-p</argument>
354-
<argument>org.hibernate.validator.internal.xml.binding</argument>
355-
<argument>-extension</argument>
356-
<argument>-target</argument>
357-
<argument>2.1</argument>
358-
<argument>-d</argument>
359-
<argument>target/generated-sources/jaxb</argument>
360-
<argument>src/main/xsd/validation-configuration-2.0.xsd</argument>
361-
<argument>src/main/xsd/validation-mapping-2.0.xsd</argument>
362-
<argument>-b</argument>
363-
<argument>src/main/xjb/binding-customization.xjb</argument>
364-
</arguments>
365-
</configuration>
366-
</plugin>
367-
<plugin>
368-
<groupId>org.codehaus.mojo</groupId>
369-
<artifactId>build-helper-maven-plugin</artifactId>
370-
<executions>
371-
<execution>
372-
<id>add-source</id>
373-
<phase>generate-sources</phase>
374-
<goals>
375-
<goal>add-source</goal>
376-
</goals>
377-
<configuration>
378-
<sources>
379-
<source>target/generated-sources/jaxb</source>
380-
</sources>
381-
</configuration>
382-
</execution>
383-
</executions>
384-
</plugin>
385-
</plugins>
386-
</build>
387284
</profile>
388285
<profile>
389286
<id>sigtest</id>

engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/NewJaxbContext.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions/Unmarshal.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)