Skip to content

Commit

Permalink
Merge pull request #31494 from Sgitario/fix_buildit
Browse files Browse the repository at this point in the history
Fix maven BuildIT failures
  • Loading branch information
gsmet authored Mar 1, 2023
2 parents 758e770 + 42a81a6 commit cfbb0a4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ void setupJaxbContextConfig(JaxbConfig config,

// parse class names to class
Set<Class<?>> classes = getAllClassesFromClassNames(classNamesToBeBound);
// validate the context to fail at build time if it's not valid
validateContext(classes);
if (config.validateJaxbContext) {
// validate the context to fail at build time if it's not valid
validateContext(classes);
}

// register the classes to be used at runtime
jaxbContextConfig.addClassesToBeBound(classes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED, name = "jaxb")
public class JaxbConfig {

/**
* If enabled, it will validate the default JAXB context at build time.
*/
@ConfigItem(defaultValue = "true")
public boolean validateJaxbContext;

/**
* Exclude classes to automatically be bound to the default JAXB context.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
quarkus.class-loading.parent-first-artifacts=stax:stax-api
# The dependency `stax-api` is not compatible with the dependency `quarkus-jaxb` because both add the same
# type `javax.xml.namespace.QName`. This was done on purpose to validate the `parent-first-artifacts` property when building
# projects with conflicts with Maven, so we need to skip the JaxbContext validation at build time.
quarkus.jaxb.validate-jaxb-context=false

0 comments on commit cfbb0a4

Please sign in to comment.