Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix maven BuildIT failures #31494

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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