myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1130634 - in /myfaces/extensions/cdi/trunk: ./ alternative-modules/ alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/ alternative-modules/alternative-configuration-modules/core-alternative-configu...
Date Thu, 02 Jun 2011 16:27:41 GMT
Author: gpetracek
Date: Thu Jun  2 16:27:40 2011
New Revision: 1130634

URL: http://svn.apache.org/viewvc?rev=1130634&view=rev
Log:
EXTCDI-177 refactored to a generic approach

Added:
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/beans.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/beans.xml
      - copied, changed from r1128764, myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/pom.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementation.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementationExtension.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassAggregatable.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassDescriptor.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/LICENSE.txt
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/NOTICE.txt
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/beans.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
    myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml
Removed:
    myfaces/extensions/cdi/trunk/dist/alternative-configuration-weld/
    myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/java/org/apache/myfaces/extensions/cdi/
    myfaces/extensions/cdi/trunk/dist/jsf12-alternative-weld/
    myfaces/extensions/cdi/trunk/dist/jsf20-alternative-weld/
Modified:
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/pom.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/config/AlternativeCodiCoreConfig.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeConversationConfig.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeWindowContextConfig.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/pom.xml
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/jsf/alternative/config/AlternativeJsfModuleConfig.java
    myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig
    myfaces/extensions/cdi/trunk/alternative-modules/pom.xml
    myfaces/extensions/cdi/trunk/dist/pom.xml
    myfaces/extensions/cdi/trunk/pom.xml

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/pom.xml?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/pom.xml Thu Jun  2 16:27:40 2011
@@ -37,6 +37,11 @@
             <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
             <artifactId>myfaces-extcdi-core-impl</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
