Bug 530140: Add Bean Validation and CDI 2.0 schemas to source catalog

Signed-off-by: John Collier <John.J.Collier@ibm.com>
diff --git a/bundles/org.eclipse.jst.standard.schemas/about.html b/bundles/org.eclipse.jst.standard.schemas/about.html
index 5129d3e..526f9b1 100644
--- a/bundles/org.eclipse.jst.standard.schemas/about.html
+++ b/bundles/org.eclipse.jst.standard.schemas/about.html
@@ -202,16 +202,19 @@
 <ul>
   <li><a href="http://xmlns.jcp.org/xml/ns/javaee/beans_1_0.xsd">beans_1_0.xsd</a></li>
   <li><a href="http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd">beans_1_1.xsd</a></li>
+  <li><a href="http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd">beans_2_0.xsd</a></li>
 </ul>
 
 <ul>
   <li><a href="http://www.jboss.org/xml/ns/javax/validation/configuration/validation-configuration-1.0.xsd">validation-configuration-1.0.xsd</a></li>
-  <li><a href="http://www.jboss.org/xml/ns/javax/validation/configuration/validation-configuration-1.1.xsd">validation-configuration-1.1.xsd</a></li>  
+  <li><a href="http://www.jboss.org/xml/ns/javax/validation/configuration/validation-configuration-1.1.xsd">validation-configuration-1.1.xsd</a></li>
+  <li><a href="http://xmlns.jcp.org/xml/ns/validation/configuration/validation-configuration-2.0.xsd">validation-configuration-2.0.xsd</a></li>  
 </ul>
 
 <ul>
   <li><a href="http://www.jboss.org/xml/ns/javax/validation/mapping/validation-mapping-1.0.xsd">validation-mapping-1.0.xsd</a></li>
   <li><a href="http://www.jboss.org/xml/ns/javax/validation/mapping/validation-mapping-1.1.xsd">validation-mapping-1.1.xsd</a></li>  
+  <li><a href="http://xmlns.jcp.org/xml/ns/validation/mapping/validation-mapping-2.0.xsd">validation-mapping-2.0.xsd</a></li>
 </ul>
 
 </body>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_2_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_2_0.xsd
