You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2010/04/05 01:55:38 UTC

svn commit: r930765 - in /myfaces/extensions/cdi/trunk: core/ core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/ core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ core/impl/ core/impl/src/main/config/ core/impl...

Author: gpetracek
Date: Sun Apr  4 23:55:36 2010
New Revision: 930765

URL: http://svn.apache.org/viewvc?rev=930765&view=rev
Log:
EXTCDI-8 and EXTCDI-20 (first draft)

Added:
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/Advanced.java
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ValidatorFactoryResolver.java
    myfaces/extensions/cdi/trunk/core/impl/src/main/config/javax.enterprise.inject.spi.Extension
      - copied, changed from r930738, myfaces/extensions/cdi/trunk/core/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/BeanValidationDemoBean.java
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/CodiNotNullConstraintValidator.java
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/TuneExtValStartupListener.java
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/pom.xml
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/beans.xml
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/extensions/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/extensions/cdi/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/extensions/cdi/javaee/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/api/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/LICENSE.txt
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/NOTICE.txt
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/pom.xml
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/beans.xml
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactory.java
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactoryProducer.java
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/LICENSE.txt
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/NOTICE.txt
    myfaces/extensions/cdi/trunk/jee-modules/bv-module/pom.xml
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/JsfValidatorFactoryResolver.java
Removed:
    myfaces/extensions/cdi/trunk/core/impl/src/main/resources/META-INF/
Modified:
    myfaces/extensions/cdi/trunk/core/impl/pom.xml
    myfaces/extensions/cdi/trunk/core/pom.xml
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/pom.xml
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/webapp/helloMyFacesCodi.jsp
    myfaces/extensions/cdi/trunk/jee-modules/pom.xml
    myfaces/extensions/cdi/trunk/parent/pom.xml

Added: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/Advanced.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/Advanced.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/Advanced.java (added)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/Advanced.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.cdi.core.api;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+
+/**
+ * @author Gerhard Petracek
+ */
+@Target({PARAMETER, FIELD, METHOD})
+@Retention(RUNTIME)
+@Documented
+
+@Qualifier
+public @interface Advanced
+{
+}

Added: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ValidatorFactoryResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ValidatorFactoryResolver.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ValidatorFactoryResolver.java (added)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/resolver/ValidatorFactoryResolver.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.cdi.core.api.resolver;
+
+import javax.validation.ValidatorFactory;
+
+/**
+ * @author Gerhard Petracek
+ */
+public interface ValidatorFactoryResolver
+{
+    ValidatorFactory getValidatorFactory();
+}

Modified: myfaces/extensions/cdi/trunk/core/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/impl/pom.xml?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/impl/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/core/impl/pom.xml Sun Apr  4 23:55:36 2010
@@ -59,10 +59,12 @@
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <scope>test</scope>
         </dependency> 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-el_2.2_spec</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
@@ -84,6 +86,13 @@
                 <targetPath>/META-INF</targetPath>
             </resource>
             <resource>
