Skip to content

Commit

Permalink
JAXB: Not bound classes annotated with XmlSchema to the JaxbContext
Browse files Browse the repository at this point in the history
The classes annotated with @XmlSchema within package-info results into errors because the package-info is not a class. 

These changes fix this issue by adding a package-info.java class and not bounding this class to the JAXBContext.

Fix quarkusio#27003
  • Loading branch information
Sgitario committed Aug 10, 2022
1 parent 65bb8b9 commit 89499a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ void processAnnotationsAndIndexFiles(
String className = xmlSchemaInstance.target().asClass().name().toString();

reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, className));

classesToBeBound.add(className);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* The inclusion of this file is to verify that the produced JAXBContext works fine with it, otherwise the build fails.
*/
@XmlSchema(namespace = "http://abc.com", xmlns = {
@XmlNs(prefix = "abc", namespaceURI = "http://abc.com")
})
package io.quarkus.jaxb.deployment.info;

import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlSchema;

0 comments on commit 89499a7

Please sign in to comment.