Skip to content

Commit cfbb0a4

Browse files
authored
Merge pull request #31494 from Sgitario/fix_buildit
Fix maven BuildIT failures
2 parents 758e770 + 42a81a6 commit cfbb0a4

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,11 @@ void setupJaxbContextConfig(JaxbConfig config,
313313

314314
// parse class names to class
315315
Set<Class<?>> classes = getAllClassesFromClassNames(classNamesToBeBound);
316-
// validate the context to fail at build time if it's not valid
317-
validateContext(classes);
316+
if (config.validateJaxbContext) {
317+
// validate the context to fail at build time if it's not valid
318+
validateContext(classes);
319+
}
320+
318321
// register the classes to be used at runtime
319322
jaxbContextConfig.addClassesToBeBound(classes);
320323
}

extensions/jaxb/runtime/src/main/java/io/quarkus/jaxb/runtime/JaxbConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED, name = "jaxb")
1111
public class JaxbConfig {
12+
13+
/**
14+
* If enabled, it will validate the default JAXB context at build time.
15+
*/
16+
@ConfigItem(defaultValue = "true")
17+
public boolean validateJaxbContext;
18+
1219
/**
1320
* Exclude classes to automatically be bound to the default JAXB context.
1421
*/
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
quarkus.class-loading.parent-first-artifacts=stax:stax-api
2+
# The dependency `stax-api` is not compatible with the dependency `quarkus-jaxb` because both add the same
3+
# type `javax.xml.namespace.QName`. This was done on purpose to validate the `parent-first-artifacts` property when building
4+
# projects with conflicts with Maven, so we need to skip the JaxbContext validation at build time.
5+
quarkus.jaxb.validate-jaxb-context=false

0 commit comments

Comments
 (0)