while generating schema with xmlbeans version 4.0.0 and xmlbeans-maven-plugin 2.3.3, I am facing following issue. It is because xmlbeans verion 4.0.0 have removed XMLStreamException and XMLInputStream classes.But question is why it is trying to generate schema with classes that does not exist.
error: cannot find symbol symbol: class XMLInputStream location: package org.apache.xmlbeans.xml.stream fil2.java:148:
error: cannot find symbol public static com.mypackage.ConfigurationType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
symbol: class XMLStreamException
location: package org.apache.xmlbeans.xml.stream
file1.java:201:
error: cannot find symbol
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
[ERROR] Failed to execute goal org.codehaus.mojo:xmlbeans-maven-plugin:2.3.3:xmlbeans (generate-source) on project dummyProject: XmlBeans compile failed:
[ERROR] xml ErrorLoading schema file
pom.xml is something like below:
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>4.0.0</version>
</dependency>
</dependencies>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>generate-source</id>
<phase>generate-resources</phase>
<goals>
<goal>xmlbeans</goal>
</goals>
<inherited>true</inherited>
</execution>
</executions>
<configuration>
<schemaDirectory>${schema.directory}</schemaDirectory>
<sourceGenerationDirectory>${generated.directory}</sourceGenerationDirectory>
<javaSource>1.5</javaSource>
<xmlConfigs>
<xmlConfig implementation="java.io.File">${source.resources}/config/config.xsdconfig</xmlConfig>
</xmlConfigs>
</configuration>
</plugin>
</plugins>