title: JAXB is not creating class for xsd email pattern element when compile using maven xjc
body: <p>I am using xsd in which i am validation email like</p>
  
  <pre><code>&lt;xsd:element name="Company" type="Company"/&gt;  
  &lt;xsd:complexType name="Company"&gt;  
      &lt;xsd:sequence&gt;  
          &lt;xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
          &lt;xsd:element name="Website" type="xsd:string" minOccurs="0" maxOccurs="1" /&gt;
          &lt;xsd:element name="Email" type="EmailAddress" minOccurs="0" maxOccurs="1" /&gt;
      &lt;/xsd:sequence&gt;
      &lt;xsd:attribute name="AccountStatus" type="AccountStatus" use="optional" default="Active" /&gt;
  &lt;/xsd:complexType&gt;
  
  &lt;xsd:simpleType name="EmailAddress"&gt;
      &lt;xsd:restriction base="xsd:string"&gt;
          &lt;xsd:pattern value="[A-Za-z0-9_]+([-+.'][A-Za-z0-9_]+)*@[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*\.[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*"/&gt;
      &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  
  &lt;xsd:simpleType name="AccountStatus"&gt;
      &lt;xsd:restriction base="xsd:string"&gt;
          &lt;xsd:enumeration value="Active"/&gt;
          &lt;xsd:enumeration value="Inactive"/&gt;
      &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  </code></pre>
  
  <p>Here is my pom.xml file that is using xjc snippet</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;jaxb2-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.5&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;xjc&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;clearOutputDir&gt;false&lt;/clearOutputDir&gt;
          &lt;outputDirectory&gt;src/main/java&lt;/outputDirectory&gt;
          &lt;schemaDirectory&gt;src/main/webapp/schemas&lt;/schemaDirectory&gt;
          &lt;includeSchema&gt;**/*.xsd&lt;/includeSchema&gt;
          &lt;bindingDirectory&gt;src/main/resources/bindings&lt;/bindingDirectory&gt;
          &lt;bindingFiles&gt;binding.xml&lt;/bindingFiles&gt;
          &lt;enableIntrospection&gt;false&lt;/enableIntrospection&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>here is my binding.xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jaxb:bindings version="2.0"
             xmlns:xs="http://www.w3.org/2001/XMLSchema" 
             xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"&gt;
  &lt;jaxb:bindings&gt;
      &lt;jaxb:globalBindings generateElementProperty="false" /&gt;
  &lt;/jaxb:bindings&gt;
  </code></pre>
  
  <p>Here is the generated Company.java class</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "Company", propOrder = {
      "name",
      "website",
      "email"
  })
  public class Company {
  
      @XmlElement(name = "Name", required = true)
      protected String name;
      @XmlElement(name = "Website")
      protected String website;
      @XmlElement(name = "Email")
      protected String email;
      @XmlAttribute(name = "AccountStatus")
      protected AccountStatus accountStatus;
  
      //setter and getters
  
  }
  </code></pre>
  
  <p>See there is no email pattern applying to my email attrubute. Why ?</p>
  
  <p>when i compile my code using maven compile then there is no EmailAddress.java class that apply pattern to my email attribute in Company.java. AccountStatus is also a simple type but maven creates AccountStatus.java class. Why maven is not creating EmailAddress.java class when i compile using maven ?  is there something wrong with my pattern ?</p>
  
  <p>Thanks</p>