jaxb2-maven-plugin

jaxb2-maven-plugin throws Exception when maxOccurs is greater than 5000

五迷三道 提交于 2019-12-11 09:56:09
问题 When I run the jaxb2-maven-plugin on a legacy xsd it throws this Exception: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000 Googling this error shows that this is a limit that was put on jaxp for security purposes. It can be disabled in code like this SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,false); but I need to do this in maven. Also, xjc has a -nv switch

jaxb2-maven-plugin generates invalid source for doubles with default value =INF

☆樱花仙子☆ 提交于 2019-12-11 03:05:06
问题 I have a problem where the jaxb2-maven-plugin generates invalid source code when the XSD file contains default values for doubles. I use the jaxb2-maven-plugin (org.codehaus.mojo) version 1.5 : <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.5</version> <configuration> </configuration> <executions> <execution> <id>analysis_jaxb</id> <phase>generate-sources</phase> <goals> <goal>xjc</goal> </goals> <configuration> <clearOutputDir>false<

remove xmlns attribute from the root element while marshalling jaxb

我怕爱的太早我们不能终老 提交于 2019-12-03 16:07:36
This might be a related to JAXB Marshaller - How do I suppress xmlns namespace attributes? But my problem is a little different. I do the regular java marshalling and my xsd has no namespaces.The generated xml is without namespaces as well, except for the root element. <?xml version="1.0" encoding="UTF-8"?><rootElement xmlns:ns2="unwanted namespace"> The unwanted namespace is from another schema from the same project and I am not sure why that is being picked up at this stage. My rootElement.java generated by jaxb2-maven-plugin looks like : @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name =

JAXB fails to generate Java classes for XBRL

守給你的承諾、 提交于 2019-12-01 14:42:37
问题 I'm trying to generate Java classes for types defined in XBRL. My build process is based on Maven 2, and here are my trials. I only paste the build section, which relies on some properties: package is the name of my target package catalog is the path and file name of the catalog. because I have no internet connection, I have amny entries, but I think those are always necessary -- TR9401 for XBRL resources -- SYSTEM http://www.xbrl.org/2003/XLink http/www.xbrl.org/2003/xl-2003-12-31.xsd SYSTEM

maven-jaxb2-plugin VS jaxb2-maven-plugin for multiple schemas

♀尐吖头ヾ 提交于 2019-12-01 05:53:24
I have multiple xsd schemas that I want to unmarshall into different packages under the same folder target/generated-sources/xjc . I tried both plugins and both seem to work fine with these 2 configurations but in case of maven-jaxb2-plugin the eclipse plugin keeps generating classes indefinitely (because of the forceRegenerate = true) but if I don't specify forceRegenerate it won't generate the second and third set of classes at all when I run mvn clean package Are there any issues with my configuration? jaxb2-maven-plugin <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven

XJC Maven Plugin(jaxb2-maven-plugin) Java 11 Migration Issues

ε祈祈猫儿з 提交于 2019-11-30 20:02:54
问题 I am currently working on java 11 migration project where jaxb2-maven-plugin has been used to for XJC task. As XJC executable is not present in the JDK 11 version, I am getting below mentioned errors. [ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc (xjc-schema1) on project paymaster-service: Execution xjc-schema1 of goal org.codehaus.mojo:jaxb2-maven-plugin:2.2 :xjc failed: A required class was missing while executing org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc:

Is there a JAXB Plugin which generates Builders?

爱⌒轻易说出口 提交于 2019-11-30 18:19:54
Are you aware of any good JAXB Plugin which generated Builder pattern classes for the generated JAXB classes? Composing domain using JAXB generated classes is really nasty. I saw a plugin someone wrote back in 2010 but it doesn't use the newest maven plugin jaxb2-maven-plugin, and it also requires you to specify bindings for each schema type which is not robust. Yes, there is now a plugin to generate fluent builders for JAXB-generated classes. There is a github project on https://github.com/mklemm/jaxb2-rich-contract-plugin It contains a couple of useful JAXB plugins. You can download source