maven-jaxb2-plugin

Maven JAXB2 XJC plugin: M2E plugin execution not covered

假装没事ソ 提交于 2019-12-03 06:09:54
问题 I am using using the jaxb2 xjc plugin for generating java files from a XSD . Therefore I used to configure my pom.xml as follows: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <packageName>com.mypackage.model</packageName> <schemaDirectory>${basedir}/src/main/resources/XSD<

Howto generate classes from WSDL and XSD with gradle, equivalent to maven-jaxb2-plugin

无人久伴 提交于 2019-12-03 04:28:51
问题 I want to switch my Maven2 build file to gradle. Generating the java classes from WSDL + XSDs with gradle seems to be not documented further there is no gradle plugin for this. I use the following configuration with maven and search the equivalent for gradle. <!-- plugin for generating the classes from the WSDL+XSD --> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.7.3</version> <executions> <execution> <id>app1-stub-generation</id>

Maven JAXB2 XJC plugin: M2E plugin execution not covered

与世无争的帅哥 提交于 2019-12-02 19:34:52
I am using using the jaxb2 xjc plugin for generating java files from a XSD . Therefore I used to configure my pom.xml as follows: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <packageName>com.mypackage.model</packageName> <schemaDirectory>${basedir}/src/main/resources/XSD</schemaDirectory> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId>

Howto generate classes from WSDL and XSD with gradle, equivalent to maven-jaxb2-plugin

别来无恙 提交于 2019-12-02 17:42:06
I want to switch my Maven2 build file to gradle. Generating the java classes from WSDL + XSDs with gradle seems to be not documented further there is no gradle plugin for this. I use the following configuration with maven and search the equivalent for gradle. <!-- plugin for generating the classes from the WSDL+XSD --> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.7.3</version> <executions> <execution> <id>app1-stub-generation</id> <goals> <goal>generate</goal> </goals> <configuration> <schemaDirectory>${project.build.directory}/wsdl

how to create common xsd generated java classes

a 夏天 提交于 2019-12-02 11:58:55
I want to generate java classes through XSDs , I want to use/include one XSD file in another but when I include them in another XSDs same java class is generated in both the packages. I am also using maven-jaxb2-plugin plugin Do separate - aka modular - schema compilation using so-called episodes . That is to say, if you want to import schema A into schema B and generate classes for schema B, you first create a separate Maven project in order to compile schema A to a separate Maven artifact with maven-jaxb2-plugin as usual. (This is assuming the schema A stands alone, i.e. does not import any

maven-jaxb2-plugin episode of same project in Maven, possible?

心已入冬 提交于 2019-12-02 04:01:59
问题 I have a basic.xsd and two other A.xsd and B.xsd . A.xsd and B.xsd get converted into two different java packages, therefore I need two Maven executions of the same plugin. Both XSDs refer to basic.xsd for some shared classes. If basic.xsd would come from a different project I could solve this problem really nicely through using episodes to prevent duplicate classes. But how can I refer to the current project? My first execution of the plugin is to generate only classes from basic.xsd into

maven-jaxb2-plugin episode of same project in Maven, possible?

廉价感情. 提交于 2019-12-02 00:28:54
I have a basic.xsd and two other A.xsd and B.xsd . A.xsd and B.xsd get converted into two different java packages, therefore I need two Maven executions of the same plugin. Both XSDs refer to basic.xsd for some shared classes. If basic.xsd would come from a different project I could solve this problem really nicely through using episodes to prevent duplicate classes. But how can I refer to the current project? My first execution of the plugin is to generate only classes from basic.xsd into its own java namespace. After that the executios of A.xsd and B.xsd should know about the stuff generated

JAXB separate episodes with annox customizations fails : SAXParseException2

≯℡__Kan透↙ 提交于 2019-12-01 23:09:41
I have 2 maven modules. First one contains only a xsd schema to generate base POJO classes. Second on contains a xsd schema that imports first one with a catalog file and generate new POJO classes. Both generation works. Now, I add annotations to both xsd files with annox (Swagger annotations). First module compilation succeeded but seconds module compilation fails with and exceptions : [ERROR] Error while generating code.Location : com.sun.istack.SAXParseException2; systemId: jar:file:/C:/commons-0.0.1-SNAPSHOT.jar!/Commons.xsd; lineNumber: 15; columnNumber: 36; compiler was unable to honor

JAXB - The schemaBindings customization is not associated with any schema element

只谈情不闲聊 提交于 2019-12-01 17:21:00
I'm trying to generated Java classes from a set of XSD files using the Maven XJC plugin with a custom binding. The customization is added to prefix JAXB generated classes . When the maven build runs, however, the XJC plugin doesn't seem to recognize the schemaBindings element and throws the exception as under. [ERROR] Error while parsing schema(s).Location [ file:/C:/blah/bindings.xjb{5,25}]. com.sun.istack.SAXParseException2: The "jaxb:schemaBindings" customization is no t associated with any schema element. at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Intern alizer.java

JAXB - The schemaBindings customization is not associated with any schema element

早过忘川 提交于 2019-12-01 16:27:17
问题 I'm trying to generated Java classes from a set of XSD files using the Maven XJC plugin with a custom binding. The customization is added to prefix JAXB generated classes. When the maven build runs, however, the XJC plugin doesn't seem to recognize the schemaBindings element and throws the exception as under. [ERROR] Error while parsing schema(s).Location [ file:/C:/blah/bindings.xjb{5,25}]. com.sun.istack.SAXParseException2: The "jaxb:schemaBindings" customization is no t associated with any