new file mode 100644
index 0000000..9ad62dd
--- /dev/null
+++ b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_2_0.xsd
@@ -0,0 +1,366 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+~ JBoss, Home of Professional Open Source
+~ Copyright 2016, Red Hat, Inc., and individual contributors
+~ by the @authors tag. See the copyright.txt in the distribution for a
+~ full listing of individual contributors.
+~
+~ Licensed under the Apache License, Version 2.0 (the "License");
+~ you may not use this file except in compliance with the License.
+~ You may obtain a copy of the License at
+~ http://www.apache.org/licenses/LICENSE-2.0
+~ Unless required by applicable law or agreed to in writing, software
+~ distributed under the License is distributed on an "AS IS" BASIS,
+~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~ See the License for the specific language governing permissions and
+~ limitations under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
+           elementFormDefault="qualified"
+           targetNamespace="http://xmlns.jcp.org/xml/ns/javaee"
+           version="2.0">
+
+  <xs:annotation>
+    <xs:documentation>
+      <![CDATA[[
+         Contexts and Dependency Injection (CDI) defines
+         a set of complementary services that help improve the structure
+         of application code. beans.xml is used to enable CDI services
+         for the current bean archive as well as to enable named
+         interceptors, decorators and alternatives for the current bean
+         archive.
+         
+
+         This is the XML Schema for the beans.xml deployment
+         descriptor for CDI 2.0.  The deployment descriptor must be named
+         "META-INF/beans.xml" or "WEB-INF/beans.xml" in a war file.
+         All application deployment descriptors may indicate
+         the application schema by using the Java EE namespace:
+
+         http://xmlns.jcp.org/xml/ns/javaee
+
+         and may indicate the version of the schema by
+         using the version element as shown below:
+
+         <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+         http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+         version="2.0">
+            ...
+         </beans>
+
+        The deployment descriptor may indicate the published version of
+        the schema using the xsi:schemaLocation attribute for the Java EE
+        namespace with the following location:
+
+        http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd
+
+     ]]>
+    </xs:documentation>
+  </xs:annotation>
+
+  <xs:element name="beans">
+    <xs:annotation>
+      <xs:documentation>
+        Bean classes of enabled beans must be
+        deployed in bean archives. A library jar, EJB jar,
+        application client jar or rar archive is a bean archive if
+        it has a file named beans.xml in the META-INF directory. The
+        WEB-INF/classes directory of a war is a bean archive if
+        there is a file named beans.xml in the WEB-INF directory of
+        the war. A directory in the JVM classpath is a bean archive
+        if it has a file named beans.xml in the META-INF directory.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:all >
+        <xs:element ref="javaee:interceptors" minOccurs="0"/>
+        <xs:element ref="javaee:decorators" minOccurs="0" />
+        <xs:element ref="javaee:alternatives" minOccurs="0" />
+        <xs:element ref="javaee:scan" minOccurs="0" />
+        <xs:element ref="javaee:trim" minOccurs="0"/>
+      </xs:all>
+      <xs:attribute name="version" default="2.0">
+        <xs:annotation>
+          <xs:documentation>
+            The version of CDI this beans.xml is for. If the version is "2.0" (or
+            later), then the attribute bean-discovery-mode must be added.
+          </xs:documentation>
+        </xs:annotation>
+        <xs:simpleType>
+          <xs:restriction base="xs:token">
+            <xs:pattern value="\.?[0-9]+(\.[0-9]+)*"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+      <xs:attribute name="bean-discovery-mode" use="required">
+        <xs:annotation>
+          <xs:documentation>
+            It is strongly recommended you use "annotated".
+
+            If the bean discovery mode is "all", then all types in this
+            archive will be considered. If the bean discovery mode is
+            "annotated", then only those types with bean defining annotations will be
+            considered. If the bean discovery mode is "none", then no
+            types will be considered.
+          </xs:documentation>
+        </xs:annotation>
+        <xs:simpleType>
+          <xs:restriction base="xs:string">
+            <xs:enumeration value="annotated">
+              <xs:annotation>
+                <xs:documentation>
+                  Only those types with bean defining annotations will be
+                  considered.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:enumeration>
+            <xs:enumeration value="all">
+              <xs:annotation>
+                <xs:documentation>
+                  All types in this archive will be considered.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:enumeration>
+            <xs:enumeration value="none">
+              <xs:annotation>
+                <xs:documentation>
+                  This archive will be ignored.
+                </xs:documentation>
+              </xs:annotation>
+            </xs:enumeration>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="scan">
+    <xs:annotation>
+      <xs:documentation>
+        <![CDATA[The <scan> element allows exclusion of classes and packages from consideration. Various filters may be applied, and may be conditionally activated.]]>
+      </xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:sequence maxOccurs="unbounded" minOccurs="0">
+        <xs:element name="exclude">
+          <xs:annotation>
+            <xs:documentation>
+              <![CDATA[The exclude filter allows exclusion of classes and packages through the use of Ant-style glob matches. For example, <exclude name="com.acme.**"> would exclude all classes and subpackages of com.acme.]]>
+            </xs:documentation>
+          </xs:annotation>
+          <xs:complexType>
+            <xs:choice maxOccurs="unbounded" minOccurs="0">
+              <xs:element name="if-class-available">
+                <xs:annotation>
+                  <xs:documentation>
+                    <![CDATA[Activates the filter only if the class specified can be loaded.]]>
+                  </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                  <xs:attribute name="name" type="xs:string" use="required">
+                    <xs:annotation>
+                      <xs:documentation>
+                        <![CDATA[If the named class can be loaded then, then the filter will be activated.]]>
+                      </xs:documentation>
+                    </xs:annotation>
+                  </xs:attribute>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="if-class-not-available">
+                <xs:annotation>
+                  <xs:documentation>
+                    <![CDATA[Activates the filter only if the class specified cannot be loaded.]]>
+                  </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                  <xs:attribute name="name" type="xs:string" use="required">
+                    <xs:annotation>
+                      <xs:documentation>
+                        <![CDATA[If the named class cannot be loaded then, then the filter will be activated.]]>
+                      </xs:documentation>
+                    </xs:annotation>
+                  </xs:attribute>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="if-system-property">
+                <xs:annotation>
+                  <xs:documentation>
+                    <![CDATA[If both name and value are specified, then the named system property must be set, and have the specified value for the filter to be activated. If only the name is specified, then the named system property must be set for the filter to be activated.]]>
+                  </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                  <xs:attribute name="name" type="xs:string" use="required">
+                    <xs:annotation>
+                      <xs:documentation>
+                        <![CDATA[The name of the system property that must be set for the filter to be active.]]>
+                      </xs:documentation>
+                    </xs:annotation>
+                  </xs:attribute>
+                  <xs:attribute name="value" type="xs:string" use="optional">
+                    <xs:annotation>
+                      <xs:documentation>
+                        <![CDATA[Optional. The value that the system property must have for the filter to be active.]]>
+                      </xs:documentation>
+                    </xs:annotation>
+                  </xs:attribute>
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+            <xs:attribute name="name" use="required">
+              <xs:annotation>
+                <xs:documentation>
+                  <![CDATA[The name of the class or package to exclude. Ant-style glob matches are supported. For example, <exclude name="com.acme.**"> would exclude all classes and subpackages of com.acme.]]>
+                </xs:documentation>
+              </xs:annotation>
+              <xs:simpleType>
+                <xs:restriction base="xs:string">
+                  <xs:pattern value="([a-zA-Z_$][a-zA-Z\d_$]*\.)*([a-zA-Z_$][a-zA-Z\d_$]*|\*|\*\*)"/>
+                </xs:restriction>
+              </xs:simpleType>
+            </xs:attribute>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="interceptors">
+    <xs:annotation>
+      <xs:documentation>
+        By default, a bean archive has no enabled
+        interceptors bound via interceptor bindings. An interceptor
+        must be explicitly enabled by listing its class under the
+        &lt;interceptors&gt; element of the beans.xml file of the
+        bean archive. The order of the interceptor declarations
+        determines the interceptor ordering. Interceptors which
+        occur earlier in the list are called first. If the same
+        class is listed twice under the &lt;interceptors&gt;
+        element, the container automatically detects the problem and
+        treats it as a deployment problem.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="class" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>
+              Each child &lt;class&gt; element
+              must specify the name of an interceptor class. If
+              there is no class with the specified name, or if
+              the class with the specified name is not an
+              interceptor class, the container automatically
+              detects the problem and treats it as a deployment
+              problem.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="decorators">
+    <xs:annotation>
+      <xs:documentation>
+        By default, a bean archive has no enabled
+        decorators. A decorator must be explicitly enabled by
+        listing its bean class under the &lt;decorators&gt; element
+        of the beans.xml file of the bean archive. The order of the
+        decorator declarations determines the decorator ordering.
+        Decorators which occur earlier in the list are called first.
+        If the same class is listed twice under the
+        &lt;decorators&gt; element, the container automatically
+        detects the problem and treats it as a deployment problem.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="class" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>
+              Each child &lt;class&gt; element
+              must specify the name of a decorator class. If
+              there is no class with the specified name, or if
+              the class with the specified name is not a
+              decorator class, the container automatically
+              detects the problem and treats it as a deployment
+              problem.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="alternatives">
+    <xs:annotation>
+      <xs:documentation>
+        An alternative is a bean that must be
+        explicitly declared in the beans.xml file if it should be
+        available for lookup, injection or EL resolution. By
+        default, a bean archive has no selected alternatives. An
+        alternative must be explicitly declared using the
+        &lt;alternatives&gt; element of the beans.xml file of the
+        bean archive. The &lt;alternatives&gt; element contains a
+        list of bean classes and stereotypes. An alternative is
+        selected for the bean archive if either: the alternative is
+        a managed bean or session bean and the bean class of the
+        bean is listed, or the alternative is a producer method,
+        field or resource, and the bean class that declares the
+        method or field is listed, or any @Alternative stereotype of
+        the alternative is listed.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="class" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>
+              Each child &lt;class&gt; element
+              must specify the name of an alternative bean class.
+              If there is no class with the specified name, or if
+              the class with the specified name is not an
+              alternative bean class, the container automatically
+              detects the problem and treats it as a deployment
+              problem. If the same class is listed twice under
+              the &lt;alternatives&gt; element, the container
+              automatically detects the problem and treats it as
+              a deployment problem.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+
+        <xs:element name="stereotype" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>
+              Each child &lt;stereotype&gt;
+              element must specify the name of an @Alternative
+              stereotype annotation. If there is no annotation
+              with the specified name, or the annotation is not
+              an @Alternative stereotype, the container
+              automatically detects the problem and treats it as
+              a deployment problem. If the same stereotype is
+              listed twice under the &lt;alternatives&gt;
+              element, the container automatically detects the
+              problem and treats it as a deployment problem.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="trim" type="xs:string" fixed="">
+      <xs:annotation>
+        <xs:documentation>
+          If an explicit bean archive contains the &lt;trim/&lt; element in its beans.xml file, types that don’t have
+          either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation,
+          are removed from the set of discovered types.
+        </xs:documentation>
+      </xs:annotation>
+  </xs:element>
+
+</xs:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-configuration-2.0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-configuration-2.0.xsd
new file mode 100644
index 0000000..1a13364
--- /dev/null
+++ b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-configuration-2.0.xsd
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Bean Validation API
+  ~
+  ~ License: Apache License, Version 2.0
+  ~ See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
+  -->
+<xs:schema attributeFormDefault="unqualified"
+           elementFormDefault="qualified"
+           targetNamespace="http://xmlns.jcp.org/xml/ns/validation/configuration"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:config="http://xmlns.jcp.org/xml/ns/validation/configuration"
+           version="2.0">
+
+    <xs:annotation>
+        <xs:documentation><![CDATA[
+            This is the XML Schema for the Bean Validation configuration file.
+            The configuration file must be named "META-INF/validation.xml".
+
+            Bean Validation configuration files must indicate the Bean Validation
+            XML schema by using the validation namespace:
+
+            http://xmlns.jcp.org/xml/ns/validation/configuration
+
+            and indicate the version of the schema by using the version attribute
+            as shown below:
+
+            <validation-config
+                xmlns="http://xmlns.jcp.org/xml/ns/validation/configuration"
+                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                xsi:schemaLocation="
+                    http://xmlns.jcp.org/xml/ns/validation/configuration
+                    http://xmlns.jcp.org/xml/ns/validation/configuration/validation-configuration-2.0.xsd"
+                version="2.0">
+                [...]
+            </validation-config>
+        ]]>
+        </xs:documentation>
+    </xs:annotation>
+
+    <xs:element name="validation-config" type="config:validation-configType"/>
+    <xs:complexType name="validation-configType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="default-provider" minOccurs="0"/>
+            <xs:element type="xs:string" name="message-interpolator" minOccurs="0"/>
+            <xs:element type="xs:string" name="traversable-resolver" minOccurs="0"/>
+            <xs:element type="xs:string" name="constraint-validator-factory" minOccurs="0"/>
+            <xs:element type="xs:string" name="parameter-name-provider" minOccurs="0"/>
+            <xs:element type="xs:string" name="clock-provider" minOccurs="0"/>
+            <xs:element type="xs:string" name="value-extractor" maxOccurs="unbounded"
+                    minOccurs="0"/>
+            <xs:element type="config:executable-validationType" name="executable-validation"
+                    minOccurs="0"/>
+            <xs:element type="xs:string" name="constraint-mapping" maxOccurs="unbounded"
+                    minOccurs="0"/>
+            <xs:element type="config:propertyType" name="property" maxOccurs="unbounded"
+                    minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="version" type="config:versionType" fixed="2.0" use="required"/>
+    </xs:complexType>
+
+    <xs:complexType name="executable-validationType">
+        <xs:sequence>
+            <xs:element type="config:default-validated-executable-typesType"
+                    name="default-validated-executable-types" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="enabled" use="optional" type="xs:boolean" default="true"/>
+    </xs:complexType>
+    <xs:complexType name="default-validated-executable-typesType">
+        <xs:sequence>
+            <xs:element name="executable-type" maxOccurs="unbounded" minOccurs="1">
+                <xs:simpleType>
+                    <xs:restriction base="xs:string">
+                        <xs:enumeration value="NONE"/>
+                        <xs:enumeration value="CONSTRUCTORS"/>
+                        <xs:enumeration value="NON_GETTER_METHODS"/>
+                        <xs:enumeration value="GETTER_METHODS"/>
+                        <xs:enumeration value="ALL"/>
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="propertyType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" use="required" type="xs:string"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="versionType">
+        <xs:restriction base="xs:token">
+            <xs:pattern value="[0-9]+(\.[0-9]+)*" />
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-mapping-2.0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-mapping-2.0.xsd
new file mode 100644
index 0000000..b7bf58a
--- /dev/null
+++ b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/validation-mapping-2.0.xsd
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Bean Validation API
+  ~
+  ~ License: Apache License, Version 2.0
+  ~ See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
+  -->
+<xs:schema attributeFormDefault="unqualified"
+           elementFormDefault="qualified"
+           targetNamespace="http://xmlns.jcp.org/xml/ns/validation/mapping"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:map="http://xmlns.jcp.org/xml/ns/validation/mapping"
+           version="2.0">
+
+    <xs:annotation>
+        <xs:documentation><![CDATA[
+            This is the XML Schema for Bean Validation constraint mapping files.
+
+            Bean Validation constraint mapping files must indicate the Bean Validation
+            XML schema by using the constraint mapping namespace:
+
+            http://xmlns.jcp.org/xml/ns/validation/mapping
+
+            and indicate the version of the schema by using the version attribute
+            as shown below:
+
+            <constraint-mappings
+                xmlns="http://xmlns.jcp.org/xml/ns/validation/mapping"
+                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                xsi:schemaLocation="
+                    http://xmlns.jcp.org/xml/ns/validation/mapping
+                    http://xmlns.jcp.org/xml/ns/validation/mapping/validation-mapping-2.0.xsd"
+                version="2.0">
+                ...
+            </constraint-mappings>
+        ]]>
+        </xs:documentation>
+    </xs:annotation>
+
+    <xs:element name="constraint-mappings" type="map:constraint-mappingsType"/>
+
+    <xs:complexType name="payloadType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="value" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="groupsType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="value" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="groupSequenceType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="value" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="groupConversionType">
+        <xs:attribute type="xs:string" name="from" use="optional"/>
+        <xs:attribute type="xs:string" name="to" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="constraint-mappingsType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="default-package" minOccurs="0"/>
+            <xs:element type="map:beanType"
+                        name="bean"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+            <xs:element type="map:constraint-definitionType"
+                        name="constraint-definition"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="version" type="map:versionType" fixed="2.0" use="required"/>
+    </xs:complexType>
+    <xs:simpleType name="versionType">
+        <xs:restriction base="xs:token">
+            <xs:pattern value="[0-9]+(\.[0-9]+)*"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="validated-byType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="value" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute type="xs:boolean" name="include-existing-validators" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="constraintType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="message" minOccurs="0"/>
+            <xs:element type="map:groupsType"
+                        name="groups"
+                        minOccurs="0"/>
+            <xs:element type="map:payloadType"
+                        name="payload"
+                        minOccurs="0"/>
+            <xs:element type="map:elementType"
+                        name="element"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="annotation" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="elementType" mixed="true">
+        <xs:sequence>
+            <xs:element type="xs:string" name="value" maxOccurs="unbounded" minOccurs="0"/>
+            <xs:element type="map:annotationType"
+                        name="annotation"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="name" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="containerElementTypeType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
+            <xs:element type="map:groupConversionType"
+                        name="convert-group"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:containerElementTypeType"
+                        name="container-element-type"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="type-argument-index" use="optional">
+            <xs:simpleType>
+                <xs:restriction base="xs:int">
+                    <xs:minInclusive value="0" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="classType">
+        <xs:sequence>
+            <xs:element type="map:groupSequenceType"
+                        name="group-sequence"
+                        minOccurs="0"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="beanType">
+        <xs:sequence>
+            <xs:element type="map:classType"
+                        name="class"
+                        minOccurs="0">
+            </xs:element>
+            <xs:element type="map:fieldType"
+                        name="field"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:getterType"
+                        name="getter"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:constructorType"
+                        name="constructor"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:methodType"
+                        name="method"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="class" use="required"/>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"
+                default="true"/>
+    </xs:complexType>
+    <xs:complexType name="annotationType">
+        <xs:sequence>
+            <xs:element type="map:elementType"
+                        name="element"
+                        maxOccurs="unbounded"
+                        minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="getterType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
+            <xs:element type="map:groupConversionType"
+                        name="convert-group"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:containerElementTypeType"
+                        name="container-element-type"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="methodType">
+        <xs:sequence>
+            <xs:element type="map:parameterType"
+                        name="parameter"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:crossParameterType"
+                        name="cross-parameter"
+                        minOccurs="0"
+                        maxOccurs="1"/>
+            <xs:element type="map:returnValueType"
+                        name="return-value"
+                        minOccurs="0"
+                        maxOccurs="1"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="constructorType">
+        <xs:sequence>
+            <xs:element type="map:parameterType"
+                        name="parameter"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:crossParameterType"
+                        name="cross-parameter"
+                        minOccurs="0"
+                        maxOccurs="1"/>
+            <xs:element type="map:returnValueType"
+                        name="return-value"
+                        minOccurs="0"
+                        maxOccurs="1"/>
+        </xs:sequence>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="parameterType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
+            <xs:element type="map:groupConversionType"
+                        name="convert-group"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:containerElementTypeType"
+                        name="container-element-type"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="type" use="required"/>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="returnValueType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
+            <xs:element type="map:groupConversionType"
+                        name="convert-group"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:containerElementTypeType"
+                        name="container-element-type"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="crossParameterType">
+        <xs:sequence>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+    <xs:complexType name="constraint-definitionType">
+        <xs:sequence>
+            <xs:element type="map:validated-byType"
+                        name="validated-by"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="annotation" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="fieldType">
+        <xs:sequence>
+            <xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
+            <xs:element type="map:groupConversionType"
+                        name="convert-group"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:containerElementTypeType"
+                        name="container-element-type"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+            <xs:element type="map:constraintType"
+                        name="constraint"
+                        minOccurs="0"
+                        maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:boolean" name="ignore-annotations" use="optional"/>
+    </xs:complexType>
+</xs:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/plugin.xml b/bundles/org.eclipse.jst.standard.schemas/plugin.xml
index 0315281..25159c1 100644
--- a/bundles/org.eclipse.jst.standard.schemas/plugin.xml
+++ b/bundles/org.eclipse.jst.standard.schemas/plugin.xml
@@ -95,7 +95,9 @@
            <uri
                name="http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
                uri="dtdsAndSchemas/beans_1_1.xsd"/>
-
+           <uri
+               name="http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+               uri="dtdsAndSchemas/beans_2_0.xsd"/>
 
            <uri
                name="http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
@@ -316,11 +318,17 @@
                 name="http://www.jboss.org/xml/ns/javax/validation/configuration/validation-configuration-1.1.xsd"
                 uri="dtdsAndSchemas/validation-configuration-1.1.xsd"/>
             <uri
+                name="http://xmlns.jcp.org/xml/ns/validation/configuration/validation-configuration-2.0.xsd"
+                uri="dtdsAndSchemas/validation-configuration-2.0.xsd"/>
+            <uri
                 name="http://www.jboss.org/xml/ns/javax/validation/mapping/validation-mapping-1.0.xsd"
                 uri="dtdsAndSchemas/validation-mapping-1.0.xsd"/>
             <uri
                 name="http://www.jboss.org/xml/ns/javax/validation/mapping/validation-mapping-1.1.xsd"
                 uri="dtdsAndSchemas/validation-mapping-1.1.xsd"/>
+            <uri
+                name="http://xmlns.jcp.org/xml/ns/validation/mapping/validation-mapping-2.0.xsd"
+                uri="dtdsAndSchemas/validation-mapping-2.0.xsd"/>
 
 
             <public