+                <directory>src/main/config</directory>
+                <includes>
+                    <include>javax.enterprise.inject.spi.Extension</include>
+                </includes>
+                <targetPath>/META-INF/services/</targetPath>
+            </resource>
+            <resource>
                 <directory>src/main/java</directory>
                 <includes>
                     <include>**/*properties</include>

Copied: myfaces/extensions/cdi/trunk/core/impl/src/main/config/javax.enterprise.inject.spi.Extension (from r930738, myfaces/extensions/cdi/trunk/core/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension)
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/impl/src/main/config/javax.enterprise.inject.spi.Extension?p2=myfaces/extensions/cdi/trunk/core/impl/src/main/config/javax.enterprise.inject.spi.Extension&p1=myfaces/extensions/cdi/trunk/core/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension&r1=930738&r2=930765&rev=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension (original)
+++ myfaces/extensions/cdi/trunk/core/impl/src/main/config/javax.enterprise.inject.spi.Extension Sun Apr  4 23:55:36 2010
@@ -17,20 +17,8 @@
 # under the License.
 #####################################################################################
 
-#####################################################################################
-# This service configuration contains all available CODI extensions but in a
-#
-#                              DISABLED (commented-out)
-#
-# status.
-# Please copy over this file to your own project and enable the extensions as needed.
-#
-# We choose to do it that way since there is no option to later disable Services with
-# the underlying java.util.ServiceLoader mechanism.
-#####################################################################################
-
 # support for @ProjectStageActivated
-#org.apache.myfaces.extensions.cdi.core.impl.projectstage.ProjectStageActivationExtension
+org.apache.myfaces.extensions.cdi.core.impl.projectstage.ProjectStageActivationExtension
 
 # myfaces-codi BeanManager provider
-#org.apache.myfaces.extensions.cdi.core.api.manager.BeanManagerProvider
\ No newline at end of file
+org.apache.myfaces.extensions.cdi.core.api.manager.BeanManagerProvider
\ No newline at end of file

Modified: myfaces/extensions/cdi/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/pom.xml?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/core/pom.xml Sun Apr  4 23:55:36 2010
@@ -56,6 +56,10 @@
     </repositories>
 
     <dependencies>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Modified: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/pom.xml?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/pom.xml Sun Apr  4 23:55:36 2010
@@ -69,6 +69,35 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+            <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+            <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- optional -->
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.validator</groupId>
+            <artifactId>myfaces-extval-core</artifactId>
+            <version>1.2.3</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.validator.validation-modules</groupId>
+            <artifactId>myfaces-extval-bean-validation</artifactId>
+            <version>1.2.3</version>
+            <scope>compile</scope>
+        </dependency>
+
         <!-- TODO -->
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>
@@ -153,6 +182,26 @@
             <artifactId>openwebbeans-web</artifactId>
             <version>${owb.version}</version>
         </dependency>
+
+        <!-- Bean-Validation - TODO -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>4.0.0.GA</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.4.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.4.2</version>
+        </dependency>
+        
     </dependencies>
 
     <build>

Added: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/BeanValidationDemoBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/BeanValidationDemoBean.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/BeanValidationDemoBean.java (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/BeanValidationDemoBean.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.blank.bv;
+
+import org.apache.myfaces.extensions.cdi.core.api.Advanced;
+
+import javax.enterprise.inject.Model;
+import javax.inject.Inject;
+import javax.validation.ConstraintViolation;
+import javax.validation.ValidatorFactory;
+import javax.validation.constraints.NotNull;
+import javax.faces.context.FacesContext;
+import javax.faces.application.FacesMessage;
+import java.util.Set;
+
+/**
+ * @author Gerhard Petracek
+ */
+@Model
+public class BeanValidationDemoBean
+{
+    @NotNull
+    private String text;
+
+    @NotNull
+    private String forcedViolation;
+
+    @Inject @Advanced
+    private ValidatorFactory validatorFactory;
+
+    @Inject
+    private FacesContext facesContext;
+
+    /**
+     * MyFaces ExtVal is used to autom. validate properties bound to the UI
+     * This method just illustrates that it's possible to directly use the validator-factory provided by MyFaces CODI
+     */
+    public void send()
+    {
+        Set<ConstraintViolation<BeanValidationDemoBean>> violations =
+                this.validatorFactory.getValidator().validate(this);
+
+        if(!violations.isEmpty()) {
+            ConstraintViolation violation = violations.iterator().next();
+            String message = "property: " + violation.getPropertyPath().toString()
+                    + " - message: " +  violation.getMessage();
+            this.facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
+        }
+    }
+
+    /*
+     * generated
+     */
+    public String getText()
+    {
+        return text;
+    }
+
+    public void setText(String text)
+    {
+        this.text = text;
+    }
+}

Added: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/CodiNotNullConstraintValidator.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/CodiNotNullConstraintValidator.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/CodiNotNullConstraintValidator.java (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/bv/CodiNotNullConstraintValidator.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.blank.bv;
+
+import org.hibernate.validator.constraints.impl.NotNullValidator;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.ConstraintValidatorContext;
+import javax.inject.Inject;
+import javax.faces.context.FacesContext;
+import javax.faces.application.FacesMessage;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class CodiNotNullConstraintValidator extends NotNullValidator
+{
+    @Inject
+    private FacesContext facesContext;
+
+    //@Inject
+    //private ProjectStage projectStage;
+
+    @Override
+    public void initialize(NotNull parameters)
+    {
+        super.initialize(parameters);
+    }
+
+    @Override
+    public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext)
+    {
+        boolean isValid = super.isValid(object, constraintValidatorContext);
+
+        if(/*ProjectStage.Development.equals(this.projectStage) &&*/ !isValid)
+        {
+            String message = "violation found - constraint: @" +
+                    NotNull.class.getSimpleName() + " detected by: " + getClass().getName();
+            this.facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
+        }
+        return isValid;
+    }
+}