+            <artifactId>myfaces-extcdi-alternative-spi-module</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/config/AlternativeCodiCoreConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/config/AlternativeCodiCoreConfig.java?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/config/AlternativeCodiCoreConfig.java (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/config/AlternativeCodiCoreConfig.java Thu Jun  2 16:27:40 2011
@@ -18,18 +18,19 @@
  */
 package org.apache.myfaces.extensions.cdi.core.alternative.config;
 
+import org.apache.myfaces.extensions.cdi.alternative.spi.AlternativeImplementation;
 import org.apache.myfaces.extensions.cdi.core.api.config.CodiCoreConfig;
 import org.apache.myfaces.extensions.cdi.core.api.util.ClassUtils;
 import org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils;
 
-import javax.enterprise.inject.Typed;
+import javax.annotation.PostConstruct;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
  * @author Gerhard Petracek
  */
-@Typed()
+@AlternativeImplementation
 public class AlternativeCodiCoreConfig extends CodiCoreConfig
 {
     private static final long serialVersionUID = -1471628272055334673L;
@@ -37,7 +38,8 @@ public class AlternativeCodiCoreConfig e
     /**
      * Logs the activation of the config
      */
-    public AlternativeCodiCoreConfig()
+    @PostConstruct
+    protected void init()
     {
         Class configClass = AlternativeCodiCoreConfig.class; //don't use getClass - would lead to a proxy
 

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeConversationConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeConversationConfig.java?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeConversationConfig.java (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeConversationConfig.java Thu Jun  2 16:27:40 2011
@@ -18,18 +18,19 @@
  */
 package org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config;
 
+import org.apache.myfaces.extensions.cdi.alternative.spi.AlternativeImplementation;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.ConversationConfig;
 import org.apache.myfaces.extensions.cdi.core.api.util.ClassUtils;
 import org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils;
 
-import javax.enterprise.inject.Typed;
+import javax.annotation.PostConstruct;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
  * @author Gerhard Petracek
  */
-@Typed()
+@AlternativeImplementation
 public class AlternativeConversationConfig extends ConversationConfig
 {
     private static final long serialVersionUID = 6346216228706018316L;
@@ -37,7 +38,8 @@ public class AlternativeConversationConf
     /**
      * Logs the activation of the config
      */
-    public AlternativeConversationConfig()
+    @PostConstruct
+    protected void init()
     {
         Class configClass = AlternativeConversationConfig.class; //don't use getClass - would lead to a proxy
 

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeWindowContextConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeWindowContextConfig.java?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeWindowContextConfig.java (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/core/alternative/scope/conversation/config/AlternativeWindowContextConfig.java Thu Jun  2 16:27:40 2011
@@ -18,18 +18,19 @@
  */
 package org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config;
 
+import org.apache.myfaces.extensions.cdi.alternative.spi.AlternativeImplementation;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig;
 import org.apache.myfaces.extensions.cdi.core.api.util.ClassUtils;
 import org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils;
 
-import javax.enterprise.inject.Typed;
+import javax.annotation.PostConstruct;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
  * @author Gerhard Petracek
  */
-@Typed()
+@AlternativeImplementation
 public class AlternativeWindowContextConfig extends WindowContextConfig
 {
     private static final long serialVersionUID = 8616591700809645827L;
@@ -37,7 +38,8 @@ public class AlternativeWindowContextCon
     /**
      * Logs the activation of the config
      */
-    public AlternativeWindowContextConfig()
+    @PostConstruct
+    protected void init()
     {
         Class configClass = AlternativeWindowContextConfig.class; //don't use getClass - would lead to a proxy
 

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/beans.xml?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/beans.xml (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/beans.xml Thu Jun  2 16:27:40 2011
@@ -0,0 +1,24 @@
+<?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.
+-->
+<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>

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/core-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig Thu Jun  2 16:27:40 2011
@@ -17,10 +17,6 @@
 # under the License.
 #####################################################################################
 
-# this file is only useful for alternative-implementation modules (required for weld)
-# with owb or (hopefully) cdi 1.1 it's possible to configure the content of this file via
-# cdi std.-mechanisms (see @Alternative)
-
 org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig
 org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeConversationConfig
 org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeWindowContextConfig

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/pom.xml?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/pom.xml Thu Jun  2 16:27:40 2011
@@ -41,6 +41,11 @@
             <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
             <artifactId>myfaces-extcdi-jsf12-module-api</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
+            <artifactId>myfaces-extcdi-alternative-spi-module</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/jsf/alternative/config/AlternativeJsfModuleConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/jsf/alternative/config/AlternativeJsfModuleConfig.java?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/jsf/alternative/config/AlternativeJsfModuleConfig.java (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/java/org/apache/myfaces/extensions/cdi/jsf/alternative/config/AlternativeJsfModuleConfig.java Thu Jun  2 16:27:40 2011
@@ -18,18 +18,19 @@
  */
 package org.apache.myfaces.extensions.cdi.jsf.alternative.config;
 
+import org.apache.myfaces.extensions.cdi.alternative.spi.AlternativeImplementation;
 import org.apache.myfaces.extensions.cdi.core.api.util.ClassUtils;
 import org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils;
 import org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig;
 
-import javax.enterprise.inject.Typed;
+import javax.annotation.PostConstruct;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
  * @author Gerhard Petracek
  */
-@Typed()
+@AlternativeImplementation
 public class AlternativeJsfModuleConfig extends JsfModuleConfig
 {
     private static final long serialVersionUID = 2385134740850201120L;
@@ -37,7 +38,8 @@ public class AlternativeJsfModuleConfig 
     /**
      * Logs the activation of the config
      */
-    public AlternativeJsfModuleConfig()
+    @PostConstruct
+    protected void init()
     {
         Class configClass = AlternativeJsfModuleConfig.class; //don't use getClass - would lead to a proxy
 

Copied: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/beans.xml (from r1128764, myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml)
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/beans.xml?p2=myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/beans.xml&p1=myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml&r1=1128764&r2=1130634&rev=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/beans.xml Thu Jun  2 16:27:40 2011
@@ -21,10 +21,4 @@
        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">
 
-    <alternatives>
-        <class>org.apache.myfaces.extensions.cdi.core.alternative.auto.config.AlternativeCodiCoreConfig</class>
-        <class>org.apache.myfaces.extensions.cdi.core.alternative.auto.scope.conversation.config.AlternativeConversationConfig</class>
-        <class>org.apache.myfaces.extensions.cdi.core.alternative.auto.scope.conversation.config.AlternativeWindowContextConfig</class>
-        <class>org.apache.myfaces.extensions.cdi.jsf.alternative.auto.config.AlternativeJsfModuleConfig</class>
-    </alternatives>
 </beans>

Modified: myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-configuration-modules/jsf-alternative-configuration-module/src/main/resources/META-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig Thu Jun  2 16:27:40 2011
@@ -17,8 +17,4 @@
 # under the License.
 #####################################################################################
 
-# this file is only useful for alternative-implementation modules (required for weld)
-# with owb or (hopefully) cdi 1.1 it's possible to configure the content of this file via
-# cdi std.-mechanisms (see @Alternative)
-
 org.apache.myfaces.extensions.cdi.jsf.alternative.config.AlternativeJsfModuleConfig
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/pom.xml?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/pom.xml (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/pom.xml Thu Jun  2 16:27:40 2011
@@ -0,0 +1,43 @@
+<?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>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
+        <artifactId>alternative-project</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
+    <artifactId>myfaces-extcdi-alternative-spi-module</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <name>MyFaces Extensions-CDI Alternative-SPI Module</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+            <artifactId>myfaces-extcdi-core-impl</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+</project>

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementation.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementation.java?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementation.java (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementation.java Thu Jun  2 16:27:40 2011
@@ -0,0 +1,46 @@
+/*
+ * 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.alternative.spi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Annotate a bean which implements a SPI of CODI or extends a config class of CODI.
+ * In case of implementing a SPI it's required to register the custom class.
+ * So it will be checked by the {@link java.util.ServiceLoader}.
+ *
+ * In case of extending a config class of CODI, you have to do the same.
+ * However, since the config classes aren't abstract or have a special interface,
+ * it's required to register the custom class in a file called:
+ * MEtA-INF/services/org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig
+ *
+ * @author Gerhard Petracek
+ */
+@Target({TYPE})
+@Retention(RUNTIME)
+@Documented
+
+public @interface AlternativeImplementation
+{
+}

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementationExtension.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementationExtension.java?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementationExtension.java (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/AlternativeImplementationExtension.java Thu Jun  2 16:27:40 2011
@@ -0,0 +1,150 @@
+/*
+ * 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.alternative.spi;
+
+import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
+import org.apache.myfaces.extensions.cdi.core.impl.config.ServiceLoaderResolver;
+import org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Specializes;
+import javax.enterprise.inject.Typed;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+import java.io.Serializable;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class AlternativeImplementationExtension implements Extension
+{
+    protected <T> void vetoDefaultImplementation(@Observes ProcessAnnotatedType<T> processAnnotatedType)
+    {
+        Class<?> beanClass = processAnnotatedType.getAnnotatedType().getJavaClass();
+
+        //only filter default implementations of codi which are beans and don't filter a
+        //AlternativeImplementation provided by e.g. the codi alternative config module
+        if (!beanClass.getName().startsWith("org.apache.myfaces.extensions.cdi.") ||
+                beanClass.isAnnotationPresent(AlternativeImplementation.class) ||
+                beanClass.isAnnotationPresent(Specializes.class) ||
+                (beanClass.isAnnotationPresent(Typed.class) &&
+                        beanClass.getAnnotation(Typed.class).value().length == 0))
+        {
+            return;
+        }
+
+        if (beanClass.isInterface() || Modifier.isAbstract(beanClass.getModifiers()))
+        {
+            return;
+        }
+
+        final boolean configClassMode = CodiConfig.class.isAssignableFrom(beanClass);
+
+        List<Class> spiClassCandidates = findSpiClassCandidates(beanClass);
+
+        List customImplementations = new ArrayList();
+
+        Object customImplementation = null;
+
+        for (Class spiClass : spiClassCandidates)
+        {
+            if (Serializable.class.isAssignableFrom(beanClass))
+            {
+                if(!CodiConfig.class.getName().equals(spiClass.getName()))
+                {
+                    customImplementation = CodiUtils.lookupFromEnvironment(spiClass,
+                            new ConfiguredClassAggregatable(spiClass, customImplementations, configClassMode));
+                }
+                else
+                {
+                    customImplementation = CodiUtils.lookupFromEnvironment(spiClass,
+                            new ConfiguredClassAggregatable(beanClass, customImplementations, configClassMode));
+                }
+            }
+            else
+            {
+                //noinspection unchecked
+                customImplementation = tryToLoadCustomClassViaServiceLoader(spiClass);
+            }
+
+            if (customImplementation != null)
+            {
+                break;
+            }
+        }
+
+        if (customImplementation != null)
+        {
+            //veto default implementation of codi
+            processAnnotatedType.veto();
+        }
+    }
+
+    private Object tryToLoadCustomClassViaServiceLoader(Class spiClass)
+    {
+        List customImplementations = new ServiceLoaderResolver()
+                .resolveInstances(new ConfiguredClassDescriptor(spiClass));
+
+        if(customImplementations.isEmpty())
+        {
+            return null;
+        }
+
+        if (customImplementations.size() > 1)
+        {
+            //TODO
+            //here we have a spi which is used for other purposes
+            return null;
+        }
+
+        return customImplementations.iterator().next();
+    }
+
+    private <T> List<Class> findSpiClassCandidates(Class<T> beanClass)
+    {
+        List<Class> result = new ArrayList<Class>();
+
+        Class<?> currentClass = beanClass;
+        while (currentClass != null && !Object.class.getName().equals(currentClass.getName()))
+        {
+            //only codi spis are supported
+            if(currentClass.getName().startsWith("org.apache.myfaces.extensions.cdi."))
+            {
+                if ((Modifier.isAbstract(currentClass.getModifiers()) ||
+                        Modifier.isInterface(currentClass.getModifiers())))
+                {
+                    result.add(currentClass);
+                }
+            }
+
+            //scan interfaces
+            for (Class interfaceClass : currentClass.getInterfaces())
+            {
+                result.addAll(findSpiClassCandidates(interfaceClass));
+            }
+
+            currentClass = currentClass.getSuperclass();
+        }
+
+        return result;
+    }
+}

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassAggregatable.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassAggregatable.java?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassAggregatable.java (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassAggregatable.java Thu Jun  2 16:27:40 2011
@@ -0,0 +1,96 @@
+/*
+ * 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.alternative.spi;
+
+import org.apache.myfaces.extensions.cdi.core.api.Aggregatable;
+
+import javax.enterprise.inject.Typed;
+import java.util.List;
+
+/**
+ * @author Gerhard Petracek
+ */
+@Typed()
+class ConfiguredClassAggregatable<T> implements Aggregatable<T>
+{
+    private Class spiClass;
+    private List<T> customImplementations;
+    private boolean configClassMode;
+
+    ConfiguredClassAggregatable()
+    {
+    }
+
+    ConfiguredClassAggregatable(Class spiClass, List customImplementations, boolean configClassMode)
+    {
+        this.spiClass = spiClass;
+        this.customImplementations = customImplementations;
+        this.configClassMode = configClassMode;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void add(T o)
+    {
+        if (o.getClass().isAnnotationPresent(AlternativeImplementation.class))
+        {
+            this.customImplementations.add(o);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public T create()
+    {
+        if(!this.configClassMode)
+        {
+            if (this.customImplementations.size() > 1)
+            {
+                //TODO
+                //here we have a spi which is used for other purposes
+                return null;
+            }
+
+            if (this.customImplementations.size() == 1)
+            {
+                return this.customImplementations.iterator().next();
+            }
+        }
+        else if(!this.customImplementations.isEmpty())
+        {
+            return filterCustomCodiConfigImplementation();
+        }
+        return null;
+    }
+
+    private T filterCustomCodiConfigImplementation()
+    {
+        Class configClass = this.spiClass;
+        for(T customImplementation : this.customImplementations)
+        {
+            if(configClass.isAssignableFrom(customImplementation.getClass()))
+            {
+                return customImplementation;
+            }
+        }
+        return null;
+    }
+}

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassDescriptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassDescriptor.java?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassDescriptor.java (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/java/org/apache/myfaces/extensions/cdi/alternative/spi/ConfiguredClassDescriptor.java Thu Jun  2 16:27:40 2011
@@ -0,0 +1,57 @@
+/*
+ * 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.alternative.spi;
+
+import org.apache.myfaces.extensions.cdi.core.api.config.ConfiguredValueDescriptor;
+
+import javax.enterprise.inject.Typed;
+
+/**
+ * @author Gerhard Petracek
+ */
+@Typed()
+class ConfiguredClassDescriptor implements ConfiguredValueDescriptor<Class, Object>
+{
+    private Class configuredClass;
+
+    ConfiguredClassDescriptor()
+    {
+    }
+
+    ConfiguredClassDescriptor(Class configuredClass)
+    {
+        this.configuredClass = configuredClass;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Class getKey()
+    {
+        return this.configuredClass;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Class<Object> getTargetType()
+    {
+        return this.configuredClass;
+    }
+}

Added: myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/LICENSE.txt?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/LICENSE.txt (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/LICENSE.txt Thu Jun  2 16:27:40 2011
@@ -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/alternative-modules/alternative-spi-module/src/main/resources/META-INF/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/NOTICE.txt?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/NOTICE.txt (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/NOTICE.txt Thu Jun  2 16:27:40 2011
@@ -0,0 +1,9 @@
+Apache MyFaces Extensions CDI (aka MyFaces CODI)
+Copyright 2011 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/alternative-modules/alternative-spi-module/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/beans.xml?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/beans.xml (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/beans.xml Thu Jun  2 16:27:40 2011
@@ -0,0 +1,24 @@
+<?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.
+-->
+<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/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension (added)
+++ myfaces/extensions/cdi/trunk/alternative-modules/alternative-spi-module/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension Thu Jun  2 16:27:40 2011
@@ -0,0 +1,20 @@
+#####################################################################################
+# 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.
+#####################################################################################
+
+org.apache.myfaces.extensions.cdi.alternative.spi.AlternativeImplementationExtension
\ No newline at end of file

Modified: myfaces/extensions/cdi/trunk/alternative-modules/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/alternative-modules/pom.xml?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/alternative-modules/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/alternative-modules/pom.xml Thu Jun  2 16:27:40 2011
@@ -35,8 +35,8 @@
 
 
     <modules>
-        <module>alternative-implementation-modules</module>
         <module>alternative-configuration-modules</module>
+        <module>alternative-spi-module</module>
     </modules>
 
 </project>

Added: myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml?rev=1130634&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml (added)
+++ myfaces/extensions/cdi/trunk/dist/alternative-configuration/src/main/resources/META-INF/beans.xml Thu Jun  2 16:27:40 2011
@@ -0,0 +1,24 @@
+<?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.
+-->
+<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>

Modified: myfaces/extensions/cdi/trunk/dist/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/dist/pom.xml?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/dist/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/dist/pom.xml Thu Jun  2 16:27:40 2011
@@ -36,10 +36,7 @@
     <modules>
         <module>jsf12</module>
         <module>jsf20</module>
-        <module>jsf12-alternative-weld</module>
-        <module>jsf20-alternative-weld</module>
         <module>alternative-configuration</module>
-        <module>alternative-configuration-weld</module>
     </modules>
 
 </project>

Modified: myfaces/extensions/cdi/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/pom.xml?rev=1130634&r1=1130633&r2=1130634&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/pom.xml Thu Jun  2 16:27:40 2011
@@ -322,18 +322,9 @@
                 <scope>provided</scope>
             </dependency>
 
-            <!-- alternative module - esp. required for weld -->
-
-            <dependency>
-                <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
-                <artifactId>myfaces-extcdi-core-alternative</artifactId>
-                <version>1.0.0-SNAPSHOT</version>
-                <scope>provided</scope>
-            </dependency>
-
             <dependency>
                 <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
-                <artifactId>myfaces-extcdi-jsf-alternative</artifactId>
+                <artifactId>myfaces-extcdi-alternative-spi-module</artifactId>
                 <version>1.0.0-SNAPSHOT</version>
                 <scope>provided</scope>
             </dependency>



Mime
View raw message