title: Unable to generate classes using maven from XSD
body: <p>Error whiel trying to generate class files from xsd using maven</p>
  
  <p>I have the below xsd file:-</p>
  
  <pre><code>&lt;xs:schema attributeFormDefault="unqualified"
      elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"&gt;
   &lt;xs:element name="ADI"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="Metadata"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element name="AMS"&gt;
                  &lt;xs:complexType&gt;
                    &lt;xs:simpleContent&gt;
                      &lt;xs:extension base="xs:string"&gt;
                        &lt;xs:attribute type="xs:string" name="Asset_Class"/&gt;
                        &lt;xs:attribute type="xs:string" name="Asset_ID"/&gt;
                        &lt;xs:attribute type="xs:string" name="Asset_Name"/&gt;
                        &lt;xs:attribute type="xs:string" name="Product"/&gt;
                        &lt;xs:attribute type="xs:string" name="Provider"/&gt;
                        &lt;xs:attribute type="xs:string" name="Provider_ID"/&gt;
                        &lt;xs:attribute type="xs:byte" name="Version_Major"/&gt;
                        &lt;xs:attribute type="xs:byte" name="Version_Minor"/&gt;
                      &lt;/xs:extension&gt;
                    &lt;/xs:simpleContent&gt;
                  &lt;/xs:complexType&gt;
                &lt;/xs:element&gt;
                &lt;xs:element name="App_Data" maxOccurs="unbounded" minOccurs="0"&gt;
                  &lt;xs:complexType&gt;
                    &lt;xs:simpleContent&gt;
                      &lt;xs:extension base="xs:string"&gt;
                        &lt;xs:attribute type="xs:string" name="App" use="optional"/&gt;
                        &lt;xs:attribute type="xs:string" name="Name" use="optional"/&gt;
                        &lt;xs:attribute type="xs:string" name="Value" use="optional"/&gt;
                      &lt;/xs:extension&gt;
                    &lt;/xs:simpleContent&gt;
                  &lt;/xs:complexType&gt;
                &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>While trying to generate classes it is throwing the below expection</p>
  
  <blockquote>
    <p>lineNumber: 56; columnNumber: 33; Property "Value" is already defined.
    Use &lt;jaxb:property> to resolve this conflict.</p>
  </blockquote>
  
  <p>Tried using the below binding file in the same location of the xsd, but still does not work</p>
  
  <pre><code>&lt;jxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:jxb="http://java.sun.com/xml/ns/jaxb" version="2.1"&gt;
      &lt;jxb:bindings schemaLocation="BaseADI.xsd"&gt;
          &lt;jxb:bindings node="//xs:element[@name='App_Data']"&gt;        
              &lt;jxb:bindings node=".//xs:attribute[@name='Value']"&gt;
                  &lt;jxb:property name='ValueAttribute' /&gt;
              &lt;/jxb:bindings&gt;         
          &lt;/jxb:bindings&gt;
      &lt;/jxb:bindings&gt;
  &lt;/jxb:bindings&gt;
  </code></pre>
  
  <p>Then i get a parse expection:-</p>
  
  <blockquote>
    <p>ERROR] Error while parsing schema(s).Location [
    .........../binding.xjb{6,55}]. com.sun.istack.SAXParseException2</p>
  </blockquote>
  
  <p>Is the binding file the right option to slove the issue.
  Any comments or suggestions is appreciated.</p>