Added: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/TuneExtValStartupListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/TuneExtValStartupListener.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/TuneExtValStartupListener.java (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/java/org/apache/myfaces/blank/extVal/TuneExtValStartupListener.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.blank.extVal;
+
+import org.apache.myfaces.extensions.validator.core.startup.AbstractStartupListener;
+import org.apache.myfaces.extensions.validator.core.ExtValContext;
+import org.apache.myfaces.extensions.validator.core.renderkit.ExtValRendererProxy;
+import org.apache.myfaces.extensions.validator.core.interceptor.ValidationInterceptor;
+import org.apache.myfaces.extensions.validator.beanval.validation.ModelValidationPhaseListener;
+import org.apache.myfaces.extensions.validator.util.JsfUtils;
+import org.apache.myfaces.extensions.cdi.javaee.jsf.api.listener.phase.JsfPhaseListener;
+
+/**
+ * Performance tuning based on http://wiki.apache.org/myfaces/Extensions/Validator/JSR303/Advanced
+ * 
+ * @author Gerhard Petracek
+ */
+@JsfPhaseListener
+public class TuneExtValStartupListener extends AbstractStartupListener
+{
+    private static final long serialVersionUID = -6264765928200362764L;
+
+    protected void init()
+    {
+        ExtValContext.getContext().denyRendererInterceptor(ValidationInterceptor.class);
+        JsfUtils.deregisterPhaseListener(new ModelValidationPhaseListener());
+        ExtValContext.getContext().addGlobalProperty(ExtValRendererProxy.KEY, null);
+    }
+}

Modified: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/webapp/helloMyFacesCodi.jsp
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/webapp/helloMyFacesCodi.jsp?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/webapp/helloMyFacesCodi.jsp (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf12/src/main/webapp/helloMyFacesCodi.jsp Sun Apr  4 23:55:36 2010
@@ -23,15 +23,31 @@
     </head>
     <body>
         <f:view>
-            <h:form id="mainForm">
+            <h1>JSF-Demo</h1>
+            <h:form id="jsfMainForm">
                 <h:panelGrid columns="2">
                     <h:outputLabel for="txtInfo" value="Bean-value:"/>
                     <h:outputText id="txtInfo" value="#{facesDemoBean.text}"/>
 
                     <h:commandButton value="send"/>
+                    <h:panelGroup/>
                 </h:panelGrid>
-                <h:messages globalOnly="true"/>
             </h:form>
+
+            <h1>BV-Demo</h1>
+            <h:form id="bvMainForm">
+                <h:panelGrid columns="3">
+                    <h:outputLabel for="txtInfo" value="Bean-value:"/>
+                    <h:inputText id="txtInfo" value="#{beanValidationDemoBean.text}" label="Bean-value"/>
+                    <h:message for="txtInfo" showSummary="false" showDetail="true"/>
+
+                    <h:commandButton value="send" action="#{beanValidationDemoBean.send}"/>
+                    <h:panelGroup/>
+                    <h:panelGroup/>
+                </h:panelGrid>
+            </h:form>
+
+            <h:messages globalOnly="true" infoStyle="color: blue;" warnStyle="color: orange;" errorStyle="color: red;" fatalStyle="color:darkred;"/>
         </f:view>
     </body>
 </html>

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/pom.xml?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/pom.xml (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/pom.xml Sun Apr  4 23:55:36 2010
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
+    <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+    <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
+
+    <name>MyFaces Extensions-CDI Bean-Validation 1.0 Module API</name>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+        <artifactId>bv1-module-project</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+            <artifactId>myfaces-extcdi-core-api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/config</directory>
+                <includes>
+                    <include>**/*xml</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*properties</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <inherited>true</inherited>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/beans.xml?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/beans.xml (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/config/beans.xml Sun Apr  4 23:55:36 2010
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+</beans>

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/LICENSE.txt?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/LICENSE.txt (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/LICENSE.txt Sun Apr  4 23:55:36 2010
@@ -0,0 +1,174 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/NOTICE.txt?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/NOTICE.txt (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/api/src/main/resources/NOTICE.txt Sun Apr  4 23:55:36 2010
@@ -0,0 +1,9 @@
+Apache MyFaces Extensions CDI (aka MyFaces CODI)
+Copyright 2010 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+See the file LICENSE.txt
+------------------------------------------------------------------------
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/pom.xml?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/pom.xml (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/pom.xml Sun Apr  4 23:55:36 2010
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
+    <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+    <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
+
+    <name>MyFaces Extensions-CDI Bean-Validation 1.0 Module Impl</name>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+        <artifactId>bv1-module-project</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+            <artifactId>myfaces-extcdi-core-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+            <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+            <artifactId>myfaces-extcdi-core-impl</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/config</directory>
+                <includes>
+                    <include>**/*xml</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/config</directory>
+                <includes>
+                    <include>javax.enterprise.inject.spi.Extension</include>
+                </includes>
+                <targetPath>/META-INF/services/</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*properties</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <inherited>true</inherited>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/beans.xml?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/beans.xml (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/config/beans.xml Sun Apr  4 23:55:36 2010
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactory.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactory.java (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactory.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.cdi.javaee.bv.impl;
+
+import org.apache.myfaces.extensions.cdi.core.api.manager.BeanManagerProvider;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.Typed;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.validation.ValidatorFactory;
+import javax.validation.Validator;
+import javax.validation.ValidatorContext;
+import javax.validation.MessageInterpolator;
+import javax.validation.TraversableResolver;
+import javax.validation.ConstraintValidatorFactory;
+import javax.validation.ConstraintValidator;
+import java.util.Set;
+
+/**
+ * @author Gerhard Petracek
+ */
+@Typed()
+public class CdiAwareValidatorFactory implements ValidatorFactory
+{
+    private ValidatorFactory wrappedValidatorFactory;
+    private boolean customContextUsed;
+
+    protected CdiAwareValidatorFactory(ValidatorFactory wrappedValidatorFactory)
+    {
+        this.wrappedValidatorFactory = wrappedValidatorFactory;
+    }
+
+    public Validator getValidator()
+    {
+        if(this.customContextUsed)
+        {
+            return this.wrappedValidatorFactory.getValidator();
+        }
+        return this.usingContext().constraintValidatorFactory(getConstraintValidatorFactory()).getValidator();
+    }
+
+    public ValidatorContext usingContext()
+    {
+        this.customContextUsed = true;
+        return wrappedValidatorFactory.usingContext();
+    }
+
+    public MessageInterpolator getMessageInterpolator()
+    {
+        return wrappedValidatorFactory.getMessageInterpolator();
+    }
+
+    public TraversableResolver getTraversableResolver()
+    {
+        return wrappedValidatorFactory.getTraversableResolver();
+    }
+
+    public ConstraintValidatorFactory getConstraintValidatorFactory()
+    {
+        return new ConstraintValidatorFactory()
+        {
+            @SuppressWarnings({"unchecked"})
+            public <T extends ConstraintValidator<?, ?>> T getInstance(Class<T> targetClass)
+            {
+                BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
+
+                Set<? extends Bean> foundBeans = beanManager.getBeans(targetClass);
+
+                if (foundBeans.isEmpty())
+                {
+                    return wrappedValidatorFactory.getConstraintValidatorFactory().getInstance(targetClass);
+                }
+                else if (foundBeans.size() > 1)
+                {
+                    throw new IllegalStateException(
+                            foundBeans.size() + " beans are available for the class: " + targetClass);
+                }
+
+                Bean<ConstraintValidator> constraintValidatorBean = foundBeans.iterator().next();
+                CreationalContext<ConstraintValidator> creationalContext =
+                        beanManager.createCreationalContext(constraintValidatorBean);
+
+                return (T) constraintValidatorBean.create(creationalContext);
+            }
+        };
+    }
+
+    public <T> T unwrap(Class<T> tClass)
+    {
+        return wrappedValidatorFactory.unwrap(tClass);
+    }
+}

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactoryProducer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactoryProducer.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactoryProducer.java (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/bv/impl/CdiAwareValidatorFactoryProducer.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.cdi.javaee.bv.impl;
+
+import org.apache.myfaces.extensions.cdi.core.api.Advanced;
+import org.apache.myfaces.extensions.cdi.core.api.resolver.ValidatorFactoryResolver;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Produces;
+import javax.validation.Validation;
+import javax.validation.ValidatorFactory;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class CdiAwareValidatorFactoryProducer
+{
+    private static ValidatorFactory defaultValidatorFactory;
+
+    protected CdiAwareValidatorFactoryProducer()
+    {
+    }
+
+    @Produces
+    @Dependent
+    @Advanced
+    public ValidatorFactory createValidatorFactoryForDependencyInjectionAwareConstraintValidators(
+            ValidatorFactoryResolver validatorFactoryResolver)
+    {
+        ValidatorFactory validatorFactory = validatorFactoryResolver.getValidatorFactory();
+        if (validatorFactory == null)
+        {
+            if (defaultValidatorFactory == null)
+            {
+                defaultValidatorFactory = Validation.buildDefaultValidatorFactory();
+            }
+            validatorFactory = defaultValidatorFactory;
+        }
+
+        return new CdiAwareValidatorFactory(validatorFactory);
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/LICENSE.txt?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/LICENSE.txt (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/LICENSE.txt Sun Apr  4 23:55:36 2010
@@ -0,0 +1,174 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/NOTICE.txt?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/NOTICE.txt (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/impl/src/main/resources/NOTICE.txt Sun Apr  4 23:55:36 2010
@@ -0,0 +1,9 @@
+Apache MyFaces Extensions CDI (aka MyFaces CODI)
+Copyright 2010 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+See the file LICENSE.txt
+------------------------------------------------------------------------
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/jee-modules/bv-module/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/bv-module/pom.xml?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/bv-module/pom.xml (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/bv-module/pom.xml Sun Apr  4 23:55:36 2010
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <packaging>pom</packaging>
+
+    <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+    <artifactId>bv1-module-project</artifactId>
+
+    <name>MyFaces Extensions-CDI BV 1.0 Module</name>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+        <artifactId>jee-modules-project</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <modules>
+        <module>api</module>
+        <module>impl</module>
+    </modules>
+
+    <dependencies>
+        <!--dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-validation_1.0_spec</artifactId>
+            <version>${bv.version}</version>
+            <scope>provided</scope>
+        </dependency-->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <properties>
+        <bv.version>1.0</bv.version>
+    </properties>
+</project>

Added: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/JsfValidatorFactoryResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/JsfValidatorFactoryResolver.java?rev=930765&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/JsfValidatorFactoryResolver.java (added)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/javaee/jsf/impl/resolver/JsfValidatorFactoryResolver.java Sun Apr  4 23:55:36 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.cdi.javaee.jsf.impl.resolver;
+
+import org.apache.myfaces.extensions.cdi.core.api.resolver.ValidatorFactoryResolver;
+
+import javax.faces.context.FacesContext;
+import javax.validation.Validation;
+import javax.validation.ValidatorFactory;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class JsfValidatorFactoryResolver implements ValidatorFactoryResolver
+{
+    private static final String VALIDATOR_FACTORY_KEY = "javax.faces.validator.beanValidator.ValidatorFactory";
+
+    public ValidatorFactory getValidatorFactory()
+    {
+        Map<String, Object> applicationMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
+        ValidatorFactory validatorFactory = null;
+
+        if (applicationMap.containsKey(VALIDATOR_FACTORY_KEY))
+        {
+            if (applicationMap.get(VALIDATOR_FACTORY_KEY) instanceof ValidatorFactory)
+            {
+                validatorFactory = (ValidatorFactory) applicationMap.get(VALIDATOR_FACTORY_KEY);
+            }
+        }
+
+        if (validatorFactory == null)
+        {
+            validatorFactory = Validation.buildDefaultValidatorFactory();
+            applicationMap.put(VALIDATOR_FACTORY_KEY, validatorFactory);
+        }
+        return validatorFactory;
+    }
+}

Modified: myfaces/extensions/cdi/trunk/jee-modules/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/pom.xml?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/jee-modules/pom.xml Sun Apr  4 23:55:36 2010
@@ -45,6 +45,7 @@
     <modules>
         <module>jsf-module</module>
         <module>jsf20-module</module>
+        <module>bv-module</module>
     </modules>
 
     <repositories>

Modified: myfaces/extensions/cdi/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/parent/pom.xml?rev=930765&r1=930764&r2=930765&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/parent/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/parent/pom.xml Sun Apr  4 23:55:36 2010
@@ -57,7 +57,7 @@
             </notifier>
         </notifiers>
     </ciManagement>
-    
+
     <inceptionYear>2008</inceptionYear>
 
     <properties>
@@ -115,7 +115,6 @@
             </dependency>
 
 
-
             <!-- the JSF independent core -->
             <dependency>
                 <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
@@ -152,6 +151,18 @@
                 <version>1.0.0-SNAPSHOT</version>
             </dependency>
 
+            <!-- the BV-1.0 specific library -->
+            <dependency>
+                <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+                <artifactId>myfaces-extcdi-bv1-module-api</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.myfaces.extensions.cdi.jee-modules</groupId>
+                <artifactId>myfaces-extcdi-bv1-module-impl</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+
             <!--
                 We currently need this for the CDI test container to emulate the @SessionScoped.
                 TODO: Finally this should not be necessary anymore.
@@ -165,17 +176,30 @@
             </dependency>
 
             <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-el_2.2_spec</artifactId>
-                    <version>1.0-beta</version>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-el_2.2_spec</artifactId>
+                <version>1.0-beta</version>
             </dependency>
 
             <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-validation_1.0_spec</artifactId>
-                    <version>1.0</version>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-validation_1.0_spec</artifactId>
+                <version>1.0</version>
             </dependency>
-            
+
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-validation_1.0_spec</artifactId>
+                <version>1.0</version>
+            </dependency>
+
+            <!-- TODO -->
+            <dependency>
+                <groupId>javax.validation</groupId>
+                <artifactId>validation-api</artifactId>
+                <version>1.0.0.GA</version>
+            </dependency>
+
         </dependencies>
 
     </dependencyManagement>
@@ -213,9 +237,9 @@
             <version>5.1</version>
             <scope>test</scope>
         </dependency>
-        
+
     </dependencies>
-    
+
 
     <build>
         <resources>
@@ -267,8 +291,8 @@
                             <tasks>
                                 <copy todir="${project.build.directory}/apidocs/META-INF">
                                     <fileset dir="${basedir}">
-                                        <include name="LICENSE.txt" />
-                                        <include name="NOTICE.txt" />
+                                        <include name="LICENSE.txt"/>
+                                        <include name="NOTICE.txt"/>
                                     </fileset>
                                 </copy>
                             </tasks>
@@ -283,8 +307,9 @@
                         <configuration>
                             <tasks>
                                 <!-- Copy javadoc to another directory, to keep javadoc of previous versions on site -->
-                                <copy todir="${project.build.directory}/site/apidocs-${project.version}" failonerror="false">
-                                  <fileset dir="${project.build.directory}/site/apidocs"/>
+                                <copy todir="${project.build.directory}/site/apidocs-${project.version}"
+                                      failonerror="false">
+                                    <fileset dir="${project.build.directory}/site/apidocs"/>
                                 </copy>
                             </tasks>
                         </configuration>
@@ -298,7 +323,7 @@
                 - projects may redeclare this plugin and provide different configuration settings
                 - to use different checks (more or less strict than the default).
             -->
-            
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
@@ -317,7 +342,7 @@
                     <headerLocation>default/myfaces-header.txt</headerLocation>
                 </configuration>
             </plugin>
-            
+
 
             <plugin>
                 <!-- Set compile source at 1.5, since the target JSF impl is 1.2 -->
@@ -328,7 +353,7 @@
                     <target>1.5</target>
                     <optimize>false</optimize>
                 </configuration>
-            </plugin>            
+            </plugin>
         </plugins>
     </build>
 
@@ -386,7 +411,8 @@
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/extensions/cdi/branches/1_0_0_rc/parent</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/extensions/cdi/branches/1_0_0_rc/parent</developerConnection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/extensions/cdi/branches/1_0_0_rc/parent
+        </developerConnection>
         <url>http://svn.apache.org/viewvc/myfaces/extensions/cdi/branches/1_0_0_rc/parent</url>
     </scm>